Optimal strategies in the Fighting Fantasy gaming system: influencing stochastic dynamics by gambling with limited resource