New bots!

What do you want to see in Armagetron soon? Any new feature ideas? Let's ponder these ground breaking ideas...
User avatar
Jip
Round Winner
Posts: 397
Joined: Sat Sep 26, 2009 5:32 pm

Re: New bots!

Post by Jip »

Google had a contest about writing tron AIs. Maybe its possible to grab something from there.
User avatar
sinewav
Graphic Artist
Posts: 6413
Joined: Wed Jan 23, 2008 3:37 am
Contact:

Re: New bots!

Post by sinewav »

I hope! No one seemed interested when I posted about that before. :|
User avatar
AI-team
Shutout Match Winner
Posts: 1020
Joined: Tue Jun 23, 2009 6:17 pm
Location: Germany/Munich
Contact:

Re: New bots!

Post by AI-team »

I watched some of the "fights" but they get boring pretty fast xD
  
 
"95% of people believe in every quote you post on the internet" ~ Abraham Lincoln
 
 
User avatar
Patchman5000
On Lightcycle Grid
Posts: 35
Joined: Fri Apr 29, 2005 3:06 am
Location: Wonderland

Re: New bots!

Post by Patchman5000 »

Phytotron wrote:This is still my favorite: http://forums3.armagetronad.net/viewtop ... =11&t=3280

That one was pretty mean, for the ones who fell for it.
Yeah... I remember that, was quite cruel.
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6711
Joined: Thu Dec 18, 2003 7:03 pm

Re: New bots!

Post by Tank Program »

Jip wrote:Google had a contest about writing tron AIs. Maybe its possible to grab something from there.
Yes, I remember that. But I don't see any code anywhere...
Image
User avatar
Jip
Round Winner
Posts: 397
Joined: Sat Sep 26, 2009 5:32 pm

Re: New bots!

Post by Jip »

Tank Program wrote:
Jip wrote:Google had a contest about writing tron AIs. Maybe its possible to grab something from there.
Yes, I remember that. But I don't see any code anywhere...
There is this thread and the source of the winner is on GitHub.
But I dont know if it is really usefull. Also I couldn't find any licence for it.
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6711
Joined: Thu Dec 18, 2003 7:03 pm

Re: New bots!

Post by Tank Program »

Ack, that's complex. It may be worth trying to understand at some point though. As for licensing if it looks good enough we can always ask...
Image
User avatar
Jip
Round Winner
Posts: 397
Joined: Sat Sep 26, 2009 5:32 pm

Re: New bots!

Post by Jip »

Oh, and I found his blog entry where he explaines his method. I wish that I spoke cpp :P
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: New bots!

Post by Z-Man »

Interesting read, but the bot is playing a totally different game than we'd need it to.
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6711
Joined: Thu Dec 18, 2003 7:03 pm

Re: New bots!

Post by Tank Program »

An interesting read indeed. I wonder if that's the approach most people take to writing AIs, thinking in terms of a specific target... Or something like that. I feel inclined to approach it more from a strategic thinking side (at least for my 3 bot team). I.e., not grid area to control or how to settle an end game, but what moves the bot should make to produce a desirable result. Maybe one's just the formalization of the other.
Image
User avatar
AI-team
Shutout Match Winner
Posts: 1020
Joined: Tue Jun 23, 2009 6:17 pm
Location: Germany/Munich
Contact:

Re: New bots!

Post by AI-team »

Z-Man wrote:Interesting read, but the bot is playing a totally different game than we'd need it to.
But the MinMax thingy would be quite useful for sumo
  
 
"95% of people believe in every quote you post on the internet" ~ Abraham Lincoln
 
 
User avatar
Jip
Round Winner
Posts: 397
Joined: Sat Sep 26, 2009 5:32 pm

Re: New bots!

Post by Jip »

Yes, those bots have the aim to stay alive, not to kill the other player or conquer/defend a zone. Also they dont know such things like rubber, cycle_delay etc. But maybe some inspirations can get picked from it.
User avatar
clime
On Lightcycle Grid
Posts: 10
Joined: Mon Feb 15, 2010 9:53 pm
Contact:

Re: New bots!

Post by clime »

Tank Program wrote:An interesting read indeed. I wonder if that's the approach most people take to writing AIs, thinking in terms of a specific target... Or something like that. I feel inclined to approach it more from a strategic thinking side (at least for my 3 bot team). I.e., not grid area to control or how to settle an end game, but what moves the bot should make to produce a desirable result. Maybe one's just the formalization of the other.
Well, that is minmax - let good moves emerge from searching for the best position. Good moves are those that lead to a good position. Do such moves but avoid position where your opponent could counterattack effectively. This is kind of implicit definition of a good move.

I think, you suggest an approach where you define set of actions (where actions are composed of individual moves) and let the bot choose the best action at the moment. Let's say, the bot has got boxing action and some others so he thinks like this: "So I can do that, that, and that but I can also box him! And that is worth 1000 being the best thing I can do now. Let's do it."

This is more human-like. But in fact, it is just like action-based minmax searching only to depth 1.

If you use such approach, you usually have evaluation function specific for each action instead of one universal for positions (called in leaves of the minmax tree). That is natural, intuitive continuation of the approach that leads to plenty of modifiers for comparing moves between each other. Such modifiers are not a good thing. In general, less modifiers you have got, more happy you are.

So, you can use real minmax but still implement actions such as the suggested 3-bot thing, my favourite quadbox (cca six moves in sequence), or anything else. The alpha-beta prunning is then just simple optimization that makes the code two times faster.

