Whether you are deciding to buy a lottery ticket, figuring out the odds of a poker hand, or trying to beat a grandmaster at chess, the process remains the same: define the sample space, assign values to outcomes, and calculate the optimal path.