Cookie Cutter It automatically plays cookie clicker!! http://orteil.dashnet.org/cookieclicker/ instructions, open the game in the url above copy the code in cutter.js and paste into the javascript console it'll play the game for you! Obviously it is trivial to cheat in this game using the console. So, this code is about trying to figure out the optimal strategy without 'cheating'. The code perform one action every 250ms ( eg 4 clicks a second ), you are not allowed to modify the game other than by doing something a human user would be able to. Current Strategy 1) if there is a raindeer - click it 2) if there is a santa upgrade we can afford - buy it 3) if there is a golden cookie click it 4) create an array of all objects and upgrades ( calculating price, cps and value for each ) 4a) exclude 'One mind' ugrade - we can gain more from golden cookies 4b) if we can afford best_value - buy it 4c) if there is a different object that we can purchase that will pay itself back before the time taken to buy best_value - buy it 5) otherwise click the big cookie Appendix price - cost ( in cookies ) of purchasing an item cps - number ( in cookies per second ), refers to the amount of global cps gained by purchasing an upgrade value - time (in seconds) the time taken to repay the cost of purchasing an item ( = price / cps ); time_to_buy - number ( in seconds ) the time until we can afford to buy an item based on current cookies and global cps best_value - item that has the highest 'value'