How to Find the Perfect Cookie