
Show HN: A Pitfall Playing Agent - DougHaber
https://github.com/DougHaber/pitfall-agent-javatari
======
DougHaber
This is a Pitfall! playing agent. The emulator Javatari.js was used as a
platform for this and modified to have the needed hooks and behaviors.

The algorithm is very simple. Each screen is treated as a separate level.
Commands are randomly chosen, and anything that helps the agent move forward
is saved. If the score goes down or the player's height goes below the
surface, the game resets and a bit of history is trimmed.

Here is a youtube video of a trained path for 20 minutes:
[https://www.youtube.com/watch?v=I4j8xWq1Jsc](https://www.youtube.com/watch?v=I4j8xWq1Jsc)

This will not play an optimal game, which requires using the underground and
not accidentally jumping over treasure.

