Or, how I cookie-clicked my way to a doctorate in interaction design.
It’s been 5 years since I finished my Ph.D. on user interfaces for machine learning. To celebrate/commiserate, I’m sharing an unusual (if I may say so myself) grad school war story, the story of how sinking hundreds of hours into pointless online games unexpectedly sped up my ability to do research by a factor of 10, perhaps more.
The idle game renaissance of 2013
The year is 2013. The slow burning Disney super hit Frozen is picking up steam, and soon parents the world over will be terrorised by toddlers in Olaf and Elsa costumes tunelessly belting ‘Let it Go’. Simultaneously, a French programmer known only as Orteil (meaning ‘toe’) releases a game that takes the online gaming world by storm for its absurdity, simplicity and addictiveness.
The game? Cookie Clicker. The objective of the game is simple: get as many cookies as you can. You can click a giant cookie to generate a cookie, but this method doesn’t scale particularly well. Instead, you can spend some of your cookies to hire grandmas to bake cookies for you. Over time, you gain access to cookie farms, factories, and a seemingly endless series of increasingly absurd and productive cookie generation devices.

A lot of ink was spilled at the time on cookie clicker’s addictive nature. Despite its apparent simplicity, there was something incredibly fun and moreish about its core gameplay loop. While it was not the first game in this genre, it is perhaps the most influential. Within weeks, the Internet was awash with hundreds of ‘clicker’ games ranging from simple re-skins of Cookie Clicker to inventive new interpretations of the genre that pushed its boundaries and articulated the core elements that made it fun. The genre eventually came to be known as ‘incremental’ or ‘idle’ games, centred around an active Reddit community, and even inspiring dozens of research papers.
Down the rabbit hole
One of the peculiar and interesting aspects of this game is that it rewards you for not playing it. Often, the next cookie purchase requires several orders of magnitude more cookies than you are currently producing, so you have no option but to leave the game alone, sometimes for days, before your cookie factories churn out enough cookies for you to unlock the next level of progress. This is why it is called an ‘idle’ game.
One of the interesting aspects of this game is that it rewards you for not playing it.
However, the game is clever; it provides multiple potential pathways towards your next goal, and small decisions you make can compound, making the difference between an overnight wait or a wait of several days. Calculating the best way to allocate your limited resources before leaving the game to run overnight becomes a complex mathematical puzzle with many moving parts. Catnip for nerds.
I fell pretty hard for Cookie Clicker. I had it running on my computer 24×7 for months, tending to it every few hours. I visited the Cookie Clicker subreddit everyday, where people would discuss strategy, post tips, and results of experiments. A cottage industry of browser add-ons emerged that allowed you to automate certain aspects of gameplay as well as track cookie production statistics and compute in-game decision formulas. The game was in written in the web programming language JavaScript, and so were these add-ons.
By playing with and tweaking these add-ons I inadvertently learned a lot about how programming for the browser works. I was even able to track down the root cause of an issue where I wasn’t generating cookies as quickly as my calculations anticipated. It turns out that Google Chrome throttles JavaScript timers in background tabs, meaning that in order for my add-on to auto-click as fast as it was supposed to, the tab needed to be visible in the foreground. I plotted a graph of the phenomenon and presented my research to the reddit community, adding to the growing body of knowledge about this game (and my own growing body of knowledge about progra