I've found some HTML/Canvas/Javascript browser based games that I don't particularly enjoy playing, but which I think would be fun to write robots for. Are there any tools out there which help remove some of the tedium of the work, and get me closer to writing the actual AI portion of the code?

  • 1
    \$\begingroup\$ Just to keep things on the up and up, 99% of web games prohibit this in their terms of service. Please do not construe any advice here as encouragement to violate the terms of any game. \$\endgroup\$ – coderanger Oct 14 '10 at 23:51
  • \$\begingroup\$ I could see applications of this outside of game playing, too - for example, for building automated tests for a given website. \$\endgroup\$ – blueberryfields Oct 14 '10 at 23:52
  • \$\begingroup\$ Sellenium is a javascript based testing framework/server which records actions of a user and can replay them on the server for testing seleniumhq.org \$\endgroup\$ – David Young Oct 15 '10 at 0:32
  • \$\begingroup\$ Sure, there is no shortage of legitimate applications for these technologies. Some web games even allow or directly sanction these kinds of things. Just want to make sure SO legal doesn't come after us. \$\endgroup\$ – coderanger Oct 15 '10 at 8:07

So it looks like what the author of the question wants is basically to hack server calls of web based games?

If that's the case I'm adding another answer which is very different from my first answer


Fiddler is a web debugging proxy. It will let you setup a proxy between you(the client) and the server.
The proxy has a ton of configurations will will let you save sessions, replay sessions, pause AJAX requests and edit them on the fly.

It can log all AJAX requests so you could build a HTTP robot which could simulate playing the game.

Fiddler was originally created by a PM at Microsoft for debugging websites, and web interactions of applications.


Why bother writing the boring interface code and use AI Api's directly? Program the AI not the interaction with the game itself.

Starcraft 1

The very popular BroodWars API allows for commanding all the units to do anything a real player could. You can even battle against other players or AI's with your AI


Super Mario

This API allows for you to control Mario! It was a contest for the best level generation and fastest level completion AI. (A* actually won)



There is currently a contest for the best Galcon AI, a Google AI Challenge. Of course Galcon API is provided.


  • \$\begingroup\$ Some of the games I'm interested in aren't providing fully fleshed out, (or fully documented) APIs. I guess what I'm really looking for are tools which can scrape the client source for server calls and provide me with info about what is available for me to use. \$\endgroup\$ – blueberryfields Oct 14 '10 at 22:40
  • \$\begingroup\$ I've had friends interact with simpler games directly, using the Java Robot class download.oracle.com/javase/6/docs/api/java/awt/Robot.html which lets you do system calls to click, or manipulate the keyboard. \$\endgroup\$ – David Young Oct 14 '10 at 22:43
  • 1
    \$\begingroup\$ Slightly besides the point of the question but interesting links. Tnx. \$\endgroup\$ – Eugen Constantin Dinca Oct 14 '10 at 23:21
  • \$\begingroup\$ Wasn't sure exactly what the author was asking for. If it's to program AI for games that already exist. This is a start. If it's to hack games to make robots, that's a very different question. \$\endgroup\$ – David Young Oct 15 '10 at 0:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.