This is a preview
This playground version isn't public and is work in progress.
Final words
This is the final lesson of that mini course. The idea was demystifying Monte Carlo, and teach people how to make use of it with some live examples.
Pros
- Simple method, the whole pseudo code is like 9 lines.
- Good results in many cases.
- Low memory usage.
Cons
- It's suboptimal, it doesn't guarantee a good solution, and even less the optimal one.
- It doesn't learn, each test is independent from others. There are other search methods like Genetic Algorithms that try to use good solutions for searching better ones.
- Time consuming. It takes a lot of processor time compared to mathematical methods.
- As other search solutions it's very dependent on simulation and evaluation quality. If you have a bad simulation you can't score the outcome correctly, because what you simulated isn't accurate.
Codingame Puzzles
There are many Codingame puzzles where you can use Monte Carlo:
- https://www.codingame.com/multiplayer/optimization/code-vs-zombies as explained here
- https://www.codingame.com/multiplayer/bot-programming/smash-the-code as explained here
Among others.
Other interesting links
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content