Toranaga Jun 27, 2009 8:41 pm
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 (Filesize: 74.12 KB)
Save009.zip (Filesize: 13.43 KB)
MAXR_Bots.zip (Filesize: 354.30 KB)

Sandman Jun 27, 2009 9:32 pm
Subject: Re: Single Player Scenario Games

Sounds interessting, I'll try that and post some feedback. Happy

Pedi Jun 28, 2009 12:50 pm
Subject: Re: Single Player Scenario Games

oh yes, sounds really interessting :). I tested it with Windows and i can start the game but ill get a error message when i end the round.
Attachments:
maxr_errorscen.JPG (Filesize: 23.33 KB)

Toranaga Jun 28, 2009 12:58 pm
Subject: Re: Single Player Scenario Games

Hi Pedi,
hm. Do you have the newest version of maxr (the svn-build on top of the 0.2.5 installation)?
Toranaga

Pedi Jun 28, 2009 1:55 pm
Subject: Re: Single Player Scenario Games

yes i used SVN2239 Smiling

Toranaga Jun 28, 2009 2:34 pm
Subject: Re: Single Player Scenario Games

Strange. On my windows it works and Sandman didn't have any problems, too (I think he's running windows).
Sorry, at the moment I have no idea, what causes this error. Maybe some of the windows developers (Eiko, Alzi?) can have a try.

Sandman Jun 30, 2009 4:50 pm
Subject: Re: Single Player Scenario Games

Yes it worked, I can play it. But didn't finish it yet, but I will and upload the pics and the amount of rounds it took me. Cool

Salut,
da Sandman
- The Chosen Death from above -

Toranaga Jul 10, 2009 8:43 pm
Subject: Re: Single Player Scenario Games

So noone except Sandman tries this (or posts something about it)?
Well, to give you something to compete with: Here's a screenshot, where the Habitat is destroyed after 17 turns. It's possible to do it faster, still, but I won't tell you how. Wink

Have fun,
Toranaga Musashi
Attachments:
Screen_10.07.09-205201.jpg (Filesize: 59.25 KB)

Sandman Jul 17, 2009 12:54 am
Subject: Re: Single Player Scenario Games

Oh, I didn't forget, I'll try it out soon... . Wink

alzi Jul 26, 2009 4:45 pm
Subject: Re: Single Player Scenario Games

I tested it now as well and it worked fine Smiling
Since I am a very evil one I not only destoyed the habitat but the hole base. It taked me about 25-30 rounds to destroy the habitat and 42 for the hole base. Not that fast as pagra ^^

Kepp on working on this Smiling
Attachments:
Singleplayer.png (Filesize: 429.70 KB)