Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ariG23498/GeneticAlgorithm
Genetic algorithm implemented in a fun way.
https://github.com/ariG23498/GeneticAlgorithm
genetic-algorithm python3
Last synced: 3 months ago
JSON representation
Genetic algorithm implemented in a fun way.
- Host: GitHub
- URL: https://github.com/ariG23498/GeneticAlgorithm
- Owner: ariG23498
- Created: 2018-10-14T17:32:16.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-10-11T12:54:24.000Z (about 4 years ago)
- Last Synced: 2024-05-01T14:34:38.088Z (6 months ago)
- Topics: genetic-algorithm, python3
- Language: Python
- Homepage:
- Size: 13.7 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Genetic Algorithm
This code base is built for the basic understanding of the Genetic Algorithm. The problem statement is to evolve characters and finally obtain a valid word. The optimization takes place with the help of evolution. The [video series of GA](https://youtu.be/9zfeTw-uFCw) has helped me understand the concepts to a great extent.
The three key points to remember are:
1. Heridity - Crossover
2. Variation - Mutation
3. Selection - Natural SelectionTo achieve the desired results here is the mental map of the procedures:
1. Create a population with random genetic material.
2. Calculate the fitness of each of the individuals in the population.
1. Choose `2` parents with respect to the probability.
2. Crossover the genetic material. (Choice of procedure to crossover is subject to further inspection)
3. Mutate the genetic material of the off spring. (The probability of mutation is subject to further retrospection)## Folder Structure
1. **organism.py** - This file holds the code for an individual organism. An individual organism will have the properties of its own. The properties that we are dealing here are the number of genes, a list of all the genes and the fittness score. The behaviour of an individual is to calculate the fitness, crossover with another `partner` and to be able to mutate the genes.
2. **population.py** - THis file holds the logic of the popultationEach of the files are provided with their corresponding `test` files. Feel free to suggest any changes in the repo.