FreeRice.com and Automaton
Monday, November 19th, 2007I had recently become aware of a website named FreeRice.com. This site provides a vocabulary game where one identifies synonyms for words with an ever increasing difficulty. Since I could always use a better vocabulary the site intrigued me. I played the game for a few hours but was in no way satisfied with my progress. At roughly one correct answer every two seconds I’d rank up 18,000 grains of rice an hour. Unfortunately, once I reached the higher levels I was averaging only 3 out of every 4 questions right.
While 13,500 (75% of my estimated optimal efficiency) grains of rice is a lot, it was nowhere near satisfactory. After joking about my “horrible rice metrics” at work, I mused that I should write a Greasemonkey script which would play the game better than I could possibly hope to. As the rest of my work day rolled on I became more and more intrigued by the idea. There was absolutely no reason why I couldn’t write a very simple AI to play the FreeRice.com game.
Were there reasons why I shouldn’t?
I knew the most obvious reason:
This wasn’t a controlled experiment. If the script spun out of control and was allowed to play over and over I could risk exhausting FreeRice.com’s funds.
Because I didn’t want to be responsible for the downfall of a potentially lucrative source of food for impoverished children I initially abandoned my bot. Despite my fears, curiosity eventually got the best of me and I began implementing my bot. I started by implementing a simple timing method limiting page requests to once every 10 seconds for debugging purposes, just in case.