-
2 Comments
Richard Zapor
on 24 Feb 2013
James, your speed is impacted by recalculating previously evaluated cases. A case of 100 v 100 finished in ??
James
on 26 Feb 2013
You're correct. It is inefficient with super-large armies. I was going for an exact solution (which was an offshoot of the original problems I had with the test suite), and recursion seemed to be the best way to do it.
As our resident "Get this problem to run faster" expert, do you think setting up a global m-by-n matrix with previously calculated probabilities would help things?
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!