Closed jbytecode closed 3 months ago
The new commits solve this problem and feel free to close the issue when you finish reviewing the code and have no more questions.
Thank you, I’ve reviewed the code, and the updates resolve the issue. I’ll close it now.
Summary for the commit (https://github.com/SevgiAkten/pycellga/commit/802342aa0fa0fe2a9312043ae59fade1a878c55c)
Test functions have no place in the optimizer
Optimizer is a problem agnostic object, that is, it should take the function subject to optimization, the min values for each single gene, the max values for each single gene, and the other optimization parameters such like operator types.
Thus, it's better to separate test functions and the optimization code.
Individual
The Individual is a problem agnostic object, it is only aware of the genome of the problem, e.g., binary, permutation, real, so it should not hold any problem information. Since it has a randomize() method, and if the optimization problem is real-valued, so we also need the min and max values of the genes in the chromosome.