Page 1 of 9

[3.2+] NullBot 3 ‘Reloaded’

Posted: 30 Jan 2013, 07:41
by NoQ
For anybody who kept reading past the first 5 symbols of the thread's name and understood that there's no typo in them, it's about time to present the new AI i've been working on for a few weeks now. I'm still calling it NullBot, as it is based on similar ideas, yet it has been completely rewritten from scratch internally. You might have noticed some preliminary discussions in this thread, or even tried looking at the source code in its new home on github.

The AI is now present in two variations: Generic and Turtle. Generic AI is what you'd like to try; it makes use of as many game aspects as possible. Turtle AI is an AI that uses only defenses and hardly builds any tanks; may be of some interest.
  • nullbot-3-02.wz
    For v3.2+; install to autoload
    (36.8 KiB) Downloaded 1951 times
    Image
As i already mentioned three times, it will not work on warzone2100-v3.1.*, but only on v3.2+, which is now available only as git master snapshots for windows and linux here. Moreover, it requires a very recent snapshot, as there were many fixes to the JS engine recently. A backport project that may bring this AI to v3.1 is in progress by aubergine.

While playing v3.2, you will notice an experimental change in game starting conditions; NullBot was already adapted to it (partially; most likely a better build order could be suggested), but you were probably not, so be aware (:

Chat commands:

Use in-game chat to communicate with NullBot3 and alter his behaviour. Most of these commands will be listened by allied NullBot3 players only. Use private chat if you want to talk to particular AI players only.
  • !nb set - set personality. For example, say "!nb set mr" to activate a machinegun-rocket personality in the middle of the game; it will start researching and producing machineguns and rockets. Different NullBot3 AIs support different personalities; use this command without arguments to see the whole list.
  • !nb res - set research path. Allows finer control over research path without changing subpersonality. For example, say "!nb set mg" to make him research machineguns. Different NullBot3 rulesets support different weapon research paths; use this command without arguments to see the whole list. There are also three special research paths that are always supported:
    • !nb res cl - clear all previous research commands and return to the default behaviour.
    • !nb res no - research nothing.
    • !nb res fn - research fundamental technologies, such as power or research upgrades.
  • !nb truck - ask an AI player to give you a truck. He will always give you a truck, even if it's his last truck.
  • !nb power - ask an AI player to give you money.
  • !nb go - ask an AI player to bring an army to a certain location specified by an Alt+H beacon. Use this to ask for help or coordinate attacks. Depending on the situation, the AI may be unable to react quickly.
  • !nb tx - recall the previous !nb go order.
  • !nb who - asks the AI to report his version. Allied AIs also report their personality.
Experimental Scavenger AI:

When installed together with the main NullBot3 mod, the mod below makes NullBot3 control scavengers. This is not really a separate AI; it uses the same code, just obeys the rules set for scavenger player. So it will play tough: aggressively attack random enemies with tightly packed armies, pick up oil drums, harass defenseless derricks and do other dirty tricks you won't expect from scavengers. So i won't really recommend it for everyday use.
Special thanks to:
  • Per for continuous improvements of JS API which made the thing possible.
  • Duha for revising the code and sending specific corrections and improvements.
  • aubergine for his constant documentation work, which i'm making use of using regularly, and for his efforts to backport this AI to v3.1.
  • Shadow Wolf TJC for providing a huge bunch of ideas that shaped the new ruleset/personality definition code.

More details

Posted: 30 Jan 2013, 07:41
by NoQ
Currently NullBot3 has generic, turtle and scavenger personalities and consists of around 3600 lines of JS code. Generic personality only of the old NullBot2 is made of over 4000 lines of code.
  • Image
Things that were not yet implemented for v3, compared to the original NullBot, include
  • Multiple fixed personalities; currently the generic AI presented here randomly picks one of the four standard AP/AT weapon pairs (similarly to the NullBot2 generic, and MG/Flamer subpersonality will not be implemented (for game balance fixes are now still being worked on), and the turtle AI uses MG/Cannons or MG/Rockets.
  • Difficulty levels support. Currently EASY difficulty is implemented, INSANE difficulty is better due to hard-coded cheats, while MEDIUM and HARD are absolutely similar.
Things that were implemented for v3 but were never implemented in the original NullBot include
  • Multiple new forms of adaptations (it will use yellow bodies against flamers, it will use borgs against rockets; none of that was possible within v3.1 JS API), this includes adaptive researching (don't research borg alloys when we don't need borgs, don't research thermal armor when enemy uses no flamers) and adaptive base structure (don't build cyborg factories when we don't need borgs), splitting cyborgs, VTOLs and defenses into anti-tank/anti-borg/anti-structure/anti-air (as suggested and partially implemented in NullBot-SW).
  • Support for VTOL-only map (v3.1 JS API limitations don't allow that).
  • Support for non-shared-research game mode (the mode itself is only available in 3.2+).
Things that were not ever implemented but are planned now include
  • Commander and transporter support. Even though i believe they should be disabled by default (for it's most often a bad idea to use them in skirmish), that code is necessary to provide interesting challenge maps.
  • Adaptation without deity cheating, based only on seen objects.
Issues that i'm currently looking for a feedback on:
  • Any unusual wzlog/stderr messages that come up are of interest, please attach logs here.
  • If anybody finds a way to reproduce #3894, please comment in this ticket. It might be related to the use of new scripting functions, but it's not certain.
  • If the AI causes slowdowns or sound stuttering, which is not uncommon for NullBot (even though quite some work has been done on this issue within the new code) in v3.2 we have a new mechanism for investigating them. Just close the game cleanly (by using "quit" in the escape key menu, rather than killing the process or closing the window in the middle of the game), and you'll see nb_generic.*.log files in the logs directory; please send them to me.
  • If you think that the AI is behaving weirdly or plays poorly, please attach a savegame so that i could have a look and investigate the issue in place. At least, a screenshot could already be helpful.

Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~

Posted: 30 Jan 2013, 08:17
by themac
Can not await to play with NullBot Reloaded. I am curious if we will get a working beta of Warzone for the Mac soon to be able to play the new NullBot. :-)

Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~

Posted: 30 Jan 2013, 13:15
by aubergine
Unable to test as I'm on a mac, but I've been following the code development and it's looking awesome! I really like the clarity that's starting to form within the code, and just seeing how NullBot is making decisions in this new version makes it clear that things are on the right track for this to be a truly great AI.

Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~

Posted: 30 Jan 2013, 17:40
by dak180

Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~

Posted: 30 Jan 2013, 18:02
by NoQ
Thanks dak180, i just hope they like what they see :D :oops:

Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~

Posted: 30 Jan 2013, 18:06
by Arreon
I can't use this new Nullbot due to this annoying error:

Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~

Posted: 30 Jan 2013, 18:20
by NoQ
What master snapshot are you using? May it be something not recent enough?

Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~

Posted: 30 Jan 2013, 18:26
by Arreon
NoQ wrote:What master snapshot are you using? May it be something not recent enough?
warzone2100-master-20130118-080044-170f3a9.exe

Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~

Posted: 30 Jan 2013, 18:29
by NoQ
Too old XD Currently the AI relies on commits from at least 20130128 (such as).

Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~

Posted: 30 Jan 2013, 19:04
by Prot
NoQ, how to fetch latest code of you bot?
Or you using same git repository as the game 3.2+ ?

Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~

Posted: 30 Jan 2013, 19:06
by Arreon
How do I fix it?

Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~

Posted: 30 Jan 2013, 19:12
by NoQ
Prot wrote:NoQ, how to fetch latest code of you bot?
Or you using same git repository as the game 3.2+ ?
NoQ wrote:github
Arreon wrote:How do I fix it?
Get a newer snapshot and install it.

Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~

Posted: 30 Jan 2013, 19:18
by Arreon
NoQ wrote:
Prot wrote:NoQ, how to fetch latest code of you bot?
Or you using same git repository as the game 3.2+ ?
NoQ wrote:github
Arreon wrote:How do I fix it?
Get a newer snapshot and install it.
That was the newest snapshot I could find. Can you link me to a newer one?

Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~

Posted: 30 Jan 2013, 19:20
by NoQ
Hmm, seriously? Are all snapshots broken currently? :shock: O_o :o
Cause i'm compiling the game from git directly, and never needed to check out snapshots.

P.S. Lol, just noticed that i've been packing calling the mod .zip since eternity, and it worked.
Re-named anyway.