Indeed. I am also surprised that no one mentioned Tom Murphy's Sigbovik paper from April 1st 2013 - "The First Level of Super Mario Bros. is Easy with Lexicographic
Orderings and Time Travel ... after that it gets a little tricky"
http://www.cs.cmu.edu/~tom7/mario/mario.pdf
Murphy created an agent that can play arbitrary games by inspecting the RAM and attempting to maximize the score.
While interesting, he uses a brute force approach (try every possible combination of moves so many seconds into the future and see which one is the best.)