Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bounds #4

Merged
merged 6 commits into from
Mar 17, 2021
Merged

Bounds #4

merged 6 commits into from
Mar 17, 2021

Conversation

tpdsantos
Copy link
Owner

No description provided.

Before this branch the variable boundaries were checked inside the objective function, returning an Inf value when they were not inside boundaries. This was not ideal, since some individuals did not have a chance to improve in further iterations because they were automatically discarded.
Now the boundary checking is made inside the mutation functions. In this way, all the individuals have genes that respect the boundaries, reducing the number of objective function evaluations that would be Inf.
The only thing that was missing regarding the insertion of boundary values in FloatGene and IntegerGene types was the backupo of said values. Now the backup and reverse_backup functions already have the functionality of saving the boundary values in the backup files and in the population variable, respectively.
Before this update boundary checking was performed AFTER the new variables were saved in the gene vector, which made it much more difficult to have new values inside boundaries.
In this update, boundary checking is made BEFORE new values are saved, drastically increasing the probability of having new values inside boundaries.
@tpdsantos tpdsantos merged commit 13eeb3d into master Mar 17, 2021
@tpdsantos tpdsantos deleted the bounds branch March 17, 2021 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant