Should you take this discount on marbles? Playing the marble game
There's a simple game, where you're told how many red marbles and green marbles are in a bag.
You can then pay one coin to randomly withdraw one marble from the bag, if it's green you gain 1 point, or if it's red nothing happens.
Putting marbles back
At any point during the game, you can put all the marbles you've withdrawn back in the bag.
For example, if the first marble you take out is green, then you probably want to put it straight back in, to increase your chances of the next marble being green.
Or, if you've withdrawn a lot of red marbles, you may want to hold on to them, to decrease the chance of the next marble being red.
Taking the special discount
As a twist, there's a special discount, where for only 9 coins you can withdraw 10 marbles. Or, if you prefer you can continue to pay 1 coin per marble.
If you do choose to take the discounted 10 marbles, be aware that you must take all 10 out before you can choose to put marbles back in the bag.
So there's a trade-off: You get a 10% discount, but lose the option of resetting the odds between each marble.
The best strategy?
You have 100 coins, what's the best strategy to win the most points?

My thoughts
My instinct says that whether you should take 1 marble at a time or the discounted 10 marbles depends on how many of each marble are in the bag initially, as well as how many marbles have already been taken from the bag during the game. But I'm not able to figure out a mathematical solution to this.
 A: You can build a dynamic program to solve the problem, then look at the solutions to see when the discount is used.  For instance, let $Q(r,g,c)$ be the expected points following an optimal strategy starting with $c$ coins, $r$ red balls and $g$ green balls in the bag.  You first note that whenever you pull a red ball from the bag you keep is aside; whenever you pull a green ball from the bag, you put it back in the bag.
The general equation is this:
$$Q(r,g,c) = \max \Big[ {r\over{r+g}}Q(r-1,g,c-1)+{g\over{r+g}}(1+Q(r,g,c-1)), \\ \sum_{i=0}^{10} P(i,r,g) * (10-i+Q(r-i,g,c-9))\Big]$$
where $P(i,r,g)$ is the probability of picking $i$ red balls out of a bag of $r$ red and $g$ green.  Initial conditions: $Q(0,g,c)=c$ if $g>0$, and $0$ if $g=0$.  $Q(r,g,0)=0$ for all $r$ and $g$.
A cursory glance at some runs (for large $r$ and $g$ and $c$), it seems the shortcut is used whenever the proportion of green balls in the bag is above some threshold so it might be possible to show that directly.
