Monday, September 28, 2009

A simple word game

We shall consider this very simple word game called the wordmorph. Given two words: cat - dog, we are asked to start from cat and arrive at dog by changing one letter at a time.

cat
cot
dot
dog

Is a valid solution. Note that we are allowed to change only one letter at every step. Words must be valid 3-lettered English words and should not be a proper noun or abbreviations. Eg: USA, TOM etc. are not allowed.

Let us look at a tougher example: axe-nun

axe
ace
act
ant
and
aid
bid
bit
but
nut
nun

I found this game very interesting that I wrote a computer program which would randomly give me a pair of 3-lettered English words which I would solve. I found some word pairs extremely difficult, it took a lot of time. But the best part was that, I was improving with time.

I reached a stage wherein I could solve any word pair in less than 10 seconds(Initially I used to take 20 to 30 minutes per game!!! pufff!!!!). I was all praises for my extra-ordinary IQ!!! who can beat me! I am a mega-brain!, I went around posing this question to every I met for the next one week... on gtalk, during lunch, tea. To dad, mom, friends and even my research advisor :-) !!! everyone were startled to see how difficult it was to solve some of the word pairs. I must acknowledge pratima here who spent 12 full hours in solving just the axe-nun word pair :-)

My phd advisor took extra interest in this problem and we started analysing what makes the game difficult for a beginner and what makes "ME" solve it in 10 seconds :-)

The experiment:

Karthik, shashi and chaitanya helped me create an interface to play this game. When it was all up and ready, we invited 20 students to take up this game. Each were given 65 word pairs to solve. Poor guys they played for 4 to 5 full hours....

And what we observed next startled us....


X-axis represents the game number... participants played 65 games and Y-axis represents the time taken per game. Note that time taken during the first five games is more than 15 minutes per game hwwere as after 20 games we see that our participants took less than 30 seconds.

I realised:

* I was not the only one with extra-ordinary IQ
* I was not the only mega brain!
* Every participant took very little time after 20 games.

What do you think is the trick of the trade that our participants learnt which brough down their problem solving time drastically? from 20 minutes to a mere 10 seconds?

Comments invited!!!

