  Fighting Fantasy is a popular recreational fantasy gaming system worldwide.
Combat in this system progresses through a stochastic game involving a series
of rounds, each of which may be won or lost. Each round, a limited resource
(`luck') may be spent on a gamble to amplify the benefit from a win or mitigate
the deficit from a loss. However, the success of this gamble depends on the
amount of remaining resource, and if the gamble is unsuccessful, benefits are
reduced and deficits increased. Players thus dynamically choose to expend
resource to attempt to influence the stochastic dynamics of the game, with
diminishing probability of positive return. The identification of the optimal
strategy for victory is a Markov decision problem that has not yet been solved.
Here, we combine stochastic analysis and simulation with dynamic programming to
characterise the dynamical behaviour of the system in the absence and presence
of gambling policy. We derive a simple expression for the victory probability
without luck-based strategy. We use a backward induction approach to solve the
Bellman equation for the system and identify the optimal strategy for any given
state during the game. The optimal control strategies can dramatically enhance
success probabilities, but take detailed forms; we use stochastic simulation to
approximate these optimal strategies with simple heuristics that can be
practically employed. Our findings provide a roadmap to improving success in
the games that millions of people play worldwide, and inform a class of
resource allocation problems with diminishing returns in stochastic games.
