Warzone2100 AI Tournament (WZAIT)

Other talk that doesn't fit elsewhere.
This is for General Discussion, not General chat.
User avatar
Prot
Trained
Trained
Posts: 242
Joined: 29 Nov 2010, 12:41

Warzone2100 AI Tournament (WZAIT)

Post by Prot »

Hi all. A long time had a desire to make a tournament for bots as well as "sscaitournament.com", and I still came to this.
http://wz2100.euphobos.ru/wzait/
I wrote a few scripts, and allocated server to an endless struggle in which fighting 8 bots.
Thus, I would like to spur the interest of AI developers to writing and complexity of their bots.
And so, this method is very well suited as a test unit for debugging and finding errors in the code of the bot.
If you have suggestions, or you've written your bot, I would be happy to accept it into our friendly and long war games.

RULES:
1. This is only dual game one on one.
2. No scavs settings
3. Host(spectator) not a member(bot player), because of the various ancillary algorithms of the game engine for the player and the bot.
4. Start with no base settings
5. Full energy boost settings
6. Different map format, from NTW to the island. (Later I will add more maps)
7. Only an even number of participants.
8. Game win conditions are take down every enemy factory and constructor truck or cyborg engeneer OR the game stops on "DRAW" after two hours of playing time.
9. If you planed to add your bot to the WZ AI T, try tech him do not cheat ;)


PS the stats Page will be further developed.
Last edited by Prot on 16 Dec 2017, 17:49, edited 3 times in total.
User avatar
Berserk Cyborg
Code contributor
Code contributor
Posts: 938
Joined: 26 Sep 2016, 19:56

Re: Warzone2100 AI Tournament

Post by Berserk Cyborg »

This is awesome!

Could you add the latest test versions of Cobra and SemperFi-JS? I put them in the folder below.
ai scripts.zip
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Warzone2100 AI Tournament

Post by NoQ »

Wooooohooooo. This is super impressing.

Seeing how the old NullBot (the one for 3.1, before the rewrite) stands here might be interesting, though i'm not planning on working on it much, it might be actually performing better than the new one in AI vs AI matches.

I guess extracting per-map stats might be fun as well, i.e. which AI performs better on which maps.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Warzone2100 AI Tournament

Post by NoQ »

Actually it'd also be great to see if any AIs (or the game itself) are crashing during combat and report bugs with logs^^

Because this is, like, the biggest if not only automatic testing system for the game that we've ever had.

Upd: You already have it. Cool!!
User avatar
Darkling
Rookie
Rookie
Posts: 19
Joined: 07 Feb 2016, 00:45

Re: Warzone2100 AI Tournament

Post by Darkling »

This looks great!

Would it be feasible to add which sub-personality each AI is using to the output?

I did most of my testing on just a few maps so it's really good to see the AI's put through their paces on the variety of maps that you are using. It's allowed me to identify a few issues that I might not have otherwise (turtling on high oil).

I don't know if you want to add more AI's at this stage but I have the 1.02 version ready now.
Attachments
darkbot-1.02.wz
(155.51 KiB) Downloaded 237 times
User avatar
Prot
Trained
Trained
Posts: 242
Joined: 29 Nov 2010, 12:41

Re: Warzone2100 AI Tournament

Post by Prot »

Berserk Cyborg wrote:This is awesome!

Could you add the latest test versions of Cobra and SemperFi-JS? I put them in the folder below.
ai scripts.zip
Thanks! Semerfi works well, but Cobra has error on the start level:

Code: Select all

