Beat the house: learning to protect your gambling capital with total fairness