From 1fecde05c15a940840cbf7e75187de12b69fbcc4 Mon Sep 17 00:00:00 2001 From: William Cheong Weelau Date: Sat, 2 Dec 2023 19:12:07 +0800 Subject: [PATCH 1/2] docs: correct context on "multi-objective" updated the text explanation on what's the multi-objective, instead of the wrongly written as 'single-objective' ? --- docs/source/pygad.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/pygad.rst b/docs/source/pygad.rst index 9a512f6..ad174a4 100644 --- a/docs/source/pygad.rst +++ b/docs/source/pygad.rst @@ -1060,7 +1060,7 @@ optimization problem is single-objective or multi-objective. ``pygad.GA`` class. - If the fitness function returns a ``list``, ``tuple``, or - ``numpy.ndarray``, then the problem is single-objective. Even if + ``numpy.ndarray``, then the problem is multi-objective. Even if there is only one element, the problem is still considered multi-objective. Each element represents the fitness value of its corresponding objective. From c4b17f91860037315fe84869240ccce3682dc154 Mon Sep 17 00:00:00 2001 From: William Cheong Weelau Date: Sun, 10 Dec 2023 22:46:53 +0800 Subject: [PATCH 2/2] docs: edit pygad.rst minor adjustment on the grammar to better explain the context --- docs/source/pygad.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/pygad.rst b/docs/source/pygad.rst index ad174a4..33a3bb3 100644 --- a/docs/source/pygad.rst +++ b/docs/source/pygad.rst @@ -1039,7 +1039,7 @@ Let's discuss how to do each of these steps. Preparing the ``fitness_func`` Parameter ----------------------------------------- -Even there are some steps in the genetic algorithm pipeline that can +Even though some steps in the genetic algorithm pipeline can work the same regardless of the problem being solved, one critical step is the calculation of the fitness value. There is no unique way of calculating the fitness value and it changes from one problem to @@ -1066,8 +1066,8 @@ optimization problem is single-objective or multi-objective. corresponding objective. Using a user-defined fitness function allows the user to freely use -PyGAD to solve any problem by passing the appropriate fitness -function/method. It is very important to understand the problem well for +PyGAD solves any problem by passing the appropriate fitness +function/method. It is very important to understand the problem well before creating it. Let's discuss an example: