Developed a Genetic Algorithm API designed to solve the problem of finding the decryption key of a cipher text for my OOP class project. Implemented various topics in Java, such as abstract classes, interfaces, generic classes, methods and containers, and exception handling.
The API is made up of abstract classes and interfaces that allow any programmer to implement their own techniques of representation, selection, crossover and mutation. It also includes the following implementations:
- Individual with a character array genotype and phenotype.
- Selection by tournament.
- Crossover with crossover point.
- Mutation by swap.
- An objective function using frequency analysis.
The GA has an average 92% success rate using a 20% mutation probability, 65% crossover probability and a population size of 500 and generation count of 500.