HN Theater @HNTheaterMonth

The best talks and videos of Hacker News.

Hacker News Comments on
Speed running web games with Python

audionautics · Youtube · 50 HN points · 0 HN comments
HN Theater has aggregated all Hacker News stories and comments that mention audionautics's video "Speed running web games with Python".
Youtube Summary
**Instructions for building your own bots can be found here: http://active.tutsplus.com/tutorials/workflow/how-to-build-a-python-bot-that-can-play-web-games/

*Note: The shell output and the video don't line up. I had to record them separately since the code forces focus onto the game which hides the interpreter. So its output is responding to a different run *

**For those testing out the code, you'll need to make sure you have Python Imaging library (http://www.pythonware.com/products/pil/), and PyWin (http://sourceforge.net/projects/pywin32/) installed. Make sure to set your environment PATH to include the pywin directory otherwise you'll still get the import error.


Speed running (slowly) with Python. It finishes it run in just over 1 hour and 20 minutes. It's severely edited down because watching a computer play a videogame is about as exciting as watching a human.

Small practice program for controlling things onscreen. Pretty clunky, but it will play beginning to end with no problems. Code and notes on github (https://github.com/Audionautics/Burrito-Bot)

It responds to police and bubble gummies... just not very often. The bison has to be traveling pretty slow in order to 'see' them. It responds fairly we'll to special events such as the pogo stick and glider (all it has to do is see it and then click).

There are TONS of things to fix, but it's good enough for now.
HN Theater Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this video.
Feb 05, 2012 · 50 points, 10 comments · submitted by googletron
anthonyb
Reminds me of Sikuli: http://sikuli.csail.mit.edu/ If you check out their blog, they have a script which plays Angry Birds.

I've done similar things myself, with boring online/Facebook games. If you can script it, it's not a very interesting game.

edit: Here's my take on the ethics of bots: http://blog.oarsum.com/post/255516489/cheating-and-game-desi...

janzer
I agree; Chess has so little to make it interesting. :P
anthonyb
Heh. I guess chess has been scripted, but it took long enough that I'd probably consider it to still be an interesting game.
Vivtek
Man, when I tried to do this with Tower Defense a few years ago I had the devil of a time reading the screen. I did end up managing to do everything but good OCR on the digit status displays, though - then lost interest.

I'll bet everything would work better now...

Serentiynow
I would define this as a tool assisted speed run (TAS). Check out TASVideos.org if you are interested in reading more. The site is dedicated to TASing console games in emulators using various programming languages.
jamesu
Many times i've wanted to finish a game which requires a succession of boring and repetitive commands to complete. Automating it like i do any other development task seems like the perfect solution!
gojomo
Is there a script for Cow Clicker yet?
dotpot
http://news.ycombinator.com/item?id=3554814
djtriptych
tl;dr - Python bot plays online game via point and click. Source code here: https://github.com/Audionautics/Burrito-Bot/blob/master/Burr...

Not gonna win any awards for code style, but projects like this are the kind of things that make me glad I know at least one language really well.

The source is just a few hundred lines of extremely readable code that accomplishes something pretty remarkable.

ashconnor
New to Python, so the user says on Reddit.
Serentiynow
And here is the link to the Reddit post. http://www.reddit.com/r/programming/comments/pb63q/speed_run...
HN Theater is an independent project and is not operated by Y Combinator or any of the video hosting platforms linked to on this site.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.