Q. AI vs AI

Here you may talk about Warzone's Gameplay, Strategy & Tactics
Post Reply
User avatar
JimmyJack
Trained
Trained
Posts: 118
Joined: 06 May 2017, 05:50

Q. AI vs AI

Post by JimmyJack »

I see on the addon page and in the addon topic people talk about an AI competition? Is there a way to start a 2 player game with both players being computer players. That is an all AI game with no human players so you can watch and learn how each AI plays? It might help my game.
Transmission ends ...
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: Q. AI vs AI

Post by Per »

There are actually several ways:

First way, go into debug mode, then write 'autogame on', and the default AI will take over your player.

Second way, create the 'scripts' directory in your Warzone player directory (on Linux, it would be ~/.warzone2100-3.2/scripts/), copy your AI script into that directory, go into debug mode, type 'jsload', then select your script. It will take over your player immediately.

Third way, create a test file, see data/mp/tests for examples, and start the game with the --skirmish=<mytestfile.json> --autogame command line options. This will allow you to totally automate AI vs AI matches.
User avatar
JimmyJack
Trained
Trained
Posts: 118
Joined: 06 May 2017, 05:50

Re: Q. AI vs AI

Post by JimmyJack »

Wow 3 ways. I can do that first one. The other two may be a little over my head. O_o Won't stop me from trying.

Thanks for the help Par.
Transmission ends ...
User avatar
Prot
Trained
Trained
Posts: 242
Joined: 29 Nov 2010, 12:41

Re: Q. AI vs AI

Post by Prot »

But one think.
"The bot playing it self" and "bot take over your player" - get different bot gameplay.
If bot playing as it self, Its constructors automatically go around the enemy's hot spots, and the army automatically shoot at the debris.
If you "look at bot plays" from his player, the constructors of the bot go straight to death without trying to avoid enemies, army do not shoot at debris, barrels auto pickups e.t.c.

Because of this, if you start two identical bots on a symmetric map, they will play a little differently.
User avatar
JimmyJack
Trained
Trained
Posts: 118
Joined: 06 May 2017, 05:50

Re: Q. AI vs AI

Post by JimmyJack »

Prot wrote:"The bot playing it self" and "bot take over your player" - get different bot gameplay.
I only use the autogame command. Guess I am to stupid to get the other two ways to work.
If bot playing as it self, Its constructors automatically go around the enemy's hot spots, and the army automatically shoot at the debris.
I have seen this in the AI players but they don't always do that. In fact I use it to slow the AI down. I find an out of the way oil well or two and I don't build on them I defend them. The AI will kill a LOT of trucks trying to get that oil.
If you "look at bot plays" from his player, the constructors of the bot go straight to death without trying to avoid enemies, army do not shoot at debris, barrels auto pickups e.t.c.
This I have also seen but I think it is the AI.
Per wrote:First way, go into debug mode, then write 'autogame on', and the default AI will take over your player.
I am thinking that this is the original AI from the old game. I could be wrong but this AI acts like the one in my old Play Station game.
Transmission ends ...
User avatar
JimmyJack
Trained
Trained
Posts: 118
Joined: 06 May 2017, 05:50

Re: Q. AI vs AI

Post by JimmyJack »

Per wrote:create the 'scripts' directory in your Warzone player directory, copy your AI script into that directory, go into debug mode, type 'jsload', then select your script. It will take over your player immediately.

I downloaded the latest ver. of the cobra AI mod. It is a .wz file so I made a copy of it in a test folder. I changed .wz to .zip and extracted it. In there I found the .js file. So now I put the .wz file into the warzone autorun folder and I put the unziped .js file into the warzone scripts folder. I do not know if I did that right but it is working ... for now. Now what I need to know is where are the .js files for all the other AIs that the game came with?

And...
Per wrote:Create a test file, see data/mp/tests for examples, and start the game with the --skirmish=<mytestfile.json> --autogame command line options. This will allow you to totally automate AI vs AI matches

I don't get this one at all. The data/mp/tests didn't help. I can't open .json files so I don't know what they are or how to make one. So I need a little :lecture: on this on.

Oh ... And one more Q. Is there a debug command that opens all the map to view in an AI vs AI game?
Transmission ends ...
User avatar
Berserk Cyborg
Code contributor
Code contributor
Posts: 938
Joined: 26 Sep 2016, 19:56

Re: Q. AI vs AI

Post by Berserk Cyborg »

JimmyJack wrote:Now what I need to know is where are the .js files for all the other AIs that the game came with?
Look in mp.wz/multiplay/skirmish.
JimmyJack wrote:I don't get this one at all. The data/mp/tests didn't help. I can't open .json files so I don't know what they are or how to make one. So I need a little :lecture: on this on.
You need to open up a terminal and just do something like this: warzone2100.exe --skirmish="highground.json" --autogame. From there you can create new test files (examine the files included in mp/tests) with a text editor of your choice.
JimmyJack wrote:Oh ... And one more Q. Is there a debug command that opens all the map to view in an AI vs AI game?
Enter chat and type deity while in cheat mode and it will reveal the map. You can also just use Ctrl + O to enter the debug menu for more stuff.
User avatar
JimmyJack
Trained
Trained
Posts: 118
Joined: 06 May 2017, 05:50

Re: Q. AI vs AI

Post by JimmyJack »

First I want to say thanks to Berserk Cyborg for the input. But. You have to remember, when you are talking to me, you must think to yourself ... "This boy is, I say, this boy is dumber than a box of rocks." So ...
Berserk Cyborg wrote:Look in mp.wz/multiplay/skirmish.

I made a .txt file of this reply so I would not miss anything and saved it in the WarZone folder. Then I did a search in the WarZone folder for mp.wz and the only thing it found was the .txt file that I just saved there. There is an mp folder in there but it has only .json files in it. So you lost me on that one.
You need to open up a terminal and just do something like this: warzone2100.exe --skirmish="highground.json" --autogame. From there you can create new test files (examine the files included in mp/tests) with a text editor of your choice

Lost all the way there. I don't know how to open up a terminal or I would have tried that one. I also have no mp/tests folder. There are so many things missing, it is a wonder the game runs at all.
Enter chat and type deity while in cheat mode and it will reveal the map. You can also just use Ctrl + O to enter the debug menu for more stuff

Thanks for that last one. Very cool command.
Transmission ends ...
themac
Trained
Trained
Posts: 412
Joined: 17 Jul 2009, 19:14
Location: Germany

Re: Q. AI vs AI

Post by themac »

Unfortunately by using the autogame on command the AI playing for you will always be the Nexus AI which is not the most clever one. It would be nice to get an option to choose the AI for yourself the same way you choose all other AI players. :)
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: Q. AI vs AI

Post by Per »

themac wrote:Unfortunately by using the autogame on command the AI playing for you will always be the Nexus AI which is not the most clever one. It would be nice to get an option to choose the AI for yourself the same way you choose all other AI players. :)
The functionality is there, just a bit hard to use. So I just added this as a button in the debug menu.
Post Reply