New bots!

What do you want to see in Armagetron soon? Any new feature ideas? Let's ponder these ground breaking ideas...
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 »

Nice C header file. Now, let's see those included files!
Armagetron: It's a video game that people should just play and enjoy :)
https://bit.ly/2KBGYjvCheck out the simple site about TheServerPharm
User avatar
Jonathan
A Brave Victim
Posts: 3391
Joined: Thu Feb 03, 2005 12:50 am
Location: Not really lurking anymore

Re: New bots!

Post by Jonathan »

Those included files all exist. How about the implementation? ;)
ˌɑrməˈɡɛˌtrɑn
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 »

I have got a rough sketch of how it would work, but I don't think it would work as well as advertised. My implementation takes a bit of simplistic approach that would leave it with a few serious flaws, not the least of which is a lack of an attack mechanism. It's much harder to associate a previous action with success than with failure. (Especially in terms of the code elements already available.)

Not to mention that my C++ is a bit rusty and there are some rather complex bits of coding in there. That and I'd need to create a mechanism to make the learning persistent, as I think the bots get destroyed and created fresh each round. (Which, with that header file, would mean they forget everything each round - good way to loose consistently.)
Image
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 »

Yeah, the main problem with automatic learning in arma would be that you need to identify the past decision that was the mistake. Entering an inescapable tunnel is the bad thing, not crashing at its end.
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 »

That is a very good point. The worst bit is there's no real telling if it would identify that correctly until it actually got written. The ideal situation would be that it chooses to go down a tunnel only as a last resort, i.e., it thinks it's going to die if it does anything else. It shouldn't be driving in a straight and think "a tiny small death trap gap? I must enter!" The modifier is my attempt at influencing that. Maybe stacking backwards as a chain of decisions. The most recent one get's a 0.5, the one before 0.75. Something like that.

Another factor is the balance between number of decisions remembered and the amount of data in each decision - after all, there's only so much processing time available at each time step.
Image
User avatar
Phytotron
Formerly Oscilloscope
Posts: 5041
Joined: Thu Jun 09, 2005 10:06 pm
Location: A site or situation, especially considered in regard to its surroundings.
Contact:

Re: New bots!

Post by Phytotron »

My original post here was, "Is this for real? Or is there some programming nerd joke buried in there that I don't get?" WIthin moments dlh PM'ed me about the Portal reference (one I wouldn't have gotten myself).

Still, the latter part of that question remains true. What's all that gobbledegook (to my eyes) in that gLATIS file? I took a look at it in TextEdit, but have no idea what I'm looking at. Does it actually do anything at all, as appa suggested, or is it just some inside joke only programmers would get? Just curious since it wasn't actually explained.
User avatar
Jonathan
A Brave Victim
Posts: 3391
Joined: Thu Feb 03, 2005 12:50 am
Location: Not really lurking anymore

Re: New bots!

Post by Jonathan »

Basically it says, "Look, pretend we have code!" That's about it. If you use it as a config file, the cool effects are probably console spam about unknown commands. :)
ˌɑrməˈɡɛˌtrɑn
User avatar
sinewav
Graphic Artist
Posts: 6413
Joined: Wed Jan 23, 2008 3:37 am
Contact:

Re: New bots!

Post by sinewav »

This is the meanest joke ever.
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 »

*whistles*
Image
User avatar
Phytotron
Formerly Oscilloscope
Posts: 5041
Joined: Thu Jun 09, 2005 10:06 pm
Location: A site or situation, especially considered in regard to its surroundings.
Contact:

Re: New bots!

Post by Phytotron »

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.
foxx
Core Dumper
Posts: 110
Joined: Sat Aug 28, 2010 9:31 pm

Re: New bots!

Post by foxx »

Haha i love portal
Image
^Someone's mad ;)
User avatar
clime
On Lightcycle Grid
Posts: 10
Joined: Mon Feb 15, 2010 9:53 pm
Contact:

