Show whole topic Jun 27, 2009 8:41 pm
Toranaga Offline
Developer
Registered since: Dec 28, 2005
Location: Hamburg


Subject: Single Player Scenario Games
Hi Commanders,

I have a little thing for you: Single Player gameplay against a non human (and very very dumb Crazy ) opponent.

Hey, could this be called an AI? --- Well, somehow yes, but not really. It's tooo dumb. Let me tell you in short, what I do:
I programmed (and will continue) a little java application, that should run on every maxr platform that supports java (which I think all do).
The java application tries to connect to an already open local server as player "StupidAnxious" (because that's like he behaves). Then it spams the chat and answers the important network messages from the server. Additionally during the game it sets all its units to "Sentry".
Well. sounds not like blackmagic. But hey, it's allready much fun! Because:
In two hours or something I created a neat little savegame for two players (simply by playing maxr on one machine against myself - but concentrating on building up bases). One player is called "Human", the other is called "StupidAnxious". One player has a very productive base with many factories and good resource income, but starting with nearly no units. The other player (guess his name...) has a bunker with quite good defence towers. The aim of "Human" (Clan Crimson Path) is to destroy "StupidAnxious" Habitat (clan 7 Knights), which lies in the middle of his base. And in as few turns as possible. So that's your challenge. Feel free to post your turn records in this thread Cool

So, what do you have to do, to get it running:
1. Install the latest build of MAXR. You can do so by
a) installing the 0.2.5 release and then
b) unpack the latest nightly build (which can be found here: http://www.maxr.org/~alzi/) in your maxr-installation directory
2. Download the map Fjord.wrl (which can be found at the end of this post) and put it into the "maps" directory of your maxr-installation. Thanks Sandman for this map!
3. Download the savegame Save009.xml (which can be found at the end of this post, too) and put it into the "save" directory of your maxr-installation.
4. Download MAXR_Bots.zip (guess where it can be found) and unpack it anywhere you want (it's independent of the maxr-installation) and unpack.
Now you have all files on your computer, that you need (and maybe additionaly you need a java version greater than 1.5, if you don't have it anyway).

Now you have to do this, to start the "DerBunker" scenario:
1. Start MAXR and start a multiplayer server.
2. Rename your player to "Human", so that the name in the savegame matches.
3. Load the savegame "DerBunker" which should appear in the second to end savegame-slot.
4a). If you have windows: double-click the file "stupidAnxious.bat" which is located in the MAXR_Bots directory.
4b). If you have another system: Open a terminal, change to the MAXR_Bots/StupidAnxious/ directory and type
java -jar stupidAnxious.jar
to run the bot.
The bot will connect to the server and spam the chat...
5.) Start the game and fight against StupidAnxious and destroy his bunker.
6.) Post your experience in this thread and the number of turns you needed (and a screenshot!)

Now comes additional information, for anyone, who wants to provide a scenario himself:
1. Play a multiplayer-game with two instances of maxr (one acts as host, one connects as client).
2. The host should be named "Human" to have a convention. The client must be named "StupidAnxious", so that the bot can later take his role.
3. Create bases and units as you want for your scenario.
4. Save your game normally.
5. Go into the savegame and edit the <Turn num="XXX" /> xml tag to <Turn num="1" />, so that the loaded game will start at turn 1.
6. Give the savegame and the map (if it's not a standard maxr-map) to the public.

Warning: Maybe the bot and your savegames will get broken from time to time. So don't expect this to work with every upcoming MAXR version.
And: My project for the bot is in a very early state and I will continue as I find the time and motivation. Please understand, that I want to do this myself (at least in the beginning of this project) and don't want to get involved in time consuming discussions. Maybe later, when I have a solid base, cooperative work on the bot will be a good option.

Have fun!
Toranaga

P.S.: Don't blame me, if it doesn't work at once, since I only did some testing on my machine.

Edit: I added a new MAXR_Bots.zip, that should work with the newest build of MAXR.

Attachments:
Fjord.zip
Downloads: 979
Filesize: 74.12 KB
Save009.zip
Downloads: 944
Filesize: 13.43 KB
MAXR_Bots.zip
Downloads: 974
Filesize: 354.30 KB


Paul Grathwohl (pagra)
This post has been edited 4 times. Last edit on Oct 01, 2009 9:34 am by beko.