Slashdot Mirror


Beyond Dvorak via Genetic Algorithm

ColonelPanic writes: "I switched my computer keyboard to the Dvorak layout about a year ago. But now I've gone and done something really outlandish. I tried to discover the most efficient layout possible with a genetic algorithm. It's weird-looking, but I am typing with it now. I put the gory details up on the Web."

14 of 384 comments (clear)

  1. Problem with switching by wikki · · Score: 3, Insightful

    ok, so lets say that you do switch and start using your new fancy keyboard layout. How long will it be before you forget how to type on a qwerty keyboard? Think of the trouble you will be in when you try to use someone elses keyboard. Plus programs, like video games, that come with keys programmed to do certain tasks are usually setup to keep the keys together on a qwerty keyboard, and will have to be remapped every time you install a game. Lastly, my hands have never gone numb from typing on a qwerty keyboard.

    1. Re:Problem with switching by nekron-99 · · Score: 2, Insightful

      you need to take care of this immediately. you ust take at least a 5 minute break every 1/2 hour of keyboarding. you must stretch your forearm muscles at least 3x per day. you must try a better keyboard like the kinesis classic. you must buy "repetitive strain injury a computer users guide" to learn all about correct typing and pacing. if you don't do these things, you will end up like me with sever tendonitis/muscle inflammation. you don't want to go there. every coder that i know has developed problems at some time or another. lots of people where i work have severe problems and must use voice activated software. some even have to have surgery. take care of this problem before it gets worse.

  2. This genetic algorithm doesn't have sex by XNormal · · Score: 5, Insightful

    According to the description in the article the algorithm has random seeding, mutations, a ranking function and survival of the fittest - but it doesn't have genetic exchange. New layouts are not chosen as combinations of two or more existing layouts.

    Genetic exchange is very important for rapid evolution. The Earth was just a big bacterial soup for two billion years. Then sex was invented and then things started to get more interesting very quickly.

    --
    Stop worrying about the risks of nuclear power and start worrying about the risks of not using nuclear power.
    1. Re:This genetic algorithm doesn't have sex by ajs · · Score: 5, Insightful

      I find it interesting and somewhat disappointing that the parent article was moderated funny just because it used the word sex. Exchange of "genetic" material is not always a part of genetic algorithms, but it's certainly an "interesting" topic in that context and it was fairly "insightful" of XNormal to bring it up.

      Oh well.

    2. Re:This genetic algorithm doesn't have sex by littleRedFriend · · Score: 2, Insightful

      Since he had so many scoring rules. I'm sure he could have gotten to the same or even better results with a dynamic programming algorithm in less time and lines of code.
      If it was really a genetic algorithm he would have measured the real-life performance of all the layouts himself (that's what the real goal is), and use this information to select the ones that go to the next round.
      Now, it is just an optimization problem treated in a silly heuristic way.

      --
      IANAL, but imagine a beowulf cluster of in Soviet Russia all your belong are base to us welcoming the new SCO overlords.
  3. Vindication... by Junta · · Score: 4, Insightful

    His little test is a neat idea. The one potential cause for concenr I could see would be that he was influenced by literature praising dvorak in defining penalties for various tasks. I personally think the penalities are likely accurate, but to a QWERTY advocate, research that show dvorak is bette rby using dvorak based criteria would be begging the question...

    That aside, I really agree that dvorak is a better keyboard layout, and his final layout's resemblance to dvorak testifies to the advantage of dvorak. I've never been able to type fast at al in QWERTY, and it always hurts quickly (unless I hunt and peck, which is my general method). With dvorak I can touch type comfortably for a long time, and much faster as well. While his final keyboard layout may be marginally better than dvorak, dvorak remains the better choice for much the same reason qwerty is used, you can set up a dvorak layout on almost any system and os, but with this funky layout, you need to be running X....

    --
    XML is like violence. If it doesn't solve the problem, use more.
  4. Re:Call me ignorant if you like... by r0b0t+b0y · · Score: 3, Insightful

    then do it

    --


    ----
    i do not use drugs, i AM drugs -- Dali
  5. Alternative Text by peterdaly · · Score: 3, Insightful

    I wonder what would come out of the genetic algorithm if "first post!" was the text that what used as the sample.

    Seriously though, I type nothing like Shakespear or the text in KJ Bible. I can hardly even understand the KJ Bible.

    This also brings up the topic of purpose built keyboards. Would a "Linux Kernel Hackers Keyboard" fed by the kernel source be much more efficient than QWERTY? For that matter, could each programming language have a "most preferred" layout? How about professions?

    I would be very interested to know how much the keyboard changed as different texts were put into it. Also what the increased profficiency was over other keyboards in the "set."

    -Pete

  6. Re:Good for you by AgTiger · · Score: 3, Insightful

    It may not be all about speed for him. From the second paragraph of the article:

    > I used to feel a numbness of the backs of my hands after a long day with QWERTY,
    > but I don't with Dvorak.

    I type at over 100 WPM on a QWERTY keyboard, and I had much the same thought as you ("I'm fast enough, why bother?") However, when I read his statement implying that QWERTY may cause tendon/muscle fatigue more than DVORAK, I saw for the first time why I _might_ want to make the effort to teach my brain another key-mapping.

    Something to balance it all out though: the frustration of trying to break nearly two decades of learned experience as to where those keys are might just kill me, and I doubt I'd see much benefit to a different key-mapping then. ;-)

  7. Re:True story from support desk hell by Hollins · · Score: 4, Insightful

    Actually, I think this is a good example of how product design should be driven by observing how people try to use things. A physically-remappable keyboard could be a good thing. I'd probably buy one.

  8. C code? by ForceOfWill · · Score: 5, Insightful
    I limited this experiment to the 30 keys under the four fingers of the two hands. They include the 26 letters of the English alphabet and four punctuation symbols (comma, period, quote, and semicolon). (A QWERTY layout typically has the slash in this region instead of quote.) Other punctuation was ignored. ... I also needed a corpus of sample text... I added... about 100,000 lines of C code.
    Am I the only one who thinks optimizing for C code is silly when you ignore vital symbols like braces, brackets, and numbers even? At least he included the semicolon.
    --

    --
    Seeing is believing; You wouldn't have seen it if you didn't believe it.
  9. Re:Call me ignorant if you like... by Phibian · · Score: 3, Insightful

    When I was in grade nine, I did a science fair project on the relative efficiencies between a QWERTY and DVORAK keyboard. We measured the distance between each key, and came up with the amount of work required to press each key depending on age/gender (in those days keyboard manufacturers weren't publishing their "springyness" stats yet). Then we took various pieces of text (eg entire works of Shakespeare, various essays and stories, various common phrases that use all the letters in the alphabet such as the quick brown fox etc) and ran it through an analysis program we'd written for the purpose.

    It was pretty neat. Dvorak was the hands down winner for plain old English, but Qwerty was *much* better for Inuktitut (lots of k's and q's). We also looked at french, german and spanish samples, but I don't really remember how things stacked up (it was a while ago). I think Dvorak was very slightly better for most, although it depended on what you were typing.

    Based on this project, I switched keyboard layouts. And then I found I couldn't touch type in Qwerty anymore. Apparently this is not unique - most people have difficulty remembering more than one or two keyboard layouts. So I would think that a layout that would change depending on what you were doing would be a nightmare.

    Really, what would be ideal is to measure how much work it is for you personally to use each finger and get a sampling of your personal typing patterns, and then just go from there. As the original poster commented - the ideal keyboard may not be the most efficient, since you have to take into account how easy it is to work with. And I would think that how easy it is to work with includes how easy it is to remember :)

  10. He didn't use a genetic algorithm. by leastsquares · · Score: 3, Insightful

    The algorithm he used was NOT a genetic algorithm, although it could be called an evolutionary algorithm. comp.ai.genetic FAQ

  11. Re:Universal in a very limited universe by valmont · · Score: 3, Insightful
    Actually, it is NOT proper french to write capital letters with accents or other character/pronounciation modifiers. Capital letters in french are immutable.

    That is, at least, the theory.

    Also keep in mind the poster's experiment was *not* meant to cover any other languages but english. That is precisely why he only used pieces of english litterature in his experiment. Anyone with half a brain can understand and accept the fact that each language is most likely to require its own optimal keyboard layout.

    Additionally, while the result of his algorithm fits an arguably "limited" universe (face it pal, english is the *only* language worth writing in the universe, and i'm a native french myself), the algorithm itself, or at least the basic theories behind it, can be considered fairly universal eventhough one might want to tweak it to their own needs.

    Now let's see if you can re-use/adapt his code for other languages you care about.