Skip to content

Find the most efficient keyboard layout using the genetic algorithm.

License

Notifications You must be signed in to change notification settings

roket1428/klena

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

klena (also known as project-e) License: GPL v3

Find the most efficient keyboard layout using the genetic algorithm.

How It Works?

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.

Calculating The Fitness Score

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.

Status

  • Most features are implemented.
  • GUI and the main logic is working.

TODOs

  • 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.

About

Find the most efficient keyboard layout using the genetic algorithm.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published