Re: New bots!

Post by clime »

I have been thinking about some AI strategy for Tron. But I broke my addiction on this game three months ago and don't quite wanna risk working on it yet (cause that would mean testing too...). Anyway, my idea was to make the grid discrete - divided to squares and then use min-max tree with alpha-beta pruning. But here the main problem is defining a good evaluation function. I don't have a clue atm what it should look like.

If you want learning, the first thing that comes into my mind is to use neural network. That could be interesting to try. A neural network is able to drive a real car somehow so it could drive a lightcycle well. Again discrete grid and input neurons would be set to zero/one if the tile is empty/full. You can train it while playing at the same time or maybe also on logs from fights between people.

It could be also useful to use one (or both) of these approaches with the logic you already have got. A mix of strategy implemented according to human insight and brute force, which is what computers are good at, seems to me as a good approach of tackling this problem. I am no expert in this but I have some experience from AI competitions held at my university.

Fun task.

P.S.: armagetron is the best game I have ever played. Good job, guys.
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 »

Indeed, the trickiest part is defining what a 'good' move is. It's much easier to see where bad moves happen, you die, but when someone else dies on the grid how much was due to what you did? I can see where you're going a bit with the grid idea, but perhaps a grid based on the location of the bot expanding outwards (logarithmically?) would work better. The flip side there is that's a bit of an unfair advantage to the computer - it would know more than you do.

In general I'm not a huge believer in neural networks. I'd much rather be able to explain how the bot got to its solution than to say "it just works." It's also very complex from a signals aspect, which is how I was approaching the problem in this case. I admit though I'm not a signals expert and don't fully understand it all. One masters module in systems identification is in the order of 'just enough to be dangerous' after all. :)

The hybrid approach is sort of what happens now. The AI looks at potential options and weights them going with the one with the 'best' weighting. No learning involved though.

I will probably try and do something if I can come up with a way that has some sort of positive reinforcement.
Image
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:Indeed, the trickiest part is defining what a 'good' move is. It's much easier to see where bad moves happen, you die, but when someone else dies on the grid how much was due to what you did?
Well, I think in sumo the situation is simpler - it will have something to do with area occupied. But a good move for a bot in cheers could be also area related. I would simply say a good move is if you cut off area of your opponent and keep yours. I'd perhaps try to make a graph out of the grid with tunnels as edges and nodes as larger parts.
Tank Program wrote:I can see where you're going a bit with the grid idea, but perhaps a grid based on the location of the bot expanding outwards (logarithmically?) would work better.
Yeah :-). Alternatively, when implementing min-max, you could make bots far away from you to move less often but further with only eight directions possible. So if we imagine eight big squares around them, they will end up in the center of one of them. Perhaps staying still (in the ninth center square) could be considered too in some servers.
Another faster (and perhaps even better) option is to evaluate moves (positions) based only on neighborhood of the bot (not whole grid). Updating the graph should be probably done on global scale though.

But these are only some ad-hoc solutions. I should have a look at the current code and think more about it first. And no learning in them...but learning is crazy hard to do imho.
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 »

Considering area of the grid is an interesting idea. There's some potential there, grid area controlled relating to potential moves or something. I'm only worried about falling into the trap of trying to secure an area which would lead to what the bots originally did... boxing themselves in. Cutting off opponent areas would work, but I think it would also have the positive reinforcement issue. How can you tell if your move has had that effect? (I am still looking at this from the self-learning perspective...)

I think g(AI)Sensors only work in a line of sight fashion, so anything using the current code is effectively local area. Which if we think first person mode is pretty fair. The bots already have way better reflexes than humans.

I had this fun idea yesterday evening I think of trying to get three bots working in concert. They'd grind each other for speed, then head towards an opponent. The outer two would flank the opponent locking him in, then the middle one would engage. I think it might not be too, too hard to implement (not a self learning system after all) and it would look cool as hell.

And it'd be like the movies. ^^
Image
Post Reply