Valuing a game using recursion

88 Views Asked by At

An urn contains 4 marbles: 2 red and 2 green. You extract them one by one without replacement. If you extract a green marble, I pay you 1 dollar; if you extract a red marble, you pay me $1.25. You can quit playing at any time. Use recursion to value this game from your perspective.

What does it mean to use recursion to value something? How do I go about it?

1

There are 1 best solutions below

7
On BEST ANSWER

Recursion calls for reducing the problem to simpler problem(s). We might define a function $V(a,b)$ for the value of the game where there are $a$ green marbles and $b$ red marbles. If you couldn't stop playing, we would have $V(a,b)=\frac a{a+b}(1+V(a-1,b))+\frac b{a+b}(-1.25+V(a,b-1))$. Each term is of the form chance we drew that color this round times (payoff this round times plus value of the rest of the game). As we have the right to quit, if the expected value is negative, we should quit and take zero, so we get $V(a,b)=\max (\frac a{a+b}(1+V(a-1,b))+\frac b{a+b}(-1.25+V(a,b-1)),0)$. Clearly $V(0,0)=0$ because there is nothing to draw. This lets you find $V(1,0)$ and $V(0,1)$, then climb the ladder.