[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: 3459
Joined: 10 Oct 2010, 00:58
Contact:

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

Post by aubergine »

That's exactly what i currently do. At least three CB towers are certain to have been built immediately after they are researched, and sensors start to appear at the same time. Are you saying it doesn't work?
In the game I just played against nullbot ~mc~ it was building arty before it made any CB towers (I didn't check to see what it had researched, sorry).
You already did (: I'm refering to canHitAir and canHitGround properties of structures (and droids) that are useful to count how much AA i already have.
In 3.1 you can use the .name property to determine what a structure is = fairly readable name for the structure.
May i ask again what map and what game setup you were playing?
I do most of my testing on sk-startup t0, with me vs nullbot.

High power, no bases, sometimes with nullbot on "insane" difficulty (which means it gets double power and any pre-defined base structures included with the map are left intact). I often play with scavengers activated.
Sure, but i still have no idea how to issue them. We don't have a function to issue orders that don't need a target.

Code: Select all

// not tested, but this might work

const DORDER_STOP = 1;
const DORDER_REARM = 32;

orderDroidLoc(myDroid,DORDER_STOP,myDrod.x,myDroid.y);


// if this next line doesn't work, then maybe find a free rearm pad using enumStructure()
// and use orderDroidObj instead?
orderDroidLoc(myDroid,DORDER_REARM,myDrod.x,myDroid.y);
"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 »

Hopefully fixed issue with sensors. I was sure howitzers require CB towers :oops: :oops: :oops: Also, having a bit of rework in defenses code and making plans for ~Turtle~ personality :3

The issue with VTOLs is nasty. It looks like armed property is set to NaN for VTOL machineguns and cannons, but not for VTOL rockets and bombs O_o #3178 Will release something as soon as i find a fix.
Last edited by NoQ on 15 Feb 2012, 19:30, edited 1 time in total.
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.20.

Changes:
  • Added CB towers to ~MC~, ~Generic~ and ~Flame~ research paths;
  • Removed Mk6 Hurricane damage upgrades from rocket research paths (cause they suddenly require a lot of cannon research), replaced by accuracy upgrades;
  • Hopefully fixed not-working cannon and machinegun VTOLs (they behaviour might still be weird though);
  • Finally fixed the excessive oil building (by too many trucks);
Image
Last edited by NoQ on 15 Feb 2012, 13:20, edited 1 time in total.
User avatar
Terminator
Regular
Regular
Posts: 1077
Joined: 05 Aug 2006, 13:46
Location: Ukraine
Contact:

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

Post by Terminator »

How about adding a jummer sensor with AI mod & make him use it?
Death is the only way out... sh*t Happens !

Russian-speaking Social network Group http://vk.com/warzone2100
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 »

That's a nice idea, at least when the AI is set to insane (that is, cheating anyway!). I would still like to keep a non-cheating AI around, but some funny features for higher difficulties might be interesting.

I would still try to keep the AI work fine on regular game. Currently, you can just unpack the AI package into mp/multiplay/skirmish and go host games with custom AI without anybody needing to download the mod. If i modify stats for the AI to work, this convenient feature will break.

Also, there seems to be some new input in investigating "missing template" messages and vanishing production queues.
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

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

Post by aubergine »

v0.20 is working great.

And, I started a game right after downloading it this morning, then had to go to work and forgot to close WZ. The game is still running after 5 hours of gametime (speed set to 5/4), although nullbot hasn't made it though any of my defences yet ...I practice extreme turtling (:

Some wide spectrum sensors & more arty might be worth investing in after 2+ hours of game time. With those it could probably have nuked a whole bunch of my defences while I wasn't looking. oh, and base upgrades so my return arty isn't as effective against yours.

EDIT: So I sent 100 VTOLs in to quickly finish off nullbot and, guess what... no AA defences!! (I was using the random personality and it had chosen MR personality)
"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 »

So I sent 100 VTOLs in to quickly finish off nullbot and, guess what... no AA defences!! (I was using the random personality and it had chosen MR personality)
I believe you are on 3.1 beta2? Cause i didn't make use of the .name property yet :oops:
oh, and base upgrades so my return arty isn't as effective against yours.
I think it does some base upgrades, though i'd have a closer look again tomorrow :stressed: By the way, it's hardcrete that is essential here, i think.
Last edited by NoQ on 15 Feb 2012, 19:51, edited 1 time in total.
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

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

Post by aubergine »

Code: Select all

var canHitAir = ("canHitAir" in enumDroid()[0])
   ? function(obj) { return obj.canHitAir; }
   : function(obj) {
        if (obj.name.indexOf("AA ")>-1) return true;
        if (obj.name.indexOf("SAM ")>-1) return true;
        if (obj.name.indexOf("Vindicator")>-1) return true;
        if (obj.name.indexOf("Whirlwhind")>-1) return true;
        if (obj.name.indexOf("Avenger")>-1) return true;
        if (obj.name.indexOf("Stormbringer")>-1) return true;
     };
Last edited by aubergine on 15 Feb 2012, 21:32, edited 1 time in total.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

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

Post by aubergine »

As for base upgrades, the walls stuff only upgrades walls - you need the base structure materials upgrades (which rely on walls upgrades) to make defences stronger, particularly arty and missiles.
"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 »

Thanks, will use the code :)
aubergine wrote:As for base upgrades, the walls stuff only upgrades walls - you need the base structure materials upgrades (which rely on walls upgrades) to make defences stronger, particularly arty and missiles.
The guide disagrees with you :wink:
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

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

Post by aubergine »

Wow, I never realised that - I always thought it was base structure materials that made those stronger. Cool!

EDIT: OMG, none of the defences use base structure materials! There's literally no point ever to upgrade base structure materials :shock: I was always upgrading walls just to get base structure upgrades, all that wasted power and research time!!
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

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

Post by aubergine »

Code snippet above updated.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
Iluvalar
Regular
Regular
Posts: 1828
Joined: 02 Oct 2010, 18:44

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

Post by Iluvalar »

but all defenses upgrade with walls
Heretic 2.3 improver and proud of it.
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:EDIT: OMG, none of the defences use base structure materials! There's literally no point ever to upgrade base structure materials :shock: I was always upgrading walls just to get base structure upgrades, all that wasted power and research time!!
The main point of them is to keep your base alive for a while when it suddenly gets visited by 3 or 4 enemy assault gun cyborg partisans. Just a few base upgrades can really save the day in this case. Also makes the base and derricks a bit stronger against lancer VTOLs. In 2.3 it used to be a bit more important, because at some point you could shoot from behind your own buildings, while they absorb enemy fire. Anyway, strategies that rely on base structure upgrades are usually completely opposite to turtling.
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.21.

Changes:
  • Adaptation to enemy VTOLs hopefully works in 3.1 now;
  • Now tries to defend derricks that were actually destroyed in the past, proportionally to the amount of times they were rebuilt, instead of building defenses randomly;
  • Now adapts to particular players (will send mostly machineguns against a mostly-cyborg opponent, even though some other enemy may produce mostly tanks; not sure it's effective, but worth a try)
  • ~Flame~ personality now demolishes the original factory when borg factories are up and running but hovers aren't ready yet; also, its build order and research path were modified a little;
Post Reply