  We develop an approach to solve Barberis (2012)'s casino gambling model in
which a gambler whose preferences are specified by the cumulative prospect
theory (CPT) must decide when to stop gambling by a prescribed deadline. We
assume that the gambler can assist their decision using an independent
randomization, and explain why it is a reasonable assumption. The problem is
inherently time-inconsistent due to the probability weighting in CPT, and we
study both precommitted and naive stopping strategies. We turn the original
problem into a computationally tractable mathematical program, based on which
we derive an optimal precommitted rule which is randomized and Markovian. The
analytical treatment enables us to make several predictions regarding a
gambler's behavior, including that with randomization they may enter the casino
even when allowed to play only once, that whether they will play longer once
they are granted more bets depends on whether they are in a gain or at a loss,
and that it is prevalent that a naivite never stops loss.
