Skip to content

This is a genetic algorithm I made in C++, compiled for Linux and for Android as .apk. It is a didactic example with a couple of integers as population, and the goal is to optimize the sum of those numbers to get a requested result.

Notifications You must be signed in to change notification settings

IgnacioGarcia198/GeneticAlgorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Please note this application can be run on Linux ("main" file) and on Android ("Main_1.0.apk").
In Android just copy it to your phone, open it and change the security settings if
prompted.

Working sequence:
1. Write the target number, that is, a result we are asking the program to find. Press intro.
2. Write the number of addend to add in order to get the result. Some reasonable value could be 50. Press intro.
3. Write the number of generations, this is, how long we give the program to evolve
trying to achieve the given result adding the given number of addends. Some reasonable value could be 100. Press intro.
4. Now wait for the program to calculate the result, some numbers will display on the
screen, and maybe it will get slow and appear that it has stopped. It is not like that,
just leave it for a few seconds to calculate.
5. See the result: The second last number appearing on the screen is the result. Does
it match the asked result? The rest of the numbers after the binary ones are the 
addends the program came across.
Please note the program starts with random values and goes evolving.
Any doubt contact me on ignaciogarcia198@gmail.com.
 

About

This is a genetic algorithm I made in C++, compiled for Linux and for Android as .apk. It is a didactic example with a couple of integers as population, and the goal is to optimize the sum of those numbers to get a requested result.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages