Page 8 of 57

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

Posted: 15 Feb 2012, 00:00
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);

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

Posted: 15 Feb 2012, 10:54
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.

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

Posted: 15 Feb 2012, 13:06
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

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

Posted: 15 Feb 2012, 13:19
by Terminator
How about adding a jummer sensor with AI mod & make him use it?

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

Posted: 15 Feb 2012, 13:23
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.

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

Posted: 15 Feb 2012, 18:35
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)

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

Posted: 15 Feb 2012, 19:10
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.

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

Posted: 15 Feb 2012, 19:51
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;
     };

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

Posted: 15 Feb 2012, 19:53
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.

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

Posted: 15 Feb 2012, 19:58
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:

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

Posted: 15 Feb 2012, 21:26
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!!

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

Posted: 15 Feb 2012, 21:32
by aubergine
Code snippet above updated.

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

Posted: 15 Feb 2012, 21:41
by Iluvalar
but all defenses upgrade with walls

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

Posted: 15 Feb 2012, 21:42
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.

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

Posted: 16 Feb 2012, 15:00
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;