info    |05:07:02: [callFunction:198] Uncaught exception calling function "eventStartLevel" at line 181: ReferenceError: Can't find variable: completeRequiredResearch
I search inside new code, it's really don't have function completeRequiredResearch(), but old Cobra has.
I add semperfi for now.
Darkling wrote:
Thanks! I add this bot as another one, not replacing old one. I think that later I will disable the old one, but the statistics will leave.
NoQ wrote:I guess extracting per-map stats might be fun as well, i.e. which AI performs better on which maps.
Yes! Thats i planned todo. I this i add latest Nullbot too, as another bot, like my many bonecrushers four different versions.
I already check the errors and save into database last 10 line of logs, i think i need to add more lines, for better understanding whats going on.
Darkling wrote:Would it be feasible to add which sub-personality each AI is using to the output?
Yeah! I think about it, because NullBot has many different personalities and BoneCrusher start from 2.1 has too many personalities.
But at the moment the planning algorithm of the game in such a way that each bot fighting each other, but never met himself. I think later still I will rework a bit of the game so that I can gather statistics as well and every personality. However I will need a separate startup script for each personality, as it is made in NullBot.
Like multiplay/skirmish/db.js - main, and /db_personality_MG.js separate start script, running bot with force some personality.
I think of how it would be best to gather the statistics and schedule of games.
User avatar
Berserk Cyborg
Code contributor
Code contributor
Posts: 938
Joined: 26 Sep 2016, 19:56

Re: Warzone2100 AI Tournament

Post by Berserk Cyborg »

Prot wrote: Thanks! Semerfi works well, but Cobra has error on the start level:

Code: Select all

info    |05:07:02: [callFunction:198] Uncaught exception calling function "eventStartLevel" at line 181: ReferenceError: Can't find variable: completeRequiredResearch
I search inside new code, it's really don't have function completeRequiredResearch(), but old Cobra has.
I add semperfi for now.
Removed that call. It was in part used for testing the research granting functionality before making it into campaign.
Cobra.wz
There is another unique bot in viewtopic.php?f=48&t=12609#p135210 if you are looking for an extra addition.
User avatar
Prot
Trained
Trained
Posts: 242
Joined: 29 Nov 2010, 12:41

Re: Warzone2100 AI Tournament

Post by Prot »

Berserk Cyborg wrote:
Prot wrote: Thanks! Semerfi works well, but Cobra has error on the start level:

Code: Select all

info    |05:07:02: [callFunction:198] Uncaught exception calling function "eventStartLevel" at line 181: ReferenceError: Can't find variable: completeRequiredResearch
I search inside new code, it's really don't have function completeRequiredResearch(), but old Cobra has.
I add semperfi for now.
Removed that call. It was in part used for testing the research granting functionality before making it into campaign.
Cobra.wz
There is another unique bot in viewtopic.php?f=48&t=12609#p135210 if you are looking for an extra addition.
Now it's ok. I run it as is. But allready find some errors, cobra trying build VTOL on Cyborg factory ^^

Code: Select all

error   |07:50:43: [validTemplateForFactory:5597] Cannot build vtol except in vtol factory, not in Завод киборгов.
error   |07:50:43: [js_buildDroid:1896] Invalid template VTOL unit for factory Завод киборгов
error   |07:50:43: [callFunction:195] 0 : buildVTOL(id = 160885) at /multiplay/skirmish/cobra_includes/production.js:324
error   |07:50:43: [callFunction:195] 1 : produce() at /multiplay/skirmish/cobra_includes/production.js:438
error   |07:50:43: [callFunction:195] 2 : <global>() at -1
info    |07:50:43: [callFunction:198] Uncaught exception calling function "produce" at line 324: ReferenceError: validTemplateForFactory(psTemplate, psStruct, true) failed in js_buildDroid at line 1896
And thanks for artilleriya bot, i found this long ago, and completely forgot about this bot.. Add him too.
User avatar
Berserk Cyborg
Code contributor
Code contributor
Posts: 938
Joined: 26 Sep 2016, 19:56

Re: Warzone2100 AI Tournament

Post by Berserk Cyborg »

Prot wrote: Now it's ok. I run it as is. But allready find some errors, cobra trying build VTOL on Cyborg factory ^^
:oops: Thanks. I think I prevented that from happening in this commit.

Has anybody here figured out how to prevent the assert that looks like this?

Code: Select all

error   |10:06:43: [recvStructureInfo:349] Could not find structure 97 to change production for
Those seems practically impossible to prevent (I literally check if it is null or not with getObject right before producing anything). Maybe it should be quiet.

