Looking at the bottom of the JS file [1], it looks like OP already started working on a genetic algorithm for this. I don't have time right now, but for anyone who's curious to try, you can just call
myRPG.parseKeyPress({keyCode: 40})
replacing keyCode with the respective key's code, to automate moves. The global variable "dead" should tell you if you've failed, and "score.innerText" should tell you how well you've done :-)