>>
Yes, there are many ways of going about this. Some smarter than others.
For something like this, an analytical approach would be best and just solve for the various families of functions determining the dominant strategy given the provided boundary conditions.
The second, slightly less intelligent thing you can do is to run an AI search on the permutation space of each iteration. I.E. you take a node, with initial conditions ($5, $0) and branching on each possible bet from there on some determined granularity (which you did not specify--I assume 1 cent) and then recursively produce the outcomes. You may then run a a-b pruning search, A* search, etc.
The third possible thing is to do a non-deterministic search, sort of like a monte-carlo simulation but where at each point you can define the transition function from the current space to the next. The gradient of this n-Dimensional discretized Hilbert space is then the appropriate betting strategy from those conditions.
In this example, and many others, you may find that while there may be a single dominant strategy, the values for that strategy (i.e. how much to bet) are not static. They are inherently a function of the initial conditions, and one that can be rapidly calculated by a parallel program. It would not be unreasonable to make use of OpenCL or CUDA for this as the space gets very large with zero dependence between siblings in the graph. This is in fact how much finance is done these days. Big ass racks of nVidia Teslas.
However, for your purposes, I would honestly say that an analytical solution might be more rapid than a programatic one. If you've not taken one course in vector calc and another in differential equations, go do that. Academic earth and coursera have an amazing selection. Then read von Neumann and Nash's respective works on game theory economics. Specifically the sections on two-person zero-sum non-cooperative games.