Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Hardware

Beyond Dvorak via Genetic Algorithm 389

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."
This discussion has been archived. No new comments can be posted.

Beyond Dvorak via Genetic Algorithm

Comments Filter:
  • Genetic? (Score:3, Funny)

    by Anonymous Coward on Saturday July 06, 2002 @08:35AM (#3832415)
    ADT GAC CCG AGA TAA CGA

    What happens when you need a different letter?
  • by Anonymous Coward on Saturday July 06, 2002 @08:42AM (#3832441)
    I used a genetic algorithm to figure out the best way for arranging my feet when I walk.

    Results:

    left

    right

    left

    right...

  • by Ignorant Cocksucker ( 584160 ) on Saturday July 06, 2002 @08:43AM (#3832443)
    But wouldn't the perfect keyboard layout change dependant on what one was actually typing ? E.g. some languages make more frequent use of certain letters compared to others.

    I can imagine Lisp programmers would want the parentheses '(' and ')' keys to be in a more accessible place than above the 9 and 0 characters.

    What do other think - Should keyboards be dynamically reconfigurable dependant on the programming language in use ?

    • What would be nice is a program on a floppy disk (ok, on a USB storage device keychain these days) that you just plug into the computer you're using, and it remaps the keyboard to your preferred style.

      That is NOT a difficult thing to do, if you want to do it...

      Kevin.
    • 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 :)
  • by Hollins ( 83264 ) on Saturday July 06, 2002 @08:49AM (#3832465) Homepage
    I appreciate that he uses a lot of text for analysis. Ten years of email and C++ code are nice additions. However, the inclusion of the King James Bible and a few other works may have skewed the results somewhat, as shown by the presence of the word "thou" in the most-often used words list.
  • by wikki ( 13091 ) on Saturday July 06, 2002 @08:50AM (#3832468)
    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.
    • You're right that you can forget how to type on qwerty. How long it takes can vary widely based on usage patterns.

      As a Dvorak user, I like to think that I've come up with an interesting solution (though certainly imperfect). Every keyboard I have to use in public always seems to be the flat, traditional style qwerty keyboard. My home keyboard is a natural keyboard using Dvorak. After a month or two getting used to Dvorak on the natural, I discovered that I could get myself to subconsciously switch between Dvorak and qwerty when i switched between natural and flat keyboards, based on its feel under my hands. At this point, I've been using Dvorak for about 2 1/2 years. I can switch pretty comfortably and accurately between the two styles, and the initial stumbling around when switching has gone away virtually completely.

      This association of keyboard layout with keyboard shape does have its problems. I do have to use qwerty on a natural keyboard occasionally, and it really throws me off. Fortunately, this doesn't happen often for me.
    • Yeah...let's say you do get used to your nice Linux operating system. How long before you have to go use someone else's running Windows?

      So your argument is that you should give into the majority, accept an inferior product?
  • by lizzybarham ( 588992 ) on Saturday July 06, 2002 @08:52AM (#3832475)

    That web page has some messed up links going to it's own filesystem:

  • by jafuser ( 112236 ) on Saturday July 06, 2002 @08:54AM (#3832484)
    The problem I've had with non-qwerty keyboards is that unix seems to be designed for qwerty, as you'll notice most of the common commands (ls, ps, pwd, cd) seem to be fairly "comfortable" to type, whereas when I was playing around with using dvorak once for a few weeks, it just felt much more awkward to type unix commands.
    • Simple. Just use the unix 'alias' command to remap the most common commands to sequences of letters that are more comfortable.

      Givem the large number of unix commands, the trick would be picking a new sequence that is not already used (and still nice to remember).

      Although remembering the new words is possibly not such a big deal - I used to use a password that I could not actually remember the letters for, but I could remember the sequence of keys on a QWERTY keyboard. Imagine me trying to use that on another layout!
    • unix seems to be designed for qwerty

      I can't really agree. Unix seems to be designed for terse abbreviations and acronyms, but I can't find much correlation to qwerty.

      Ok, ls is a loss on Dvorak. I used to mistype it as rn all the time, which sucked on systems that had the rn newsreader! I created an alias that printed "You don't really want to run rn!".

      But your other examples--ps, pwd, cd--are objectively easier on Dvorak, in my analysis. Not that they would win any prizes on either.

      By the way, even the vi keys--hjkl--work pretty well in Dvorak. h is nicely situated below the right index finger, jk are adjacent and easily accessible to the left index finger--and to go right, I'd rather hit space!

      I conclude that Ken, Dennis, and Bill were secretly Dvorak users. :-)

  • by Ridge ( 37884 )
    The code: http://www.visi.com/~pmk/evolved.tar.gz
    pdf: http://www.visi.com/~pmk/evolved.pdf
    the experiment run: http://www.visi.com/~pmk/evolved.output

    strangely the keyboard map is correct... :)
  • by orangesquid ( 79734 ) <orangesquid&yahoo,com> on Saturday July 06, 2002 @08:57AM (#3832492) Homepage Journal
    You know what I really should do? There are certain words I *always* mistype with QWERTY, and I'm convinced it's partly the fault of the layout... I should use a genetic algorithm that evaluates based on speed *and* on letter arrangement, somehow. Not sure how to do this... but right now I'm running this command to see what words I mispell most often when using instant messenger:

    nice cat ~/.gaim/logs/*.log|fgrep 'me:'|ispell -H -l|sort|uniq -c >~/badwords 2>/dev/null &

    I love UNIX.
    • by Anonymous Coward
      There are certain characteristics that cause common typos with touch typists. If it's a common word, so people type it quickly without thinking, and it alternates hands each letter, particularly with the forefinger or middle finger, then the odds of swapping two letters is greatly increased. For example, "teh" for "the," or "grils" for "girls." Within the same hand, accidental swaps like that almost never occur. I think it's that your brain anticipates but mis-estimates when a keystrike will occur, and launches the next keystrike based on that anticipation...between hands you have a longer datapath in the brain, or perhaps a junction between brain hemispheres, which probably takes longer to process the "push finger, okay finger was pushed" signals than is needed by the next finger command to maintain a fast typing speed.
  • by XNormal ( 8617 ) on Saturday July 06, 2002 @09:01AM (#3832507) Homepage
    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.
    • 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.

      Just a side note, but bacteria do have sex. It's not necessary for reproduction, of course, and they only exchange a limited amount of genetic information in each exchange, but they do conjugate and exchange plasmids. In fact, they're remarkably promiscuous, exchanging genetic data with very little regard for things like the species of bacterium they're exchanging with.

      It turns out that this is a major problem, because it's a key way for bacteria to develop unpleasant features like antibiotic resistence and infectiousness. They don't necessarily evolve those things from scratch. Instead, a whole package of nasty features that have evolved slowly over time- like multiple characteristics that make a bacterium an effective infectious agent, or a whole suite of proteins that convey resistence to a particular antibiotic- can be transmitted in a single genetic exchange. That lets harmless bacteria rapidly change into nasty ones without having to evolve that way from scratch.

    • Yes! Best of all, if you have a sex-based algorithm, you can seed it with just two sets, an Adam and an Eve, if you will. These would be, of course, the QWERTY and DVORAK sets. You should still end up with a result superiot to both, that you could brag to be the (un)natural decendant of the two sets!

      • result superiot to both

        Yes ... there are some issues with qwerty.

      • an Adam and an Eve, if you will. These would be, of course, the QWERTY and DVORAK sets

        Out of curiosity, which layout do you see as Adam and which as Eve?

      • Yes, but what if the father Saturn (QWERTY) starts to eat the children because he knows that one of them will one day overtake him and become the most powerful keyboard layout in the universe? All of the new keyboard layouts would be consumed, and the mother Rhea (DVORAK) would become very unhappy that all her children were being eaten. So, she would remedy the situation by feeding QWERTY a fake child/keyboard layout, perhaps just a random one that perhaps resembles a rock that in turn resembles a baby. Once QWERTY consumes this rock/keyboard layout, the new baby keyboard layout, let's call him "Jupiter," would be left to be raised somewhere out in the wilderness by nymphs of some sort. After many years, once Jupiter has honed his skills, he could come back and vanquish his father QWERTY, thus fulfilling the millenia-old prophecy for a second time.

        How's that?
    • by ajs ( 35943 ) <ajs.ajs@com> on Saturday July 06, 2002 @09:36AM (#3832633) Homepage Journal
      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.
    • 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.
    • The algorithm in the article is actually a cousin of GAs called an evolutionary algorithm. Typically, GAs have crossover (sex) where genetic material from multiple parents is combined. This would be easy to do with the keyboard layout problem, and would probably produce better results.

      Often, EAs work better with smaller populations (~100-500) and GAs work better for larger populations, but that's more anecdotal than rigorously shown.
  • Different people would have different text samples that are representative, and possibly slightly different rules for evaluating the costs (although this would be very hard to quantify) ...

    Just imagine all the slashdotters optimizing their own keyboard layout to their own individual circumstances ... no two keyboard layouts alike.
    • I can see smartcard-enabled keyboards. You walk up to a strange computer, put in your smartcard and it authenticates you, not only giving you access to your files, but also changing the keyboard layout to your personally optimized layout.

      Then again, the 'strange' computers would have to record all keystrokes in order to keep the keyboard layout optimal.. I see some privacy complaints though.
      • > Then again, the 'strange' computers would have to record all keystrokes in order to keep the keyboard layout optimal.. I see some privacy complaints though

        I don't quite see this - you wouldn't want your personal keyboard layout to evolve (unless there was a particular problem that needed addressing), because there is a bit investment in learning to type on a partiular layout. You'd train it once with your best guess as to usage, and only retrain if the version you were using was unsuitable enough to make it worth going through the learning curve again.
  • by mrneutron ( 61365 ) on Saturday July 06, 2002 @09:04AM (#3832514)
    A friend does PC support (including telecommuter support) for a large retail company. A woman called in, to say that her home PC was acting stangely, and not typing the keys she pressed.

    My friend went to her house with a new keyboard. When he looked at the old one, he saw that the keys were arranged alphabetically. with 'a' where the q is supposed to be, 'b' where the w is, etc.

    She explained that she was having trouble finding the keys, so she rearranged them so she could find them easier.
  • by snowtigger ( 204757 ) on Saturday July 06, 2002 @09:06AM (#3832521) Homepage
    Nice work.

    I am working on a similar project: to create an international (european languages) dvorak-like layout for programmers or multi-lingual people.

    In Europe, there is about one qwerty-type layout for each language or country. Most languages have some special characters (èàéüäö etc). If you want to use characters from another language, it may not be possible or require some special (difficult to remember and different for each layout) sequence.

    What I am looking for is direct access to all special characters used by swedish, french, german, italian, spanish and programming languages (èàéäüö[]{}$# etc). Using dvorak as basic layout to build upon.

    I will post more on this as soon as I have finished (after summer vacations)
  • by Phoenix-kun ( 458418 ) on Saturday July 06, 2002 @09:08AM (#3832526) Homepage
    We had a concerted effort at my company years ago to see if the Dvorak keyboard would improve performance for randomly selected users. It failed. Any difference in performance was offset by the difficulty in switching back to the Qwerty away from the workplace.

    Until a completely new input system comes around, we're stuck with the Qwerty for better or worse.
  • Vindication... (Score:4, Insightful)

    by Junta ( 36770 ) on Saturday July 06, 2002 @09:09AM (#3832528)
    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....
    • I had the same thought about the feedback between the Dvorak layout and the final layout, but to me that invalidates your statement that "his final layout's resemblance to dvorak testifies to the advantage of dvorak." It may testify much more to the power of skewing a test, and how easy it is to get the results you expect, regardless of their validity. I'm not saying Dvorak isn't good, but rather that this guy's test wouldn't qualify as good science (not that it's meant to be, I guess).

  • Genetic Algorithms (Score:3, Informative)

    by gfilion ( 80497 ) on Saturday July 06, 2002 @09:09AM (#3832529) Homepage

    It is a good thing to remember that genetic algorithms are not garanteed to converge (generate the best layout). Also, the author doesn't seem to make the best layouts reproduce; it seems to me that this is one of the key features of genetic algorithms, so he may be missing some good layouts out there.

    For those interested in genetic programming, OpenBeagle, a very good genetic programming program is available at http://www.gel.ulaval.ca/~beagle/ [ulaval.ca] It's made in C++ and it's LGPLed.

  • by Apreche ( 239272 )
    You wasted a lot of time and effort finding a way to remap the keys on your keyboard to allow yourself to type faster. But you know what? Who needs to type faster? I mean, I know how to type on a QWERTY keyboard, and I can do it pretty well. The time it would take me to get used to a new layout would be greater than the time I would save by typing that little bit faster. Once you are typing fast enough, that's fast enough. Unless you plan on typing a copy of War and Peace.

    While I believe you wasted a lot of time and typing faster is silly, I do think that we can apply your program to other things. For example I could log keypresses during games of counter-strike and possibly find a better key layout for myself based on my style of play. Pretty much anything we want to find the best of. Maybe we could possibly apply this to networking to map the network in the best possibly configuration for speed based on bandwith.

    Good ideas that could be used to achieve better, useful, goals.
    • Re:Good for you (Score:3, Insightful)

      by AgTiger ( 458268 )
      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. ;-)

  • by Rui del-Negro ( 531098 ) on Saturday July 06, 2002 @09:18AM (#3832562) Homepage
    All these layouts and evaluations are based on a) american keyboard layouts and b) the English language.

    Even the regular QWERTY layout has some differences in other languages (ex, the 'Ç' in portuguese keyboards, the 'Ñ' in spanish keyboards, etc.), and the letter frequency is completely different. Most languages don't use the 'W' at all, and very rarely use the 'K'.

    Most languages also have some specific 2-letter sequences that don't appear in other languages. In English you have 'th' and 'wh', for example. In Italian you have 'gl' and 'gn', in Spanish you have 'll', in Portuguese you have 'lh' and 'nh', etc.. These can make a big difference to the "perfect layout".

    There are also some ridiculous mistakes such as the official french keyboard (which is AZERTY, and not QWERTY, BTW) not having the capital letter 'Ç', meaning you can't type 'Ça va?' (a very common sentence, meaning 'How are you doing?'). In the portuguese layout, the 'Ç' is a separate key, so you can use it to type 'ç' or 'Ç' (with shift). When I was working in Paris a couple of years ago I often wished I had my portuguese keyboard, not only because I'm used to QWERTY and kept making mistakes on their AZERTY keyboards, but also because it's actually easier to type in French with a portuguese keyboard.

    Personally, I'm quite happy with the QWERTY layout; I would only change a couple of letters.

    But I do wish people who write software would realise not everyone in the world uses the same keyboard layout they do, and that in other countries the same signs are often in different keys, making some key combinations impossible (ex., in the portuguese keyboard. the signs '[' and ']' are typed by pressing AltGr+8 and AltGr+9, or Ctrl+Alt+8 and Ctrl+Alt+9. So, when a program assigns some function to the combination Alt+[, it usually won't work on portuguese keyboards). Even worse are the programs (games, especially) that read they key's position instead of the character. So I press '' and get '=', I press '\' and get '~', I try to type 'ã' and get '\a', so on.

    [sarcasm]

    And of course, no keyboard is complete without the Windows "system keys"...

    [/sarcasm]

    RMN
    ~~~

    • The 'french' always have there own quirky systems.
      e.g.
      Metric
      Secam
      Montreall
      There own special time.
      The own 0' latitude (well they wanted it!)
      There own language (i.e. They hate slang from other languages creeping into french).

    • And of course, no keyboard is complete without the Windows "system keys"...

      You are kidding right? One thing I love about my thinkpad keyboard (beside the fact that it's has a nice touch) is the fact that IBM doesn't put these stupid Windows keys on the keyboard.

      PPA, the girl next door.
    • You're absolutely correct that it's dumb for game designers to use key position rather than the designated character output. That makes things unnecessarily hard for furriners such as yourself.

      However, expecting people to know that alt-[ is difficult to type in other countries isn't really fair either. Some software is made by companies small enough that they don't have the resources available to make a database of all the different keyboard layouts in the world and check if their program is gonna be convenient on all of them.
    • 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.

  • QWERTY Standard (Score:2, Interesting)

    by EnsilZah ( 575600 )
    QWERTY is a standard, all the schools, businesses and all other public facilities have them, maybe you could bring one to work, that's about limits your possibilities when you're outside your house. If you had a keyboard with E-Ink on the key tops, which every user could map as he/she pleases, you could get this to work, but which School/Business/Public facility would spen extra money on something they're sure no one would use ?
  • Alternative Text (Score:3, Insightful)

    by peterdaly ( 123554 ) <petedaly@ix[ ]tcom.com ['.ne' in gap]> on Saturday July 06, 2002 @09:29AM (#3832604)
    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
    • Re:Alternative Text (Score:3, Interesting)

      by shlong ( 121504 )
      FreeBSD 5.0-CURRENT
      corpus:
      find /usr/src -name "*.[ch]" -type f -print |xargs cat

      201511526:
      g u x , ; m l d f p
      c e i a o h r t s n
      q ' y . j z k b v w

      Notice the de-emphasis of the 'g' key ;-)
  • uh-oh. you know, if jwz [jwz.org] was annoyed by all the keyboards out there when he wrote xkeycaps [jwz.org] a few years of people messing with this and submitting their own keyboards should really piss him off [jwz.org].
  • C code? (Score:5, Insightful)

    by ForceOfWill ( 79529 ) on Saturday July 06, 2002 @09:40AM (#3832658) Homepage
    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.
  • AND different results for different typists too.

    What I liked most about this experiment is that the author did acknowledge the fact that the ideal keyboard will depend on the kind of input he'll have. Still, I'd have preferred to have separate tests - one for regular text (the bible and the novels), another one for his e-mails and yet another one for code.

    Personally, I COULD live with two different keyboard mappings - one for plain text and one optimized for coding in language X (again, it wouldn't be the same optimal keyboard for, say, Perl or Java or XML or Lisp, etcetera).

    Back in my day, the keboards we had at the PC lab in my university had two different key mappings painted at the keys themselves - the spanish mapping in large black and the english one in little blue - this was very useful because the Ultrix servers we had at the time did NOT have support for international keyboards, only the US mapping was.

    It'd take a lot of thought and training, but it could be done.
  • by Hollinger ( 16202 ) <michaelNO@SPAMhollinger.net> on Saturday July 06, 2002 @09:59AM (#3832730) Homepage Journal
    IBM did this in 2k1 for PalmOS PDA's, and called it ATOMIK [ibm.com] (Alphabetically Tuned and Optimized Mobile Interface Keyboard). It's from our Alphaworks, and is designed so that it has:
    1. Higher movement efficiency than any other existing touch keyboard.
    2. Alphabetically-tuned layout: Generally, letters from A to Z run from the upper left corner to the lower right corner of the keyboard. This layout helps novice users find letters that are not yet memorized.
    3. Letter connectivity of common words: Many common words or comment fragments of words, such as "the" and "ing" are totally connected.

    You might want to take a look at http://www.almaden.ibm.com/u/zhai/topics/virtualke yboard.htm [ibm.com] and scroll down for a list of very good research papers.
  • by Karpe ( 1147 ) on Saturday July 06, 2002 @10:03AM (#3832739) Homepage
    ...it was a Ask slashdot submission, and read: "I swtchrd my computre keybord to teh Dvorka layoot bout a yaer ago. But nbw I've gonn nad donn somethng raelly ouhlnadsh. I trid to discovr teh most efffcinet layoot posibel wth a getetic algorthm. It's wetird-lokng, but I m typnig wth ti noow. I ptu teh gorry detials up on the Web. Wht I sak is hw teh ehll do I chnage ti bak?!
  • by pslam ( 97660 ) on Saturday July 06, 2002 @10:09AM (#3832754) Homepage Journal
    Unfortunately this program uses the same faulty assumptions that Dvorak used to design his keyboard layout. Namely the following:
    • Alternating between hands each key is fast
    • Hands are not allowed to move left or right
    • All four fingers on each hand must rest on the same row
    • Moving up or down a row is slow, because of the above
    • You don't use your thumbs except for space

    Where did these assumptions come from? I've got about 15 years of piano playing under my belt, and I find the standard "touch typing" rules very strange choices indeed. I type in a pretty free-form style at about 150wpm, depending on coffee. So, I'll disprove these assumptions one by one:

    • Alternating between hands each key is the absolute hardest action to do quickly. If you have a piano piece which has a segment like this (there's a few famous pieces like this) it'll either be relatively slow or you'll be practising it for months. Runs of keys in the same hand are far faster. I'd say about 5 times faster.
    • Why are hands not allowed to move left or right? If you have 8 keys to press, all of which reside to the right of the 'D' key, I move my left hand right a few keys! What's the point in keeping it where it is and making your right hand do more work and even stretch to reach the central columns?
    • Why must all 4 fingers rest on the same row? For a start, your fingers aren't even the same length! Place your hands naturally on a table, and compare to where the keys would be. You'll find that they would have been on "a,w,e,f" and "j,i,o,;". Somewhat luckily, qwerty keyboards have all of the vowels except "u" under these keys. There's no reason you can't have your fingers over arbitrary rows. With a bit of hand strength building, this is easy.
    • Moving up and down rows is only slow if you "float" above the keyboard (not resting your wrist on the table/rest) and move your entire arms back and forward. This would be an awful technique to use and I'd suspect it would lead to strain problems very quickly. Stretching your fingers forward and backwards is fast. And with the previous point, this is mostly irrelevant anyway.
    • So, why aren't we allowed to use thumbs for typing normal keys? It's perfect for hitting keys on the bottom row when all the others have been tied up. Just then, I typed "up." with right hand "2-4-1" (where 1 is thumb, 5 is little). Why? Because when fingers 2,4 have been tied up on the top row, the most convenient finger to use is my thumb. Try it.

    Not to discourage trying to find new keyboard layouts too much, but it's best to start really from scratch and question the basis of all the original assumptions. The rules need to include:

    • Model the positioning of the hands and fingers in detail. If you remove the restrictions that "touch-typing" enforce, then the key-to-finger mapping also depends on context.
    • Encourage runs of keys in the same hand. About 3-4 keys in the same hand before switching is optimum.
    • Discourage rapid switching between hands (every key, for example).

    My theory about carpal tunnel and other typing related injuries is that "touch typing" is actually to blame. It encourages stiffening of the wrists and hands, discourages stretching, and generally leaves your hands as weak as they were before you started typing.

    My advice to anyone that uses classical "touch typing" is to learn to the point of about 40wpm, and switch to improvisation. My advice to anyone wanting to switch to Dvorak for speed, or to reduce strain: it's ultimately limited by the speed of one-key-per-hand switching which is about 120wpm. From my experience with both, you're better off sticking with qwerty and going free-style.

    • by The Pim ( 140414 ) on Saturday July 06, 2002 @11:21AM (#3833039)
      I think you have a combination of unusual motor skills and incorrect reasoning.

      Alternating between hands each key is the absolute hardest action to do quickly. If you have a piano piece which has a segment like this (there's a few famous pieces like this) it'll either be relatively slow or you'll be practising it for months. Runs of keys in the same hand are far faster. I'd say about 5 times faster.

      Runs on the same hand are faster than alternation, sure. But alternation is much faster than arbitrary motions of one hand. Given the variety in English, optimizing for long runs will win on a very few words, and screw up the layout for everything else. I challenge you to refute this.

      Dvorak does follow this principle for some short runs: th, sh, wh, rt, nd, and ng are all nice combinations that move in the pinky-to-index direction on one hand. But gymnastics with one hand will kill most typists, and alternation is about avoiding this.

      Why are hands not allowed to move left or right? If you have 8 keys to press, all of which reside to the right of the 'D' key, I move my left hand right a few keys! What's the point in keeping it where it is and making your right hand do more work and even stretch to reach the central columns?

      This requires incredible foresight and motor skills. For most people, the key to finding a key quickly is knowing its position relative to a fixed reference.

      Why must all 4 fingers rest on the same row? For a start, your fingers aren't even the same length! Place your hands naturally on a table, and compare to where the keys would be. You'll find that they would have been on "a,w,e,f" and "j,i,o,;". Somewhat luckily, qwerty keyboards have all of the vowels except "u" under these keys. There's no reason you can't have your fingers over arbitrary rows. With a bit of hand strength building, this is easy.

      I might agree about the natural position of the fingers (though I suspect the natural position is actually somewhere in-between asdf and awef). But the idea that each finger can be on its own row is just wrong for normal hands. Ask some normal people to try it, and they'll tell you.

      Moving up and down rows is only slow if you "float" above the keyboard (not resting your wrist on the table/rest) and move your entire arms back and forward. This would be an awful technique to use and I'd suspect it would lead to strain problems very quickly. Stretching your fingers forward and backwards is fast. And with the previous point, this is mostly irrelevant anyway.

      Resting wrists on the table, and stretching fingers without moving the hand, are both generally recognized as major contributors to CTS and other typing injuries. When I learned piano, I was definitely taught to keep my wrists up and move my hands with my fingers (eg, when reaching for a black key, the hand should advance).

      So, why aren't we allowed to use thumbs for typing normal keys? It's perfect for hitting keys on the bottom row when all the others have been tied up. Just then, I typed "up." with right hand "2-4-1" (where 1 is thumb, 5 is little). Why? Because when fingers 2,4 have been tied up on the top row, the most convenient finger to use is my thumb. Try it.

      I tried it. It's a disaster for me. Typing up with 2-4 is hard enough, requiring an awkward stretch of the ring finger. Getting to . with the thumb requires me to twist my whole arm in addition to contorting my hand, and hitting a target after such a long travel with such a fat digit is quite unreliable. Plus, this leaves my hand totally out of position for any subsequent typing.

      I would think that given your claim that different fingers can easily go to different rows, you would prefer 2-5-4.

      My theory about carpal tunnel and other typing related injuries is that "touch typing" is actually to blame. It encourages stiffening of the wrists and hands, discourages stretching, and generally leaves your hands as weak as they were before you started typing.

      I'm not a doctor, but this flies in the face of all the medical advice I've read. What you call "stiffening" is what most people would call making gentle, comfortable motions. What you call "stretching" is what most people would call excessive and unnatural motion. What you call "leaving weak" is what most people would call avoiding strain. Maybe your hands can take it, but most people's can't.

      • Runs on the same hand are faster than alternation, sure. But alternation is much faster than arbitrary motions of one hand. Given the variety in English, optimizing for long runs will win on a very few words, and screw up the layout for everything else. I challenge you to refute this.

        If all English words were made up of random letters, and had uniform occurance, this would be obvious. But because some words are vastly more common than others, and have a lot of similarity, this isn't so obvious. As you say, Dvorak promotes some runs like th, sh, wh - so why not extend to promote runs longer than two? You don't need to restrict to adjacent keys - so long as there's a different finger near the next key it'll be nearly as fast. However, my argument regretably lacks any data to back it up - much like yours does.

        I might agree about the natural position of the fingers (though I suspect the natural position is actually somewhere in-between asdf and awef). But the idea that each finger can be on its own row is just wrong for normal hands. Ask some normal people to try it, and they'll tell you.

        I see what you mean about it being somewhere in between. Perhaps I shouldn't have been quite so wide-sweeping with "one finger per row" statement. Some combinations are obviously ridiculous and would likely cause injury to yourself and the nearest 3 people. Other combinations aren't difficult and probably strain less than moving all of your fingers at once.

        In general, my style tends towards "smoothing out" the stretching of fingers and movement of the wrists by predicting the required positions of each hand and moving progressively towards an optimum position for it. I agree that this is unusual, but I think that most people could learn this given time.

    • The big flaw in your argument is probably the one that you think is the best, namely that we should be encouraging runs of 3 to 4 letters on one hand.

      Alas, the problem with this is that you're going to end up with a dominant hand. If you put 'the' in the middle of the right hand side of the keyboard, the right hand will be typing that a million times a day. Sure, it's faster, but it's not going to be ergonomically better.

      Nobody that's typing for pure speed is going to use a normal keyboard. A chording keyboard will let you break 200wpm if you're good with it.

      Besides, I'm not sure why you'd say that alternating keystrokes by hand is slower. It's clear to my that my left and right hands can type keys nigh simultaneously. It's just a matter of getting your hands to move quickly and precisely enough so that a keystroke from your right hand is instantaneously followed by a keystroke from your left hand. Having multiple keys close together so that they can be hit by the same hand merely makes it a little more convenient to coordinate.

      And surely, as a piano player, you've heard the stories about players 'trilling' on two keys repeatedly, for years, and are now experiencing pains from it?

      Lastly, I think that the best keys for the thumb are 'backspace', 'delete', 'space', and 'enter'. I use these keys far more than most letter keys every day. On average, I use the space key every 5 letters, and I probably use the backspace key once every 10. :)

      Check out the kinesis ergonomic keyboards. If only they could have moved 'shift' so that I didn't have to use my pinky all the time.
    • These are some very interesting insights, and I really hope you'll get together with the author of this piece and perhaps work out some optimized layouts based on these criteria.

      1) I move my hands as well when I type (no formal typing education at all ... completely self-taught by simply doing, and I'm the fastest typer I know), though not to strike different keys with different fingers like a pianist, but rather to make the reach for some of the more distant keys more comfortable.

      This does result in typos, however, some of which people will doubtless see here on /.

      2) Your insight on the natural position of the fingers is brilliant, if obvious (as most brilliant things tend to be, in retrospect).

      A layout and typing regime based on home keys as awef and jio; would be very interesting to develop, one allowing hand movement a la a pianist and one (which I personally would prefer) assuming the fingers return to their home coordinates after each letter is typed.

      Indeed, I would break the possibilities out into several options:

      1) awef jio; homekeys, no laterial or vertical movement
      2) awef jio; homekeys, vertical movement but no laternal movement
      3) awef jio; homekeys, vertical and lateral movement
      4) awef jio; homekeys, lateral movement but not vertical movement

      and then see which of the 4 results in the easiest, and quickest, typing movement.

      I would surmise that #1 would be preferred by many who already know how to type and might not be able to make the adjustment to MOVEMENT like a pianist might, while those starting from scratch would find one of the other three more natural and useful.

      An improvement of this nature is something I would be willing to try a new keyboard layout and typing regime for ... I played with dvorak once, but didn't find the improvement worth the trouble. This, on the other hand, would be more than worth the trouble.

      A final aside to purists who are griping about the author's unfortunate use of the word Universal: with the exception of most physiscists and astronomers, virtually everyone misuses the world 'universal', be it a movie studio, a beauty pagent, a mechanic, or any number of other contexts.

      It was obvious from the context of the discussion that the author was working on an optimized keyboard for use with the English language, so obvious as to not even warrant a comment. The fact that the author wrote the article in English, sampled English works (and programming languages) in his study, and published in that very same language, to a web site located in the heartland of America (Michigan) targeted at English speaking readers, should have provided a big enough clue even for those who are clue-challenged.

      Non-english speakers screaming and yelling about how this (obviously) doesn't apply to their language are belaboring the painfully obvious, and come across more like that quintessential, insecure adolescent boy who, during a lecture on female sexuality stands up and declares "but boys are different!"

      Of course an optimized german keyboard likely won't use the qwerz layout, but something very unlike qwertz, very unlike dvorak, and very unlike a keyboard optimized for English. Ditto for French, not to mention numerous languages that do not even use the Roman (or Cyrillic) alphabets, such as Hindi, Thai, Japanese, and Chinese. Pointing this out in the context of this discussion is akin to pointing out that a study on the aerodynamic properties of a piston-driven propeller don't map well to the art of flavoring a Hollondais sauce with the proper mix of spices, to which the 'universal' (in an earthly sense) response is generally something on the order of: No shit, Sherlock.
    • Finally! Someone who types like me!

      Really, I too learned to play the piano first. When I was about 10 I started to hunt and peck on a computer, and I learned my own uniqe style.

      I found that not only can I out-type the touch-typists I know (including my wife at 100+ wpm), I also have the unique ability of being somewhat fault tolerant. I year or so ago I sliced open my index finger with a knife, and I ended up having it in a big-ass bandage for a couple of weeks. I just didn't use that finger, and kept a very fast pace on the keyboard. I was amused.

      I also find that I lose about 10-15 wpm when I switch away from my IBM Selectric keyboard, which is why I buy every one I run across, and have one on every computer I use. Drives the people at work somewhat nuts 'cause it's quite loud, when I'm cranking out code. ;)

  • by danboo ( 473483 ) on Saturday July 06, 2002 @10:16AM (#3832783)
    when there's a finite number of layouts? Yup, just 265,252,859,812,191,058,636,308,480,000,000 possibilities. I'm sure the guys at distributed.net would love to set up a project to figure this out.

    - danboo
  • by RalphTWaP ( 447267 ) on Saturday July 06, 2002 @10:20AM (#3832802)
    It sounds like the interesting possibility almost grasped here is the possibility of producing a self-customized layout on the fly.

    hook the keyboard driver and tokenize input into words (corrections included where possible), feed through a spell-checker (to find what word was likely the target), and re-insert as input through the algorithm. Admittedly, this makes it more of a neural-net than a GA, but it is continuously evolving, and eventually, you should even out on the best keyboard layout for what you type on a daily basis

    I expect my '_' key to end up somewhere on the home row in a couple of weeks (programming = bad typing habits)

    • What I'd be really interested in seeing is a keyboard where each key is a small hi-res LCD display. Not do-able today, maybe, but imagine the things you could do with this.

      It would not only allow for self-customising layout, but also things like when you press [shift], letters go upper-case, and the positions of the ''1'' and the ''!'' are reversed. When you press CTRL or ALT, the keys that do have functions assigned could get highlighted or something. The font of the letters could change according to the font you're writing with, or with the display font you're using... PC games could take advantage of this in very cool ways... all kinds of stuff.

      I'm pretty sure this isn't really possible right now, but I can guess at some of the stumbling blocks. Durability would be one problem, although you could embedd the LCD in transparent keys. The contacts per key to make this happen would be ridiculous... managing 101-104 little displays would be an interesting problem.

      Just an idea.

  • The link to the code on the provided web page is broken.

    The proper address to the location of the tar.gz file is:

    http://www.visi.com/~pmk/evolved.tar.gz [visi.com]

    --R

  • Slashdot from '99 (Score:2, Interesting)

    by dirkmuon ( 106108 )
    The Myth of Qwerty [slashdot.org] features extensive discussion over the same ground.

    The author's list of rules is predicated upon many assumptions about the act of typing. Has any been verified scientifically? I think not. To discover whether the Dvorak keyboard or any other keyboard provides verifiable benefits beyond QWERTY would require extensive training and testing of a large sample population.

    Of course, if you like Dvorak and any other layout better than QWERTY, then you should use it.

  • The current QWERTY keyboard design came about in the early 20th century, because typewriters which had efficent keyboard layouts were jamming, and there was no anti-jamming mechanism except to slow the typist down. However, once there was an anti-jamming mechanism, the amount of money lost from the industry created to basically teach people how to type quickly was so ingrained that nobody wanted to get rid of it, even though they could get to a better alternative. Humans are actually capable of going much quicker, but the current QWERTY layout was designed for intentional inefficency.
  • This is the sort of thing one would expect to see in SIGCHI [sigchi.org] conference proceedings [hcibib.org]. Although there were no experimental controls or peer review of the results, it is telling of Slashdot's influence that such results are published on Slashdot first. As is, the quality would be top notch for a commercial rag such as Dr. Dobbs, and with just a bit of polishing would be published in an academic journal, serve as a Master's thesis, or even -- with quite a bit of "pushing" (expanding) of the ideas -- serve as a PhD at some schools.
  • i had enough trouble switching from a standard keyboard to a MS "natural" keyboard -- it took me a month to stop typing qqq.xyz.com into my web browser instead of "www".

    of course now that i have retrained myself to use touch type on the natural keyboard, i am a mess when I type anything on my g'friend's iBook...

    damn laptops and those smaller keyboards.
  • by leastsquares ( 39359 ) on Saturday July 06, 2002 @11:28AM (#3833070) Homepage
    The algorithm he used was NOT a genetic algorithm, although it could be called an evolutionary algorithm. comp.ai.genetic FAQ [ucsd.edu]
  • It's based on evolution, which everyone knows is false. Afterall doesn't it say in the good book that man was made in Gods own image?

    Whose image was this keyboard layout? Who is he to play at being God?

    This is a good example of everything that's wrong with the world; just like GM foods. I don't want some Frankenkeyboard, that might spread its genes out into the environment, anymore than I want frankenfoods, we'll be knee deep in genetically modified keyboards next. Contact your congressman. This has to be stopped.

    ;-)

  • Fingers of the same hand can't be on both the top and bottom row.
    I don't know about that one. Try typing "nice" on a qwerty. I find it quite natural that the index and middle fingers of both hands hit the "ni" and "ce" pairs in quick succession.
  • Having used an Atari ST for a long time, I always found it a bit stupid that there aren't 'Help' and 'Undo' keys on PC keyboards. I thought it would be temporary, and they would eventually be added. Instead, what they did add were the (completely redundant and extremely annoying) Windows system keys (or 'winkeys', as some people call them).

    At home I've been using the same keyboard for 15 years (a Cherry G81-1000, that looks and feels like the old IBM keyboards), so luckily I don't have to put up with those keys (when I have to use other keyboards I keep hitting them instead of Ctrl / Alt), but I still miss my 'Help' and 'Undo' keys from the ST.

    Most programs now use F1 as the 'help' key. Doesn't make much sense but at least it's standard. Sort of. Some programs use Shift+F1 or Ctrl+F1. But 'undo' is nowhere near as standard. Some programs use Ctrl+Z, others use Alt+Backspace, and so on.

    Personally I'd like to see dedicated keys for 'help' and 'undo', where repeatedly pressing Undo would do multiple levels of undo and pressing Alt+Undo would do a Redo (ie, undo the last undo).

    What do you think? What keys should be added to (or removed from) PC keyboards?

    RMN
    ~~~
  • What about rearranging the positions of keys like "Home", "End", "Del", "BkSp" etc.? A good keyboard layout should also take into account the possibility to correct typos and move around in the text quickly, especially when it comes to writing program code.
  • by Our Man In Redmond ( 63094 ) on Saturday July 06, 2002 @12:01PM (#3833204)
    I tried creating a keyboard using a set of Perl programs I wrote and ended up with all the punctuation in the home ruw. :(
  • What I would like to see is a good programmer's keyboard designed for C, C++, and Java programming.

    The current QUERTY (and DVORAK for that matter) layout requires too much use of the pinky finger (the weakest finger). I feel some of the keys would benefit from being moved elsewhere, for example the following:

    SHIFT and ENTER.

    I use shift so often I wish it were located in the middle of the space bar where I could hit it with my thumb.

    I also wish common symbols used in programming didn't require shift all the time (i.e. *, +, ", {, }, &, !, %, (, ), and # (for shell scripts/Perl)}. My home keyboard is an improvement (a Northgate OmniKey/Plus) since it has a dedicated "*" key and the function keys at the left.

    Also, for X I really like the added keys Sun has (like front, cut, copy, paste, undo, redo, etc.)

    -Aaron
  • Basically, what he has done is created a personalized keyboard, well-suited to the things which he frequently types.

    Different people type different things; thus, different optimal results will be seen.

    I'd also suggest that he try using a Bayesian Analysis to do this study; Bayesian Analysis and GA are very close to one another, but Bayesian Analysis is faster and is more widely accepted/used.
  • by Tablizer ( 95088 ) on Saturday July 06, 2002 @01:23PM (#3833524) Journal
    So everytime somebody comes up with a (allegedly) better keyboard layout using new technologies or new "optimized" assumptions, a new keyboard layout will come on market?

    Sounds like the software development industry in general: learn a new language or paradigm every 5 years. (Just to find out that they keep reinventing LISP without knowing it :-)

    If that kept happening, then perhaps what is needed is a programmable keyboard where the letters (including image of them) change to your personal preference. Then again, if you know it well enough, perhaps you don't need to see the letters.
  • by hyphz ( 179185 ) on Saturday July 06, 2002 @07:55PM (#3834954)
    Hmm, interesting. I've been using Dvorak for a while now (and yes, I can still type fast on qwerty with the occasional pause). However, one thing I found about Dvorak was that spelling checkers become less useful on it - because of the closeness of common letters to each other, a Dvorak miskey tends to generate a correct spelling of the wrong word, rather than an incorrect spelling. This confounds automated spell checking. Has anyone tried to make a layout which minimises cases in which letters which can be substituted in words being next to each other is a Bad Thing?

GREAT MOMENTS IN HISTORY (#7): April 2, 1751 Issac Newton becomes discouraged when he falls up a flight of stairs.

Working...