Connecting a Bot to Armagetron

Everything todo with programming goes HERE.
Post Reply
aramies
Posts: 3
Joined: Wed May 31, 2006 12:03 pm

Connecting a Bot to Armagetron

Post by aramies »

Hi everybody,

I have question to the more experienced programmers of Armagetron,
my name is Jan Bartel from Bochum and I'm working on an C++ library for controling Agents in complex Environements.

In this context I'm interested in connecting a bot to Armagetron, which will learn to play armagetron just by experience (using evolutionary algorithms).

How does a standart Armagetron Bot work, are there c++ interfaces to control such a bot, and is it possible (without hacking to much code) to run an Armagetrongame in console-stile (without 3D-Animation),
To get a faster simulation.
(Because the algorithm will approximatly need 100 000 Games or more to converge)

CU Jan

P.S Sorry for my bad english
User avatar
Z-Man
God & Project Admin
Posts: 11587
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

We don't have an official interface for bots yet, sorry. There have been occasional hacks at the chatbot (just a bit of a function in gCycle::Timestep) to improve it or make it more annoying. You'll probably want to hack at the real AI code, that's in gAIBase.cpp. For a full new AI, modify gAIBase::Timestep(). You'll want to query your surroundings; we've got eSensors for that. The chatbot code seems to be a good example on how to use them. The AI code has improved sensors, but they also are harder to use.

Finally, to accelerate the matches, you should just run a dedicated server with either high speed settings or an accelerated clock. The system clock is in tools/tSysTime.cpp. You'll also have to hack the server to start games; usually, it would wait for real players. The waiting code is in tron/gGame.cpp, just search for "$online_activity_napping" and deactivate the block it is in.

Hope that helps a bit, you can always come to the irc channel (#armagetron on freenode) for specifics.

Depending on what you want your bots to do, there may be faster ways to simulate the game. But you probably know that.

Of course, we could use some alternative or better AIs in the game, so we're interested in making something useful come out of your experiment :)

That reminds me, I saw a Java app online where Tron AIs were taught by playing against real humans: http://dendrite.cs.brandeis.edu/tron/
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

Hmmm, last time I played that tron game I got my head handed to me.

/me passes up the opportunity to play it now
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
aramies
Posts: 3
Joined: Wed May 31, 2006 12:03 pm

Post by aramies »

Hi Z-man

Thank you very much for your fast answer.

Though I failed yesterday in compiling Armagetron on Ubuntu,
(I suppose there some settings i missed but thats only a matter of time ;) )
hence i didn't get a look in your doxygen doc, that sounds very good.

I will try to hack some interfaces for our own librarys in the next three weeks,
so that I could present this stuff to some professors and other decisionmakers.

After that I can give you saver answer on this projekt.

My experiences with the applet were similar headless like Lucifers.

That shows that finding a good solution for tron with evolution is possible.
Even though Armagetron is much more komplex then this applet
(greater grid, different playerspeed, more players) so that sucess cannot be warrantated. (But hopefully our algorithms are better then these from 6 years ago ;-) )

So we will see,

CU Jan
Last edited by aramies on Fri Jun 02, 2006 7:49 am, edited 1 time in total.
User avatar
wrtlprnft
Reverse Outside Corner Grinder
Posts: 1679
Joined: Wed Jan 04, 2006 4:42 am
Location: 0x08048000
Contact:

Post by wrtlprnft »

Doxygen documentation is always available here (more or less current, i update it once in a while): http://wrtlprnft.ath.cx/doxy/hierarchy.html

Though it looks like the stuff you need isn't documented yet, and that documentation is for the trunk, so maybe not all that useful for you :(
There's no place like ::1
libr8d
On Lightcycle Grid
Posts: 18
Joined: Fri May 12, 2006 12:40 pm

A general BotMaking interface

Post by libr8d »

As the title says, should be a greatly appreciated feature.

Making bots visible - so servers could block them if so wished.
libr8d
On Lightcycle Grid
Posts: 18
Joined: Fri May 12, 2006 12:40 pm

Post by libr8d »

ahh,

no title.

and message was interupted.


Well.

An Idea which has surfaced. A bot interface. A simple way to write ArmaBots.

More than willing to help in the discussions.

Some research would be appropriate, i'd say , )

Maybe see what they're doing in Robotic Programming make it compatible...maybe learn somethin.


well...

a snippet.
l8r
Lunch
Posts: 2
Joined: Sat Sep 06, 2008 4:25 pm

Re: Connecting a Bot to Armagetron

Post by Lunch »

I am in a Java programming class at University of Illinois. I want to do an AI project in java and use this code for a bot in tron
I was wondering:
a) where do I find gAIBase.cpp (I use windows XP (but I also have a mac X side))?
b)Is is possible to convert my java code into C++(I think that is what .cpp is. correct me if I'm wrong)?
c)does this idea sound ridiculous or impossible?
Thanks a Lot,
Lunch
;U
User avatar
Z-Man
God & Project Admin
Posts: 11587
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Connecting a Bot to Armagetron

Post by Z-Man »

Lunch wrote:I am in a Java programming class at University of Illinois. I want to do an AI project in java and use this code for a bot in tron
I was wondering:
a) where do I find gAIBase.cpp (I use windows XP (but I also have a mac X side))?
in our source package in src/tron.
Lunch wrote:b)Is is possible to convert my java code into C++(I think that is what .cpp is. correct me if I'm wrong)?
In theory, yes, and the two languages are similar enough to make the result look good. You'd probably be better off writing C++ directly, tough, I imagine there may be problems plugging converted code into native code. Or writing a 2d version of the game on your own, that would get rid of a lot of dead weight you'd be pulling around if you pick Armagetron as your base. Plus, the only converter I could find quickly was commercial.
Lunch wrote:c)does this idea sound ridiculous or impossible?
Both :) But a lot of things do.
Lunch
Posts: 2
Joined: Sat Sep 06, 2008 4:25 pm

Re: Connecting a Bot to Armagetron

Post by Lunch »

thanks for the info, z-man. the java-c++ transition sounds pretty rough :snail: . I might just learn C++ this summer and then work from there. I'm getting course credit to play around with artificial neural nets(ANN), so should be fun. Also netflix is having a ANN contest and the grandprize is a million USD, if you're interested in that stuff.
Lunch
;U
User avatar
-=VcL.Rajinn
Round Winner
Posts: 242
Joined: Fri Aug 29, 2008 9:35 pm

Re: Connecting a Bot to Armagetron

Post by -=VcL.Rajinn »

Oh, Mr.Rich guy!
Image
epsy
Adjust Outside Corner Grinder
Posts: 2003
Joined: Tue Nov 07, 2006 6:02 pm
Location: paris
Contact:

Re: Connecting a Bot to Armagetron

Post by epsy »

Can only wish you good luck (and the damn ignore feature on this board is completely useless)
User avatar
-=VcL.Rajinn
Round Winner
Posts: 242
Joined: Fri Aug 29, 2008 9:35 pm

Re: Connecting a Bot to Armagetron

Post by -=VcL.Rajinn »

Yeah, only works for Private messages ;)
Image
Post Reply