hétfő, február 22nd, 2010 | Author:

The challenge this year is to create a bot which plays Tron against other bots. Random maps, random opponents.  My brother, knowing me, gave me a link.

I jumped to this opportunity. Of course. But let me get this clear: I never dreamed about winning. There are a lot of people out there who is better educated and smarter than me. On the other hand, this was the perfect playground to test some of my theories against other people.

I came up with the idea of multi layered AI a few years ago, but so far I never tried to create an actual program based on it. The essence of the idea is that a decision is made by going through several layers, which collect the possible decisions or filter them. (obviously collecting should come first)

Besides I was aiming at the (nonexistant) style prize, so that the abstraction of my code was a king who wants to build the longest wall. Every time when a section of the wall is complete, he asks the council which way to go next. Sadly I needed to abandon this, and create “ugly” code instead, because I didn’t have enough time.

So here is the basic structure of my first bot:

- The first layer is the Master of War. He knows that we need to go close to the “enemy”, so that we can close him out. On the other hand, he won’t let us to go too close, because that way the builders would clash.

- The second layer is the Master of Geography. He knows the lay of the land and can tell the king which way will lead the builders to a dead end. The first version of this Master was lazy and just looked around from the hilltop. So the king fired him and nominated a new one, who used scouts to look around.

- The third layer is the Master of Spies. He watches the enemy, keeps tabs of his movements and tries to predict which way he goes next.

- The Fool of the King was kicked out of the council. All he wanted was building a heart shaped wall on Valentines day, but we didn’t have the resources.

Based on the chances the King made a decision. (basically just took the one with the highest chance or picked one randomly from the one with the highest chances if there were more than one with the same chance.)

All in all, the bot was fairly successful, taking me the the first hundred, without using any specialized algorithm of game theory.

I hope next year it will be different. I’d like to see a game where your bot have to cooperate with other bots. That is not something that can be won by using pure mathematics. It’s much closer to real AI.

Category: Hobbi
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Leave a Reply » Regisztráció / Log in


You must be logged in to post a comment.