Find the most efficient keyboard layout using the genetic algorithm.
Klena uses genetic algorithms' main principles.
- Create a population consisting of 10 randomly generated layouts from the gene pool (abcdefghijklmnopqrstuvwxyz[];',./<)
- Calculate a fitness score for each layout.
- Create 10 offspring from the two fittest layouts (the lower the fitness score, the better).
- Calculate the fitness score for the new generation and continue to the last step.
Fitness score calculation simulates key presses while looping through the dataset.
- First, it calculates the finger travel distance by using a hard-coded weighted graph (assuming 8 fingers at the home row).
- Then it checks for the biagrams and reduces the score accordingly.
- After that the key bias (according to the physical locations of the keys) and the same finger bias (repetitive usage of the same finger) is added.
- Most features are implemented.
- GUI and the main logic is working.
- Normalize and balance the fitness score.
-
Reduce the dataset size by using proper dimension reduction techniques. -
Multi-core implementation of the fitness calculation function. -
Fix indentation and naming inconsistencies. -
Handle command line arguments. - Write unit tests.
-
Use proper logging methods.