New bots!
Re: New bots!
Google had a contest about writing tron AIs. Maybe its possible to grab something from there.
Re: New bots!
I hope! No one seemed interested when I posted about that before.
- AI-team
- Shutout Match Winner
- Posts: 1020
- Joined: Tue Jun 23, 2009 6:17 pm
- Location: Germany/Munich
- Contact:
Re: New bots!
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
- Patchman5000
- On Lightcycle Grid
- Posts: 35
- Joined: Fri Apr 29, 2005 3:06 am
- Location: Wonderland
Re: New bots!
Yeah... I remember that, was quite cruel.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.
- Tank Program
- Forum & Project Admin, PhD
- Posts: 6711
- Joined: Thu Dec 18, 2003 7:03 pm
Re: New bots!
Yes, I remember that. But I don't see any code anywhere...Jip wrote:Google had a contest about writing tron AIs. Maybe its possible to grab something from there.
Re: New bots!
There is this thread and the source of the winner is on GitHub.Tank Program wrote:Yes, I remember that. But I don't see any code anywhere...Jip wrote:Google had a contest about writing tron AIs. Maybe its possible to grab something from there.
But I dont know if it is really usefull. Also I couldn't find any licence for it.
- Tank Program
- Forum & Project Admin, PhD
- Posts: 6711
- Joined: Thu Dec 18, 2003 7:03 pm
Re: New bots!
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...
Re: New bots!
Oh, and I found his blog entry where he explaines his method. I wish that I spoke cpp
Re: New bots!
Interesting read, but the bot is playing a totally different game than we'd need it to.
- Tank Program
- Forum & Project Admin, PhD
- Posts: 6711
- Joined: Thu Dec 18, 2003 7:03 pm
Re: New bots!
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.
- AI-team
- Shutout Match Winner
- Posts: 1020
- Joined: Tue Jun 23, 2009 6:17 pm
- Location: Germany/Munich
- Contact:
Re: New bots!
But the MinMax thingy would be quite useful for sumoZ-Man wrote:Interesting read, but the bot is playing a totally different game than we'd need it to.
"95% of people believe in every quote you post on the internet" ~ Abraham Lincoln
Re: New bots!
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.
Re: New bots!
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.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.
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.
- Tank Program
- Forum & Project Admin, PhD
- Posts: 6711
- Joined: Thu Dec 18, 2003 7:03 pm
Re: New bots!
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:
Example response plug-in...
Example attack plug-in sequence... Phase 1:Phase 2:Phase 3:
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...
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
- Turn
- Continue straight
- Brake
- Grind
- Double bind, triple bind, etc
- Dig
- Dogfight (rapid turns)
- 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
- 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
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
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
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
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.
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...
- compguygene
- Adjust Outside Corner Grinder
- Posts: 2346
- Joined: Thu Aug 21, 2008 12:09 pm
- Location: Cleveland, Ohio
- Contact:
Re: New bots!
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.
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
https://bit.ly/2KBGYjvCheck out the simple site about TheServerPharm