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

add optimizer using a genetic algorithm #90

Open
rochaporto opened this issue Mar 12, 2015 · 1 comment
Open

add optimizer using a genetic algorithm #90

rochaporto opened this issue Mar 12, 2015 · 1 comment

Comments

@rochaporto
Copy link
Owner

This is a really good description:
http://natureofcode.com/book/chapter-9-the-evolution-of-code/

And as a summary...

Population. Start with a variable number of random candidates

Fitness. Function evaluating the gene's fitness. Distance, prob squared or 2^distance so that we get an exponential increase for better solutions

Selection. Based on fitness. Should be a roulette wheel with the fittest candidates having a higher selection probability

Reproduction. Crossover between 1, 2 or even more parents. Take random position and take each side from a different parent.

Mutation. For each point mutate based on a probability, which should be low. Guarantees randomness when start population was bad

Play with population number and mutation rate to evaluate best results.

Genotype is the internal representation of a candidate. Phenotype the visual one

@rochaporto
Copy link
Owner Author

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

No branches or pull requests

1 participant