Home > Math > My Current Genetic Algorithm Program

My Current Genetic Algorithm Program

Here is my genetic algorithm program, written in Ruby.

When you open keyboard_score.rb, you will see a part that says

64.times {

Change that number to change the number of initial layouts that are generated.

Farther down it says:

while @best_layout_count 13.7215686882507, “rowskipcount”=>2419, “handcount”=>50803, “chars”=>257999, “fingercount”=>9697

amuseum score: “score”=>8.25649324222187, “rowskipcount”=>7249, “handcount”=>42227, “chars”=>257999, “fingercount”=>5410

arensito score: “score”=>7.8785886767003, “rowskipcount”=>5765, “handcount”=>42782, “chars”=>257999, “fingercount”=>2872

capewell score: “score”=>7.81765316553373, “rowskipcount”=>8658, “handcount”=>35671, “chars”=>251411, “fingercount”=>2918

klausler score: “score”=>7.4888546079636, “rowskipcount”=>5486, “handcount”=>32517, “chars”=>257999, “fingercount”=>2427

ddvorak score:”score”=>7.28595847270726, “rowskipcount”=>2531, “handcount”=>27180, “chars”=>257999, “fingercount”=>5448

colemak score: “score”=>7.21897371695239, “rowskipcount”=>4894, “handcount”=>31334, “chars”=>257999, “fingercount”=>2270

Not surprisingly, DDvorak scores lowest on handcount. But I was a bit surprised to find that QWERTY scored the lowest on rowskipcount, which has been redefined. The possibilities aren’t exactly plentiful.

qs sq dr rd uk ku lp pl xq qx cr rc u, ,u .p p.

None of which are common, and many of which will never occur. SQ is very rare; the only examples I can think of are squish, squeamish and squirm, none of which are at all common words. Probably about 50% of these are from CR, from words such as cream, crack, and describe.

Back on topic, the 2nd best on row skip count is DDvorak, and everything else is far behind. Colemak does best on same finger, even better than Arensito, which came in second. Capewell makes a close third.

Categories: Math
  1. July 4, 2013 at 12:30 am

    At this moment I am going to do my breakfast, later than
    having my breakfast coming again to read additional news.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: