A theory on how to win at gambling.