Will there be matches for T2/T3?
User avatar
Prot
Trained
Trained
Posts: 242
Joined: 29 Nov 2010, 12:41

Re: Warzone2100 AI Tournament

Post by Prot »

Berserk Cyborg wrote: :oops: Thanks. I think I prevented that from happening in this commit.
Ok, i'm apply this patch to already running Cobra.
Berserk Cyborg wrote:Will there be matches for T2/T3
I don't know for now. It takes a lot of time for completing a full cycle of games through all the meets on all maps, on all modes T1, T2, T3.
For now wz spend over 40% for render, i run it on blank Xorg, whitout gui, at 640x480 res, with low settings.
Unfortunately we have no mode like --headless, to run WZ without graphics.
And I was not able to find a way to unbind the graphics from the game, and again, unfortunately we do not have a Client/Server game.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Warzone2100 AI Tournament

Post by NoQ »

Prot wrote:Yes! Thats i planned todo. I this i add latest Nullbot too, as another bot, like my many bonecrushers four different versions.
Hmm, so the version-less NullBot is NullBot1 from Warzone 3.1? Cause NullBot 3.04 should be exactly the same as the one included with Warzone 3.2.
Prot wrote:I already check the errors and save into database last 10 line of logs, i think i need to add more lines, for better understanding whats going on.
Yeah, *first* 10 lines of logs are much more helpful :)
Cyp
Evitcani
Evitcani
Posts: 784
Joined: 17 Jan 2010, 23:35

Re: Warzone2100 AI Tournament

Post by Cyp »

Prot wrote:
For now wz spend over 40% for render, i run it on blank Xorg, whitout gui, at 640x480 res, with low settings.
It might help a bit to change this line to something smaller than ⅖:

Code: Select all

src/loop.cpp:   const Rational renderFraction(2, 5);  // Minimum fraction of time spent rendering.
User avatar
Prot
Trained
Trained
Posts: 242
Joined: 29 Nov 2010, 12:41

Re: Warzone2100 AI Tournament

Post by Prot »

Cyp wrote: It might help a bit to change this line to something smaller than ⅖:

Code: Select all

src/loop.cpp:   const Rational renderFraction(2, 5);  // Minimum fraction of time spent rendering.
I have some strange effects, first i don't see the difference, but then i make simple bot, which will spawn themselves 50 cyborgs at the start, waiting 100 seconds of game time and instantly kills all their units.
I placed these four bots on the map and launched autogame with const Rational renderFraction(2, 1);
And game don't have any frames, but it runs pretty much faster, almost 10 real second to 100 game seconds.. BUT.
If i change those bot to spawn about 200 cyborgs, then game run much slower 25 real seconds to 100 game seconds.
Those cyborgs are in complete peace, I understand they are not the pathfinding algorithms.
Because when I changed the code of the bot, adding that he would every 5 seconds gave the order to all the cyborgs DROID_MOVE, the game more slowed down, about 35 real seconds to 100 game seconds.
I think somewhere else to spend time on the render, despite the fact that the frames are not even drawn. Also notice in the game, with a large army, if the camera to push into a corner where nothing happens, FPS not increases.
User avatar
Prot
Trained
Trained
Posts: 242
Joined: 29 Nov 2010, 12:41

Re: Warzone2100 AI Tournament

Post by Prot »

NoQ wrote:Hmm, so the version-less NullBot is NullBot1 from Warzone 3.1? Cause NullBot 3.04 should be exactly the same as the one included with Warzone 3.2.
Well, first i add standart NullBot from 3.2.3, then add Nullbot-3.04 if it's almost the same, then later i remove one of them. :roll:
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Warzone2100 AI Tournament

Post by NoQ »

Prot wrote: Well, first i add standart NullBot from 3.2.3, then add Nullbot-3.04 if it's almost the same, then later i remove one of them. :roll:
Yep, that's right, they are the same. The pre-rewrite NullBot is here: https://downloads.sourceforge.net/proje ... ot-2-12.wz (hope it works).
Post Reply