How to make optimal decisions