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.
IgnacioGarcia198/GeneticAlgorithm
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.
C++