[3.1+] NullBot: an adaptive skirmish AI

Did you create a mod, map, music, or a tool? Present them here and earn feedback!
Note: addon requests do not belong here.
Note, everything uploaded to this forum, MUST have a license!
User avatar
aubergine
Professional
Professional
Posts: 3462
Joined: 10 Oct 2010, 00:58

Re: NullBot: yet another AI for v3.1+

Post by aubergine »

Release notes for v0.25?
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: NullBot: yet another AI for v3.1+

Post by NoQ »

aubergine wrote:Release notes for v0.25?
Emm what do you mean? Here?
User avatar
aubergine
Professional
Professional
Posts: 3462
Joined: 10 Oct 2010, 00:58

Re: NullBot: yet another AI for v3.1+

Post by aubergine »

Ah, I must have been having a senior moment. Ignore me heh
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: NullBot: yet another AI for v3.1+

Post by NoQ »

Well, suppose this one is v0.26.

Changes:
  • New personality: ~Turtle~. Well, i'm far from being satisfied with it so far. Anyway, it builds only defenses and VTOLs, and prefers howitzer/rocket technology, even though it invents some machineguns at start. It uses lancer and heap bomb VTOLs and all sorts of artillery (apart from incendiary mortars/howitzers).
  • Some defense code changes. The AI now sometimes sells outdated defensive structures.
  • A very primitive support for gateways. It just builds some hardpoints somewhere around gateways, but not on exact locations, due to lack of passability checks in the current scripting engine;
  • Don't expand the base until really have too much money (over 2000 now).
  • Fixes in VTOL rearming.
  • Stop instead of getting together when running a regroup on the biggest cluster (v3.1 only, already worked on master);
  • Removed workaround for breaking through walls, since it didn't work anyway, but only made things worse;
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: NullBot: yet another AI for v3.1+

Post by NoQ »

v0.27

Changes:
  • Generic and Random AIs are now deprecated, being replaced by "The NullBot Itself": an AI with very short pre-defined research path that then descends into one of the following five research branches: mg/cannons, mg/rockets, flamer/cannons, flamer/rockets and mg/flamers. All other personalities were moved to the extra package.
  • Dynamic research path support. Once the initial ("Primary") research path is completed, the AI starts balancing between several research paths: Fundamental, Anti-Tank, Anti-Cyborg, Anti-Air and Anti-Building, depending on the game situation. Extra personalities were not updated to use the dynamic research path yet; only NullBot "Itself" uses that so far.
  • Reverted change of base expansion for everybody but Turtle AI.
  • Fixed a few typos that appeared because i didn't know how to use .concat JS array function.
Note that multiple personalities of NullBot "Itself" were very easy to define. For example, i defined an array of "standard cannon research path" and used it for both mg/cannons and flamers/cannons personalities, etc. No code duplication appeared due to that change. Once i port extra personalities to the dynamic research, the code will hopefully become even shorter.

Early tests have shown that dynamic-research NullBot "Itself" sometimes behaves better than the original fixed-research personalities even in 1x1 matches, where adaptation to a fixed and probably-balanced research path shouldn't actually have lead to a better play.
User avatar
aubergine
Professional
Professional
Posts: 3462
Joined: 10 Oct 2010, 00:58

Re: NullBot: an adaptive skirmish AI for v3.1+

Post by aubergine »

Loving the new version. Nullbot should be bundled with the game, replacing Nexus IMHO.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: NullBot: an adaptive skirmish AI for v3.1+

Post by NoQ »

Thanks :oops:
aubergine wrote:Loving the new version.
In fact, there are few things that got worse. For example, it now actually fails to even research any AA before the enemy produces VTOLs. And every time i try to make him give at least some minimal priority to AA research, it starts researching it way too early (when it is usually a deadly mistake to research it).

