I've wanted to do this for a long time, and I finally found a way of doing it pretty nicely.
Basically, this game adds a new object. Just one. It exists in every room, and all it does is check variables and issues keyboard commands.
The idea is to get spelunky to play itself. Amusing and great fun (for me at least

)
So far it isn't the smartest thing in the world, but can occasionally complete levels. It sometimes gets to level 2, rarely gets to level 3 and i dont think it has ever got to level 4 (let alone the jungle). This is out of over 500 runs so far (from initial development)
Issues: It get often get itself stuck in a loop. There is a desperation clause of throwing a bomb, which in most cases it will distance itself from and wait for it to explode before carrying on
It doesn't see spikes.
It doesn't see damsels.
I grabs the idol, but doesn't use money so is pointless (i did this for laughs) it doesn't even try to escape from the boulder, just carries on as if its not there.
It hates ledges. WITH A VENGENCE
and a few more i forgot.
It WILL skip the first dialogues and start the game automatically, and when it dies, will run out of the highscores and back to the game asap.
If it ever gets to the jungle level, it won't move I'm guessing. It should actually stay on the transition screen forever (unless you press X). But yeah, it's never gotten there so I haven't bothered coding it. I'll eventually make it handle the tunnel man payments, and use the shortcut house.
DOWNLOADplease post your experiences/suggestions!