-
Notifications
You must be signed in to change notification settings - Fork 3
Stochastic Dynamic Programming in Java
We provide an example-driven short introduction to Stochastic Dynamic Programming in Java.
This problem is taken from W. L. Winston, Operations Research: Applications and Algorithms (7th Edition), Duxbury Press, 2003, chap. 19, example 3.
A gambler has initialWealth. She is allowed to play a game of chance over a given betHorizon, and her goal is to maximize her probability of ending up with a least targetWealth.
If the gambler bets $b on a play of the game, then with probability p, she wins the game and increases her capital position by $b; with probability (1-p), she loses the game and decreases her capital by $b.
On any play of the game, the gambler may not bet more money than she has available.
Determine a betting strategy that will maximize the gambler's probability of attaining a wealth of at least ${@code targetWealth} by the end of the betting horizon.