On the other hand, i feel the code to be feature-rich enough already (i won't ever use commanders, i think, for they are useless against humans, and i still can't use chat due to #3199), so i will now focus on polishing and bugfixing. Gonna really need feedback now (: Maybe release 1.0 some day ... :roll:
aubergine wrote:Nullbot should be bundled with the game
Not until we fix #3161 :lol2:

I also could use some ideas on how to implement difficulty levels. Right now i think that "Easy" should be something like the "Generic" personality i just removed (but i think i still have the code), with all sorts of adaptation disabled, "Medium" should be focusing research, but with all adaptation still disabled, and "Hard" should be the best AI i managed to make. Insane will differ from Hard only by some hard-coded cheats (eg., starting with defenses).
aubergine wrote:replacing Nexus IMHO.
I think the classic AI should remain, simply for it is classic; on the other hand, i have no idea what a "classic" is, cause i came to know about the game only a couple of years ago. By the way: i just had an idea to make a mod that has all personalities in it, but removes the Nexus/Semperfi AIs from the list. We will have just enough widget space (see also #3147) for that :idea:
Last edited by NoQ on 23 Feb 2012, 19:38, edited 2 times in total.
User avatar
effigy
Regular
Regular
Posts: 1217
Joined: 22 Jan 2010, 03:21

Re: NullBot: an adaptive skirmish AI for v3.1+

Post by effigy »

IIRC the Nexus AI does get updates from time to time. It appears to me that it now at least sends out larger attack groups then I remember. We probably need cheating AI's if there's a future for survival maps.
This is why some features aren't implemented: http://forums.wz2100.net/viewtopic.php?f=30&t=7490&view=unread#p87241
User avatar
aubergine
Professional
Professional
Posts: 3462
Joined: 10 Oct 2010, 00:58

Re: NullBot: an adaptive skirmish AI for v3.1+

Post by aubergine »

If Ai difficulty is set to insane, would it be worth checking to see if there you own oil derricks (pre-placed in base) and if so build a power gen before the HQ? Will mean you're getting power in sooner from up to 4 gens.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
Shadow Wolf TJC
Regular
Regular
Posts: 1047
Joined: 16 Apr 2011, 05:12
Location: Raleigh, NC

Re: NullBot: an adaptive skirmish AI for v3.1+

Post by Shadow Wolf TJC »

NoQ wrote:In fact, there are few things that got worse. For example, it now actually fails to even research any AA before the enemy produces VTOLs. And every time i try to make him give at least some minimal priority to AA research, it starts researching it way too early (when it is usually a deadly mistake to research it).
Perhaps, after a certain amount of time passes since the match begins, you could have your AI switch its research priorities so that it could better time its acquisition of AA weapons to just before VTOLs could possibly be researched?
Creator of Warzone 2100: Contingency!
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: NullBot: an adaptive skirmish AI for v3.1+

Post by NoQ »

aubergine wrote:If Ai difficulty is set to insane, would it be worth checking to see if there you own oil derricks (pre-placed in base) and if so build a power gen before the HQ? Will mean you're getting power in sooner from up to 4 gens.
I don't think so. Starting with a power gen is always a bad idea; your starting power is enough to do something more useful than that. We don't start with power gen not only because we don't own oil derricks yet, but also because anybody who has 1000 extra power unspent is already dead.
Shadow Wolf TJC wrote:Perhaps, after a certain amount of time passes since the match begins, you could have your AI switch its research priorities so that it could better time its acquisition of AA weapons to just before VTOLs could possibly be researched?
Yeah, one of the ideas is to introduce some new entities like "timed research" (research something at nth minute) or forced research (always research Y after we occasionally researched X). Another idea is to add AA techs to the weapon branches (for example, insert Sunburst to some point into rocket research, or add Hurricane with a few upgrades into MG tech).
User avatar
aubergine
Professional
Professional
Posts: 3462
Joined: 10 Oct 2010, 00:58

Re: NullBot: an adaptive skirmish AI for v3.1+

Post by aubergine »

@NoQ - on INSANE AI difficulty, no structures are removed at start of game. So, for example, on your "Frozen" map, nullbot will have 4 derricks, which it owns, already built right from the start of the game. If it built just one power gen, it would be getting oil from them from the outset. So maybe a FRPCRF sort of build order?

Also, nullbot is building some very outdated radars late in to the game:

Image
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: NullBot: an adaptive skirmish AI for v3.1+

Post by NoQ »

aubergine wrote:So maybe a FRPCRF sort of build order?
No, i think he'd better build some tanks or research 30 seconds earlier. Though it may be worth thinking about. What we are really lacking is different build orders for different starting tech levels; it's currently really crappy when starting at T3/no bases.
aubergine wrote:Also, nullbot is building some very outdated radars late in to the game:
Yeah, i think i already fixed it locally :oops:
Last edited by NoQ on 24 Feb 2012, 07:02, edited 1 time in total.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: NullBot: an adaptive skirmish AI for v3.1+

Post by NoQ »

v0.28

Changes:
  • Fixed broken challenges, add "[NullBot] Hide Behind Me" challenge to the extra package (a remake of the original Hide Behind Me challenge with NullBot ~MR~ as your allies).
  • Force AI to research anti-air defenses even when no VTOL threats are present.
  • Add hardened sensor towers to the fundamental research path.
Also, following the suggestion of dak180, i posted NullBot on sourceforge, which means we're now having a git repository. You can download the latest unreleased version of NullBot here:

Code: Select all

git clone git://git.code.sf.net/p/nullbot2100/code nullbot2100-code
(gonna need UNIX shell, of course ... but afaik git for windows uses cygwin anyway) Anybody wants an rw account? (: There is also a wiki present on sourceforge, which is now empty, and it is planned to be filled with some description of how NullBot works.
User avatar
dak180
Trained
Trained
Posts: 288
Joined: 01 Nov 2009, 23:58
Location: Keeper of the Mac Builds

Re: NullBot: an adaptive skirmish AI for v3.1+

Post by dak180 »

NoQ wrote:Also, following the suggestion of dak180, i posted NullBot on sourceforge, which means we're now having a git repository.
Very nifty. :)
User:dak180
Keeper of the Mac Builds