https://github.com/twhughes/genetic_algorithm
Genetic algorithm to evolve a bit string to represent a specific numeric value.
https://github.com/twhughes/genetic_algorithm
Last synced: 3 months ago
JSON representation
Genetic algorithm to evolve a bit string to represent a specific numeric value.
- Host: GitHub
- URL: https://github.com/twhughes/genetic_algorithm
- Owner: twhughes
- License: mit
- Created: 2017-08-15T15:53:08.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-25T22:18:56.000Z (over 7 years ago)
- Last Synced: 2025-01-20T20:35:09.336Z (5 months ago)
- Language: Python
- Homepage:
- Size: 1.95 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple-Genetic-Algorithm
Genetic algorithm example.## Problem Statement
Each organism contains a 'DNA' string consisting of 0's and 1's.
This DNA string can also be represented as a non-negative integer in binary notation.The fitness of an organism is defined by how close this integer is to a target value.
## Optimization Procedure
A population of organisms is randomly generated.
Out of these organisms, a certain percentage is 'killed'.
The remaining organisms now 'mate' with each other by crossover of their respective DNA strings.
Mutations of individual entries of the DNA strand may now occur at random.
These resulting children now fill the population and this process is repeated.## Results
After several iterations, the population is filled with organisms with integer values close to the target.