Page 2 of 2

Re: Warzone2100 AI Tournament

PostPosted: 17 Dec 2017, 18:10
by Prot
NoQ wrote:Yep, that's right, they are the same. The pre-rewrite NullBot is here: ... ot-2-12.wz (hope it works).

Nice, it's worked. I run 2-12 in next round, there about 500 games left, about ~6 hours..
2-12 is older than 3.04 ?
2-12 looks like for 3.1.5 mainly.

Re: Warzone2100 AI Tournament

PostPosted: 18 Dec 2017, 07:49
by Cyp
Prot wrote:
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 placed these four bots on the map and launched autogame with const Rational renderFraction(2, 1);

Sorry, I meant the other smaller, as in changing renderFraction(2, 5) = ⅖ = 40% to renderFraction(1, 5) = ⅕ = 20% or renderFraction(2, 101) = ²⁄₁₀₁ = 1.980198%.

Re: Warzone2100 AI Tournament (WZAIT)

PostPosted: 20 Dec 2017, 08:10
by Prot
Add full statistics grid BOT by BOT on all maps.

Also you can download full database of all games:

Re: Warzone2100 AI Tournament (WZAIT)

PostPosted: 27 Dec 2017, 18:48
by Prot
Added flexible search games regarding AI, maps and the result of the battle.

Re: Warzone2100 AI Tournament (WZAIT)

PostPosted: 09 Feb 2018, 06:54
by Prot
How it works.
It's dirty code, but i want to explain how to automatic run many games, and this code runs now on my server:
Just add some comments:
Code: Select all

export LANG=en_US.UTF-8
export DISPLAY=:0

# An additional loop that runs everything in infinity.
while true; do
   #to do safe exit from infinity loop, when all games is played
   if [[ "`cat command`" != "run" ]]; then echo Stop; exit; fi

   #If there was a failure, clear everything and prepare for a new start games.
   rm -rf ./games
   mkdir games

   #If at all in the first time are launching this script
   touch games.sqlite3

   #From php script get a plan of all games, who with whom on what maps and how many times to play.
   #We get a lot of json files that are ready for CLI params --autogame ----skirmish=some.json
   #Numbered them, and put in order.
   while read line; do
      echo $line > games/$(printf "%04d" $g)_game.json
   done < <(./init.php)

   #The main cycle, here is the start of the game with one of the prepared skirmish.json files, then goes parsing the game php script
   for i in `ls -1 games`; do
      mv games/${i} wzait.json
      ls -1 games/ | wc -l > stats/games
      date +%s >
      jq '"|"+(.challenge.bases|tostring)+"|"+(.challenge.powerLevel|tostring)+"|"+.challenge.scavengers+"|""|"' wzait.json >>
      cp stats/game
      mv stats/* www/stats/
      warzone2100 --skirmish=wzait.json --autogame 2>>
      ./stats.php > stats/stats
      rm wzait.json

   #After playing all the games, prepare statistics for the site
   cp -f games.sqlite3 www/db/
   ./fullstat.php > stats/fullstat
   mv stats/* www/stats/
   rm www/stats/game
   sleep 60

My www server run on odroid-u3 device, this is little arm-cpu based device which is difficult to handle large sql queries, so I decided to prepare statistics on the side of a powerful server that runs warzone