Artikel getaggt mit asteroids

Asteroids bot submitted, publishing source

A while ago I blogged about my participation in the c’t programming contest to write a bot that plays against the 1979 Atari console.
Submission deadline was June 30th, and the results are trickling in now.

I am on rank 104, which I’m more than satisfied with. Unsurprisingly I didn’t make the top 50, I spent way too little time on it. But I had lots of fun with it, I have something that works, and at least outperforms my own Asteroids skills :-)

In case anyone is interested in it, the source code is on http://piware.de/bzr/ct-asteroids/. It’s a bzr branch, so you can bzr get the directory.

Tags: , , ,

My computer discovered playing games

The other day I read about the current c’t programming contest and got addicted immediately. The task is to create a program which plays the Atari Asteroids game from 1979:

Unfortunately they do not send that gem to everyone :-), but they do send the original 8 KB of ROM, so you can play it on the MAME emulator.

So far I got the emulator and the game running, and have a Python script which tracks the objects and their velocity vectors. I spent half of the weekend doing the vector analysis bits with good old pencil and paper. Reviving all the maths bits from school (about 11 years ago) was a lot of fun! Now I have useful formulas for determining the shooting angle to hit a moving comet from a moving and decelerating ship, determining if and when two moving objects with given radius collide, etc. In my head I have a first cut of a strategy, too.

Now I just need to find some time to actually implement all of this…

Once the contest is over, I’ll publish my sources, in case anyone else is interested.

Tags: , ,