Seth Bling made a bot — MarI/O — that automatically learns how to play Super Mario World. It’s based on research by Kenneth O. Stanley and Risto Miikkulainen from 2002 that uses neural networks that evolve with a genetic algorithm. MarI/O starts out really dumb, just standing in place, but after enough simulations it get smart enough to navigate the world.
Code available here and the paper from Stanley and Mikkulainen is here.
See also: the genetic algorithm walkers.