79078409

Date: 2024-10-11 13:25:46
Score: 1
Natty:
Report link

A simple monte carlo simulation goes a long way indeed.

Note this is a randomized game so "Bellman-equation based" methods have no mathematical proof. This is probably why expectimax algorithms work well for this problem.

Anyhow, this is my code snippet. Essentially it's 10 lines of simulation which runs for about 4 minutes on an i7 cpu and achieves 80% win rate (the runtime is due to the not-so-fast implementation of the gym environment and my inability to get pygame to install on pypy).

Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: SiminSimin