41 comments:

  1. Number of 3 letters word in the language is limited and the neurons have gained sufficient weights to recall the appropriate ones at the right time...
    Is this the reason dude ?

    ReplyDelete
  2. Hey,

    here goes my reasoning.

    Initially when you pose the puzzle to anyone, he will take atleast few minutes to gather and understand the rules of the game and even more time to come up with solutions.

    But as more and more 'similar' puzzles are given, slowly the player comes up with a strategy, which is neither top down ( from first word to last word) nor bottom-up (from last word to first word), but a mix of both, and by the time he gets his 10th puzzle, according to your graph, he exactly knows how to solve the puzzle.

    I guess thats the reason.

    Last but not the least, the other most important reason is that, 'God has given brains to all of us, we just dont use it often!' :-)

    ReplyDelete
  3. Thats an extremely interesting curve and I would really like to know more about the reasoning behind it. I remember that I was asked for an algorithm to compute the smallest number of steps required to morph into the second word during my final round in Trilogy. The solution was a simple breadth first search but I remember taking a long time arriving at it!

    ReplyDelete
  4. this is case with ne kind of puzzles..i am not expert in this domain..so dont know wat might be reason...wats ur reasoning?

    ReplyDelete
  5. first of all, nice game sir. not only a good time pass, but also a good exercise for mind also :)

    i think its mainly due to the useful words coming in the mind at the time of playing. and it start happening frequently when we have played the game few times.

    may also have to do with few tricks of the game. after playing it few times one is expected to know few tricks to solve it faster. tricks like, while finding intermediate words, one should see that one vowel is there or not in the word(usually all the word has at least one vowel in it)

    PS: i have not tried this game yet :)

    ReplyDelete
  6. I think .. for the first couple of games the player really has to sit down and remember all the three letter words and the ways to connect them.

    For example say (ant to bid), the mind would have calculated all the possibilities to get from ant to and to aid to bid. And it would have learnt this combination.

    Now next when you get an (axe to nun) as soon as the brain comes to the ant state it recalls that it has done the processing from ant sometime back. And since it remembers the combinations it is faster to go from here.

    So reason 1 : Note that (ant to bid) is a part of (axe to nun) so its like calling a subprocess.

    ReplyDelete
  7. Hi... it is a very nice game in fact. I am just wondering if there is a genius say being able to hold all the known 3 letter words with their edges drawn only for one letter change, given any pair, it boils down to finding shortest path between them. Possibly, after training, part of the nodes and edges are established in the brain...

    ReplyDelete
  8. This is the case with any kind of puzzle. Try the same experiment with Sudoku. You will get a similar graph.

    Initially a person takes time to grasp the rules. By the time they solve 10 or more puzzles, they have got a hang of it.

    Now u interpret the above neural network terminology.

    ReplyDelete
  9. When I went through the problem, I started trying out myself with few problems. And voila! even I found it was true. So, what went through my mind was this.

    1. First attempt, I started thinking, WTH is this :( I'm not able to recall any word with only one letter difference. Then, I took some 9-10 intermediate words to reach the destiny. And, this took some 7 odd minutes.

    2. Second attempt, Hey, its improved. Only 5 attempts, and time, just 3 minutes.

    3. Final attempt, he he, even I'm a champion. Got it solved within 1 min and funny part is, I had 10 intermediate words.

    So, what I felt was, this is what we call as learning curve. In the first attempt, the concept is new. So, we'll spend our time being conscious about the validity of the word that we replace. This happened for me for every word I thought about. Second attempt, i repeated few words which I had stumbled upon during my first attempt. And the words came to my mind in a flash as I had already thought about it. So, this was reflected even with the third attempt and it was a drastic drop. So, the trick is, you stop thinking about a word when you keep solving it and simply use them as you would have got them in your cache memory :) .

    ReplyDelete
  10. hmm...interesting game. Here are my comments/observations.
    1) As many of them already said, the number of three letter words are quite less. Maybe if you started out with say five or seven letter words, it might still be a tough challenge.
    2) More importantly, i feel that its more of a training process that the brain undergoes. The brain would probably form some sort of a tree that enables it to move between words (just like what Kali has commented above).
    3) The depth of the tree, in some sense the max number of steps to move between words, i feel is probably quite less i.e. maybe 15 or so (maybe you can check this with what you collected). Thus the training required is low and people catch up quickly.

    Well i think there are a couple of softwares in web that actually give you the sequence of words given two words. Maybe an understanding of the algos used might throw some light on this!

    ReplyDelete
  11. Nice... I would say Memory Caching would occur hence the performance increases... ;-P

    ReplyDelete
  12. I'd also played this game and introspecting my own thoughts while playing it, i was able to note down a few points.

    I started using certain words more often than the other as it linked most of the words (mostly because of their starting and ending letter).

    However, I'd like to pose a question.

    @Su: have u let the same player play the game after a period of time during which he has totally forgotten about it?? Hope u got my question.

    I wanna know if the player still takes only a small amount of time for solving the puzzle after a long time-gap.

    ReplyDelete
  13. @Dheeraj, thats an interesting questions. We haven't done that :-)

    ReplyDelete
  14. Sudarshan,

    The set of 3 lettered word in English is limited. Once the user uses/ plays the game for more number of times, he will infact know all the valid words which starts with a particular alphabet. So, for anyone, the game will become a cakewalk if he knows all the 3 lettered word. You can try this with a set of 2 lettered word 2x2 and then with 3x3 and 4x4.
    As the number of characters in the list increases, the difficulty increases.

    ~Nikhil
    "kalyotanaka bramhavide,kalita mele kapividye "

    ReplyDelete
  15. Well, the curve explains one simple thing to the human brain but a very complex stuff when it comes to artificial brains! "Our brain knows how to learn!"

    ReplyDelete
  16. Hope u rmber the old marble game called brainvita.. The first few attempt one could end up with 5-10 marbles, but once u know the trick and get a hold over the game, every single time u end up getting 1-3 marbles (Unless the person is repeating the same steps to get a result of 1!!).

    So practice makes the player get hold on the game and the way to play it.
    More importantly, in any game like this (or sudoku), a person takes maximum time in the GAP between each move.
    After a little bit of practice, this "GAP BETWEEN EACH MOVE" is reduced. This is one of the most important factors which brings down the overall time.

    Try the same game with a constraint that the changed character should be within (+) or (-) 5 character space range! Even though it sounds difficult, it gives you a 10 characters range, and again after sometime u will be able to solve within 20 secs!

    -Sachin

    ReplyDelete
  17. I guess, as ppl get a feel of the game, they realise that there are certain alphabets in english (say A,E,I,N,R,S...) which have a higher occurrence rate and a certain alphabets which occur comparatively rarely (like X,Z)... so, in ur game, an experienced guy quickly knows that he has to replace X first, then goes on replacing alphabets in the increasing order of probability of appearance.... added to this is the frequent recollection of words due to match practice, the problem becomes simpler over a period of time

    ReplyDelete
  18. well..im not sure why that happens..
    but im sure a lot of learning theories say "its easier as u go along"
    but it would be nice to see what happens when people dont want to do it vs they r challenged.

    i supposed most people take it as a challenge..rathr an insult if they cant do it faster as they go. you know what i mean?
    i think its a common human nature which is sort of taken advantage of when teaching kids and stuff and even company reward systems..ranks..max score and stuff

    but trying giving it to someone who isnt in a mood to play..but is doing it under compulsion.
    i can try..usually i have less patience with games esp when im havent eaten ;)
    then its easier to figure out if its something we can disallow..(im not sure if its controllable!)..disallow the brain to catch up and get better.

    its like testing with false positives or true negatives..whichever way you wanna frame it!

    Gowri

    ReplyDelete
  19. This happens with many games that I've played... Jumble, Sudoku, Tali, Mahjongg... Though I've never tried plotting time against attempt-index! We get used to solving the kind of problem... We probably start becoming an expert, whatever that means!

    ReplyDelete
  20. While reading the post the first question that came to my mind if what happens if the same student plays the game after a period of time.... The results would explain
    - Time taken to understand the rules of the game : how big a component is this?
    - Words stored in cache memory: the words previously known and those learnt while playing
    - The ramp up time - in this case 20 - will this be constant..

    Repeat the expt with 4-lettered words... This would explain
    - the role played by the complexity and number of possible words

    ReplyDelete
  21. Hi,
    I must say it's a wonderful example of learning. Human brain is so plastic that it can adapt to any new environmental cue within a short while. This is no exception. We read, understand and remember words as spatial memory i.e. we correlate them to some shape. While reading we don't really read the letters one by one rather we search for the shape, the ensemble of letters form in our memory. That's why we sometimes make mistakes between very similar words and also read a word the way we want to read.
    So my guess is that with increasing number of games one's ability to vizualize the first pattern (first word) and the last pattern (last word) and correlate them through similar patterns (intervening words) improve drastically. There have been several expts with rats to study their spatial memory skills where they remember patterns and that improves with practice. I feel this is somewhat similar to those experiments.

    ReplyDelete
  22. Hi Sud,

    Although most things have been said above,

    first: If any game like this is to be really analyzed one cannot ignore the structure of the particular language(english) in question,
    - what happens when the participants are given a dictionary of all three letter words in english, i think that will change the graph.. in particular the initial part of the graph is about the individual developing this "active" dictionary in his mind and can be ignored.

    secondly: any statistics on this will be more informative when a corresponding frequency of occurrence of the given words in the language is also known.. specifically what are the frequencies of the last two letters in the english language, i'm sure '_at', '_in' etc will be high so after a number of trials one probably develops "models" to go from '_at' to '_in' and other such transformations..
    The question is do they come up with the solution with least possible steps, or do they use similar motifs in their approach..
    Also it would be nice to have cycle lengths of transformation where say you keep first two letters constant and change only the last one, how many words can be formed with this constant pair, the length will be very important coz i would like to jump as quickly as possible from a smaller lenght pair to a bigger one..

    I have only attempted the game twice and hence i dont have an experience of more than 10 trials which would give a lot more insight.. but without the frequencies known i'm not sure if the comparisons are fair, unless it turns out that it is immaterial (which in itself is an excellent finding)..

    chinmay

    ReplyDelete
  23. Intersting analysis Sudarshan. Questions popped into my head as they did in many others' before me
    1. Does this only prove that "practice makes man perfect?" I think an important question to ask here is how much role is memory actually playing here. This can be figured out, as many others suggested, by giving breaks between subsequent cycles of the game for each participant.
    2. I beleive complexity of the game is an important factor. It would be interesting to see if the learning curves are the same with other games. Or for that matter, the same game with increased complexity.
    3. One question regarding the order in which the word-pairs were presented. Were they presented in order of increasing complexity or in a random manner? In the examples that you have given in your post, cat-dog is much simpler than axe-nun. Also if axe-act was given after axe-nun, then it would be a cake-walk. The player would simply have to remember from past experience. I believe this would have a significant effect on the curve.
    4. Finally, what is the role of the IQ of the person here? Somebody with a great vocabulary would shake up the averages, wouldn't they?

    ReplyDelete
  24. hi radha,

    a very good comment... to answer some of your questions.

    1) Our observation told us that memory is not a very important factor in playing this game.

    2) The game was given with difficulty increasing.

    3) vocabulary of a person didn't really matter much. After 30 games all were equally good.

    I shall send you the report of this work soon. That explains everything in detail.

    ReplyDelete
  25. Comment via email from one of my gud friends my3:

    sorry got really busy :( Here is d comment as you asked!
    here is my take , i dont think u got what i typed yesterday!
    hmm so let me take an example :
    As the question i understand is how solving this many times for different words reduces the time to solve it :
    Let me not go into programming first:
    if i have to solve it then how my brain works(It might be different way for different ppl).
    1. I see the start word and what it has to be morphed into :
    if it is mad -> map then only difference is 1 and thus canging the 3rd letter will solve. if it is sad-> red then 2 words differ so will have to move from sad->rad->red and thus would involve 2 letter change and max being 3.(of course each word generated will be mapped on the dictionary to check if it exists).

    So now if you get that right then bam its solved else then :
    1. Take all the words that are one letter different from the original and replace it with the target word's letter of that position ie if i have to map aim->mop , then see if mim,aom,aip makes sense if so then bingo u r one letter close to the target word else
    then get all the words with one letter off compare to dictionary if it make sense put it in a q and then see how close it helps to get to the target and thus process all of them .. until u reach a target word! like say aim->mop find all words like dim,him,aid--> dip,bid->mid->mod->mop.

    so if u want me to think of a datastructure n algo for this i think BST with hamming can help,but i suppose best would be to just have a pq and then just populate it based on the above logic and end when we have travesed all / reached the target word.

    I am not sure if this is rt or makes sense but this was atleast my brain worked :D right/wrong :D .
    And ie practise makes brain perfect / kannada dalli gade kaliyo vargu bramha vidye kalitmele koti cheste annodu luks like they knew coginitive science :P

    ReplyDelete
  26. I would say its because, the mind gets trained to spot words and forms a link after playing it for few initial times. In the beginning it is still warming up and getting to know the method behind the madness, but once the mind gets the track of events, it spots the links and so it is easier to solve the problem in a smaller time duration.

    This concept can also be applied to Sudoku, a popular game which saw people at first spending hours, then minutes, and then seconds......


    good job though! u got me thinking to a large extent!

    Cheers
    Shreya.

    ReplyDelete
  27. well what i would say is that initially it will be difficult to remember the 3 letter words.As we get used to it we start thinking which letter has to be changed and what word would fit into it.Its an amazing Brain exercise!

    Pooja

    ReplyDelete
  28. hey ..i don't know if there is very complex reason behind it ..but i think its combinations of adaptation of brain to the rules and conditions of the game and limited number of three letter words in english. As our brain is adapted to rules and tricks , we subconsciously model and train our thinking. This puts our brain in flow and then it goes on easier to solve the problem with time...

    ReplyDelete
  29. I realized somethings as i tried this out.

    The first thing that struck me is that the number of attempts is not important so i quickly moved from progressively trying to get to the second word from the first. what i mean to say is that in my first few attempts i tried to get to the second word with the least number of attempts as i was under the impression that this would take the least amount of time. but i soon realized that this was not always the case.
    I realized that there are a few words that are easy to move to and from they have a lot of words that are only 1 letter away from them so they allow you to move between words.

    I think there are sets of words that are easy to move between and then there are words that act as connectors between these sets. I think after playing for a while you can identify these words and can so it becomes progressively easier.

    ReplyDelete
  30. hey i just thought of something else.
    you say the words were always given in increasing complexity. From what everybody(including me) has said about remembering certain words and using them to make things easier, this could be easily tested. Give them a really hard pair at the beginning and then after 20 odd pairs give it to them again. According to what i ve said before they should not only take a shorter time but also probably take a very different route.

    ReplyDelete
  31. @nikhar... you have hit the bull's eye... gud! :-) thats the sole reason why people get faster :-)

    ReplyDelete
  32. Your mind develops a strategy while playing any sort of game. As many of them have already indicated - it only proves practice makes man perfect..

    But the question is how?

    Lets not talk about such games in general, but take this game as a particular example.

    A person will skim across a lot of 3 letter words while solving the first few puzzles, it might not be put to use in the first few puzzles itself - but it's hard to erase them from memory. More you play, more such words get into your 'cache' :)

    Also, last time I checked, you need not be strong in vocabulary to form simple 3 letter words :P

    I suggest you try out a similar experiment with a bunch of kids, playing a video game. I have personally witnessed tremendous improvements in the game play from the first game to say the fifth.

    Also, if you get addicted to this sort of game you tend to spot 3 letter words everywhere..

    ReplyDelete
  33. Hi Sud,

    You said you "can solve any word to any word instantly".. so i want to put this one to you:
    off -> ebb

    Any takers?

    chinmay

    ReplyDelete
  34. -> What do you think is the trick of the trade that our participants learnt which brough down their problem solving time drastically? from 20 minutes to a mere 10 seconds?

    The first and the obvious is based on Adam Smith's theory (Pooh and economics is everywhere, look) , that the time taken decreases considerably after a first few attempts at any skill .( following which you become a Skilled labor..) likewise you tune your brain to solve questions of a typical type .
    What I wonder however is that for a same pair there must be at least two ways to arrive at the solution .Can we find the "comprehensive" number of ways to solve the same. Comprehensive as in " All possible ways .." ( included to stress "ALL" )


    I am interested in the algo , basically I want to know , how does my "stupid" computer with zero IQ know what are valid "English" words ..Do you use, Data mining, or Artificial intelligence .. ?

    ~
    ek

    ReplyDelete
  35. Dear ekta, thank you for your comment.

    1) You are right, there is more than many ways to reach the destination word.

    2) "ALL possible ways" is a very difficult problem. There are millions of ways in which you can solve :-) sounds so not true - but yes it is.

    3) The algo is fairly simple :-) . You get the dictionary of all words as a txt file from which you pick all three lettered words and construct the graph and then challenge the user.

    4) The game interface is on linux and will very soon be done as a javascript which can then be put on my homepage. Will send you the link as soon as it is ready.

    5) A technical report (not very technical) explaining this game completely is going to be ready in a day or two. Will send it across in case you are interested.

    Thanks for having dropped into my blog.

    ReplyDelete
  36. Yeah , but what I do not get it , if it is an algo on a per "input" basis , then how do you "get the dictionary of all words as a txt file from which you pick all three lettered words and construct the graph and then challenge the user."
    Which is to say , do I "Write" this txt file for each 3, 4, 5, 6 , 7 , 8 letter words. Clearly I must be missing something, and what is that ?

    ReplyDelete
  37. Hmm.... i am not quite clear with your question. We first make a text file of all three lettered words and then create a graph with these words as the vertices.

    ReplyDelete
  38. Is that axe->nun sequence the shortest you found? (You could go from aid->bid->bin->bun->nun, and shorten by one.) Did your computer programme do any better? I got the following - does it work?

    axe
    ace
    act
    aft
    oft
    out
    nut
    nun

    ReplyDelete
  39. I'm addicted to this game...good one:)

    ReplyDelete
  40. Dear friends,

    Thank you all for the response that you gave two years before. An improvised version of this paper has made into this year's cognitive society international conference to be held at Boston. This has bragged the best paper award too. http://csa.iisc.ernet.in/news/news.php#2011-7-06-15-55-35

    Put a mail to me if you want to take a look at the paper.

    Regards,
    Sudarshan

    ReplyDelete