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.<p>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.<p>Here is a youtube video of a trained path for 20 minutes:
<a href="https://www.youtube.com/watch?v=I4j8xWq1Jsc" rel="nofollow">https://www.youtube.com/watch?v=I4j8xWq1Jsc</a><p>This will not play an optimal game, which requires using the underground and not accidentally jumping over treasure.