All the graph things (Voronoi, Dijkstra, graph components) that the guy describes in his blog are for the function evaluating positions. This function should estimate your chance of winning and return the value accordingly. The higher the number, the better your position is and the better are chances of your victory. That is the most important and problematic part. Otherwise minmax is always the same. Such functions are always heuristical (we can't see the future) and very often hard to implement.

I think we should use his and similar graph methods to define the function but make it so the bot is fun to play. That is possible. Such code could be also used to play sumo or even fort. The (almost) only thing changing would be the evaluation function.

I would also try a neural network to compute the evaluation function but just as an experiment. It could work great. Allright, I talk too much..but I love this stuff xD.
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6711
Joined: Thu Dec 18, 2003 7:03 pm

Re: New bots!

Post by Tank Program »

Hmm, yes, I see what you're saying. Or at least it was blinding clear while I was reading it and has now turned to mush that I sit down to write a reply... This sort of thing really is complete play time for me where I get to test out the bits and pieces of knowledge I know and have learned in what at the very least are some sort of thought experiments. We've got an idea of designing bots now and how the work at a functional level to some extent.

Let's say we take this to the next level. We want to design a bot for Armagetron that's fun to play. The original bots had a horrible weakness of boxing themselves in. They were upgraded and now have the horrible weakness of predictability. I can play against the level 100s and beat them limited only by my reflexes, i.e., physically hitting the keys too late. There are situations I can enter where I know that if it was a real player they would have be stone cold, but the bots don't, can't even, do it.

Therefore fun bots must at least do two things:
  • Not box themselves in
  • Be unpredictable
Unfortunately, this is still a little bit vague. We need to define their action somehow. We can draw on our knowledge of how players play to enhance the list. So bots should if at all possible have a range of moves to draw on:
  • Turn
  • Continue straight
  • Brake
  • Grind
  • Double bind, triple bind, etc
  • Dig
  • Dogfight (rapid turns)
These moves should be used to achieve an appropriate goal of some sort:
  • Not hit walls (this should be obvious...)
  • Attack a player:
    • A sudden cut-off
    • A planned entrapment
  • Escape from attack from a player
  • Attack a zone
  • Defend a zone
All this needs to be combined with some of the other clever stuff we've been talking about. The bots should be able to search out a move (that first list) to accomplish a goal (second list) through one (or a combination) of the following techniques:
  • Random chance
  • A planned course of action
  • Comparison to previous situations (learning)
  • In depth searching for what looks to be a good move (minmax type)
  • Experimental combination
This of course makes it look a bit complex, but I suppose that with the right code infrastructure each element of the list becomes a plug-in to become activated to define that particular bot. Something like that... Writing a large set of response scenarios to situations to be evaluated might be a less than ideal solution, but could be a hell of a lot of fun. Especially if we whack it into a scripting language which anyone can do... Then the bots get to become increasingly unpredictable.

Example response plug-in...

Code: Select all

IF RIMWALL == LEFT && RIMWALL < 0.5
IF ENEMY == LEFT && ENEMEY < 0.5
TURN RIGHT
DIG
TURN RIGHT
END
END
Example attack plug-in sequence... Phase 1:

Code: Select all

IF ENEMY > 10 && NEXTENEMY > 50
TURN ENEMY
TRIGGER PHASE2 # This gives the code a preference for the next move in the sequence
END
Phase 2:

Code: Select all

#This would be a bit of code that directs the bot to grind along the trail towards the enemy and triggers Phase 3
Phase 3:

Code: Select all

#A bit of code that tell sthe bot to side up right behind the enmey and double bind to cut if off, or to retreat back to its own wall to gain more speed for a phase 4.
All of that could of course be written out in the appropriate code if the stupid language had been defined. A bit specific and poor if only one man does it, but if we get a bunch of people writting plug-ins like this. Hell, we could make 'em resources. I think I may have gotten a bit of track here. It's probably possible to get the software to come up with all these things by itself to some extent too. May have just confused myself horribly. Meh.

Edit: Fun idea. The success of moves (plug-ins) tried could be recorded and used as part of the calculation for deciding to use that move. We could end up with (in effect) a distributed computing project to come up with the most amazing Armagetron bot possible. Ever growing, ever expanding... although potentially biased against trying new moves... Hmm... There's something there I think...
Image
User avatar
compguygene
Adjust Outside Corner Grinder
Posts: 2342
Joined: Thu Aug 21, 2008 12:09 pm
Location: Cleveland, Ohio
Contact:

Re: New bots!

Post by compguygene »

A while back I spent some time researching how the bots could be improved. I will dig up links to flesh this out, but this is the idea that I had. I came across some research where for some online game, they had setup a server specifically for a bot to learn how players played, and then to build decision trees accordingly that could be hardcoded into the bot for performance.

Here is my thought. Gameplay in different types of servers can be very different. So I really think you would need to create a new setting GAME_MODE. Like this.
GAME_MODE 1 #Deathmatch
GAME_MODE 2 #Open play
GAME_MODE 3 #Fortress
GAME_MODE 4 #Sumo

Certainly, you would want to over time develop more, but this would be a good starting place. Also GAME_MODE could be used as a sorting mechanism on the Master List, and for other things.

For the bot to learn, you would setup a server, just for that purpose, and (hopefully) get players to play there. Could you imagine a 6v6 bot fortress team that has different strategies based on starting position? This could even lead to servers that teach n00bs! But seriously, a GAME_MODE 1 bot would be a lot better, especially as time goes on and it learns more. If done in a modular manner, server owners could update their bots based on a person running a "bot" server releasing the latest, installable decision tree.

I will post more later, after digging up what i researched before.
Armagetron: It's a video game that people should just play and enjoy :)
https://bit.ly/2KBGYjvCheck out the simple site about TheServerPharm
Post Reply