Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Playing Pacman with Monte Carlo Tree Search

Playing Pacman with Monte Carlo Tree Search

Writing algorithms for Artificial Intelligence is a lot of fun. You end up teaching your software how to move and learn in the environment and how to take actions to survive to obstacles and threats. But this is still software. How do you know your AI is not dumb as doorknobs? How do you test something that thinks and decides in its own terms? How can you be sure it is following your inputs in a strategic way?

Daniele Polencic

July 06, 2017
Tweet

More Decks by Daniele Polencic

Other Decks in Technology

Transcript

  1. ! "

  2. 2 1

  3. 2 1

  4. 2 1 3 2 1 3 2 1 3 2

    1 3 2 1 3 2 1 3
  5. 2 1 3 2 1 3 2 1 3 2

    1 3 2 1 3 2 1 3
  6. 2 1 3 2 1 3 2 1 3 2

    1 3 2 1 3 2 1 3
  7. 2 1 3 2 1 3 2 1 3 2

    1 3 2 1 3 2 1 3
  8. 2 1 3 2 1 3 2 1 3 2

    1 3 2 1 3 2 1 3
  9. 2 1 3 2 1 3 2 1 3 2

    1 3 2 1 3 2 1 3
  10. 2 1 3 2 1 3 2 1 3 2

    1 3 2 1 3 2 1 3
  11. 2 1 3 2 1 3 2 1 3 2

    1 3 2 1 3 2 1 3
  12. 2 1 3 2 1 3 2 1 3 2

    1 3 2 1 3 2 1 3
  13. 2 1 3 2 1 3 2 1 3 2

    1 3 2 1 3 2 1 3
  14. 2 1 3 2 1 3 2 1 3 2

    1 3 2 1 3 2 1 3
  15. 2 1 3 2 1 3 2 1 3 2

    1 3 2 1 3 2 1 3
  16. 2 1 3 2 1 3 2 1 3 2

    1 3 2 1 3 2 1 3
  17. 2 1 3 2 1 3 2 1 3 2

    1 3 2 1 3 2 1 3
  18. 2 1

  19. 2 1

  20. 2 1 3 2 1 3 2 1 3 2

    1 3 2 1 3 2 1 3
  21. 2 1 3 2 1 3 2 1 3 2

    1 3 2 1 3 2 1 3
  22. 2 1 3 2 1 3 2 1 3 2

    1 3 2 1 3 2 1 3
  23. 2 1 3 2 1 3 2 1 3 2

    1 3 2 1 3 2 1 3
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 1 1 0 0 1 0 0 1 0 0 1 0 0 1 1 1 4 1 0 4 0 1 4 0 1 4 0 0 4
  41. 3 1 12 0 2 12 3 3 24 1

    0 4 0 0 1 0 0 1 1 0 1 0 0 1 0 1 1 1 0 1 0 0 1 0 0 1 1 0 1 0 1 1 0 0 1 0 0 1 0 0 1 0 1 1 0 0 1 0 0 1 0 0 1 0 0 1 1 1 4 1 0 4 0 1 4 0 1 4 0 0 4
  42. 0 2 12 0 1 1 0 0 1 0

    0 1 0 0 1 0 1 1 0 0 1 0 0 1 0 0 1 0 0 1 0 1 4 0 1 4 0 0 4
  43. const message = { type: PACMAN_MOVES, direction: 'left' }; const

    state = { pacman: {x: 1, y: 0}, red: {x: 0, y: 2} };