A simple Evolutionary Algorithm to guess any word.
Dev'd with Eclipse 4.6.2 in Windows 10.
Repo: https://github.com/Vichoko/evolutionary-guesser-of-words
- JavaSE-1.8 (or similar)
- JUnit 4 (optional; for tests)
- (Optional) Customize word and other variables in darwin.Evolution.java.
- Run darwin.Evolution.main method.
- Watch evolution in console. At the end, shows the generations counter and final product.
static String targetWord = "supercalifragilisticoespiralidoso"; // word that represents the max fitness
static int populationSize = 1000; // quantity of individuals at each generation; constant
static double mutationRate = 0.05; // probability of mutation for each gene