Monte Carlo Method in 7 Minutes

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:

Among others.

Other interesting links

https://en.wikipedia.org/wiki/Monte_Carlo_method

Open Source Your Knowledge: become a Contributor and help others learn. Create New Content