https://github.com/caneroj1/genetic
experimenting with genetic algorithms
https://github.com/caneroj1/genetic
Last synced: about 2 months ago
JSON representation
experimenting with genetic algorithms
- Host: GitHub
- URL: https://github.com/caneroj1/genetic
- Owner: caneroj1
- Created: 2014-05-12T21:13:16.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2014-05-14T23:14:14.000Z (about 11 years ago)
- Last Synced: 2025-02-03T11:47:55.585Z (4 months ago)
- Language: C++
- Size: 195 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
genetic
=======I'm experimenting with genetic algorithms because they're pretty cool.
I found this interesting resource at http://www.ai-junkie.com/ga/intro/gat2.html that talks a bit about genetic algorithms, serving as a nice overview, but they also posed an interesting problem to exercise understanding of genetic algorithms.
The problem reads: Given the digits 0 through 9 and the operators +, -, * and /, find a sequence that will represent a given target number. The operators will be applied sequentially from left to right as you read.
So pretty much a chromosome in this "population" is a series of bits, where groupings of 4 bits represent a gene, encoding either a digit in 0-9 or one of the arithmetic operators.
A genetic algorithm will apply the principles from the Theory of Evolution in order to take a population of chromosomes and evolve them until one of them approaches the solution. One of the main challenges encountered so far was parsing the chromosome in order to derive an expression that could be evaluated arithmetically. The value of that expression is used to compute the fitness of each chromosome.
There is still a lot to be implemented in this project, especially crossovers, mutations, and the actual evolution parts.