[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!
zany
Trained
Trained
Posts: 303
Joined: 20 Sep 2011, 07:04

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

Post by zany »

I mean that once I got all the oil they didn't bother to take them back they would go out and attack my squad but not retake oil
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 »

@Zany - I also had that "problem". Well, it was great for me, but not so great for nullbot heh.

In fact, on 4P Great Rift T0 map, if I take oils near my corners of the map nullbot often won't attack them until quite late in the game. I can just leave them there undefended pumping oil out of the ground.
"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: yet another AI for v3.1+

Post by Shadow Wolf TJC »

aubergine wrote:Easier way to detect artillery fire:

Code: Select all

eventAttacked(victim,attacker) {
  if (attacker.type==STRUCTURE) {
    // assume artillery fire? obviously full of fail if the structure is a flamer bunker...
  } else {
    // run away
  }
}
A while ago, I started to consider putting Ripple Rockets, Ground Shakers, and Archangel Missiles on Tracked vehicles so that they'd be ALOT less vulnerable to counter-battery fire (due to them taking only 40% as much damage from artillery). I don't think that that script would help in such a situation. Perhaps checking the attacker's weapon would work better?

@ NoQ: Does your Flamer personality have a plan for dealing with VTOLs? I've noticed that the Flamer line lacks any anti-air capabilities.
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: yet another AI for v3.1+

Post by NoQ »

Perhaps checking the attacker's weapon would work better?
Unfortunately, script engine doesn't allow that yet.
Does your Flamer personality have a plan for dealing with VTOLs? I've noticed that the Flamer line lacks any anti-air capabilities.
Yeah, even though i told it to learn hurricane, it's usually not enough. Well, pure flamer spam does suffer from this, there's not much i can do without doubling the research time necessary to develop things. It will, hopefully, benefit from his teammate's AA research, and it also uses the scary incendiary bombs, so you should be fast enough to get VTOLs before he does; unfortunately, i didn't do enough tweaking of the research path, so he won't come up with VTOLs as early as necessary.
I also had that "problem". Well, it was great for me, but not so great for nullbot heh.
It's a bug. Derricks were supposed to be second only to laser satellite command posts in attack target priority. Just fixed it recently, new version hopefully coming out soon.
_________________________

What is really bothering me is regrouping algorithms used. I've just explained not to move all tanks in regroup, but only those that are actually lonely; but it's still a lot of jumping due to a poor definition of "lonely". Seriously need some clustering analysis ... can somebody provide a good link? Cause wikipedia wasn't really helpful ...
User avatar
Shadow Wolf TJC
Regular
Regular
Posts: 1047
Joined: 16 Apr 2011, 05:12
Location: Raleigh, NC

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

Post by Shadow Wolf TJC »

Perhaps checking if any friendlies are near the unit could work?
Creator of Warzone 2100: Contingency!
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100
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 »

The flamer line is thwarted by brick walls. I managed to beat flamer nullbot last night using turtling...

EDIT: If flamers VTOLs weren't so shy, the outcome of the game would have been very different!
"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 »

v0.9 release. I skipped a number because it is so good and i love it so much i leaked v0.8 into some bug report (:

Changes:
  • New "NullBot Hover" personality designed for sea maps: uses the (in?)famous tech-to-MRA-cobra-hovers startegy;
  • New regroup algorithm again, based on some sort of naive cluster analysis;
  • Splits VTOL masses into groups, builds more rearm pads;
  • Bugfix in cyborg production code; now actually produces supercyborgs;
  • NullBot MC doesn't regroup in first 5 minutes; made it much more dangerous in early-game;
  • NullBot Flame doesn't build too many early factories until hovers are available, also uses a bit more techy build order;
  • Now uses super fortresses;
  • Now builds (and sometimes even uses) repair centers;
  • Attacks oil derricks first, tries to attack most undefended first (bugfix in attack code, not always a good idea though);
  • NullBot sometimes uses technologies that he doesn't research (if they are suddenly available), in order to adapt to his allies;
  • Probably something else i forgot to mention. Some research path tweaks.
Doesn't produce engineers yet (don't know how), doesn't adapt to VTOLs in advance yet (no idea how to find out how many AA i already have). The Hover AI seems cause a slowdown in oil hunt procedure (every 7 seconds); i couldn't yet figure out why.

P.S. Thank you very much for feedback! I'm mostly testing NullBot in AI vs. AI matches (for the sake of speed), so it's really nice to have some human game feedback :3 Also, it could be helpful if you mentioned what maps you try and what unwanted behaviour you see on specific maps ;)
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:The flamer line is thwarted by brick walls. I managed to beat flamer nullbot last night using turtling...
Precisely. There are also much faster ways of defeating flamers (eg., very early mg rush). Flamer AI isn't really competitive, cause its startegy is know to be far from the best.
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 »

How do you test AI vs. AI? Do you still have to be a human player on the map or can you have a map consisting entirely of AI players?
"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 »

The latest version is working much better.

One issue I spotted: If you're building a factory and it's in range of my artillery, you're droids keep building it in same place over and over = arty fodder. Would safeDest() be able to warn you not to build there and that being the case build somewhere else, eg. near a safe derrick?
"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:How do you test AI vs. AI? Do you still have to be a human player on the map or can you have a map consisting entirely of AI players?
I usually activate cheats, use deity cheat to get full visibility, and then kill all my units (Alt+K). I also make myself allied with one of the players and sometimes spawn up a research lab (Ctlr+O) to monitor the research allied AI makes. It's really useful that in 3.1beta1 destroying command center doesn't remove minimap (lol) (though i'd prefer the deity cheat to always activate minimap as well) (though minimap is planned to be always on anyway). Then make it run at 100x speed (Ctrl++) :wink:
aubergine wrote:One issue I spotted: If you're building a factory and it's in range of my artillery, you're droids keep building it in same place over and over = arty fodder. Would safeDest() be able to warn you not to build there and that being the case build somewhere else, eg. near a safe derrick?
Hmm good point; i forgot to add a safeDest check for building base structures, for if it is not safe to build base structures, then you're probably already dead anyway (?)
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 »

Depends where the factory is being built - eg. on sk-startup the AI starts in valley and ends up building out towards the main battlefield.
"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 v0.10: yet another AI for v3.1+

Post by NoQ »

Uploaded v0.10.

Changes:
  • Includes two single player challenges inside. One is a remake of "Back to Basics". Another is a new challenge called "Anchor" on a completely new map (shipped with the mod will re-post as a map-mod soon); it includes all four personalities of NullBot; your enemy also starts with a certain technological advantage in this challenge.
  • NullBot tries to detect if it is runs inside the challenge and adjusts behaviour to be more campaignish, eg. don't build new factories apart from necessary, etc. The detection is based on unusual starting power level; see the Anchor challenge for an example.
  • Safety check before building base structures.
  • Don't get stuck when reached truck limit.
  • Produce cyborg engineers sometimes (only on master, not on v3.1).
  • Bugfix in return fire code (no idea why it worked earlier).
  • Probably something else i forgot to mention.
Last edited by NoQ on 08 Feb 2012, 14:39, edited 1 time in total.
User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland
Contact:

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

Post by Emdek »

Looks nice. :-)
Do you plan including "factions" (as discussed in another topic, AI would like certain type of bodies, propulsion and weapons, like factions from campaign) in this mod?
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

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

Post by NoQ »

Just removed the "Anchor" challenge, because of finding out that this way of packing doesn't really work in v3.1, but only on master. Will re-pack as a map-mod soon :oops:
Emdek wrote:Looks nice. :-)
Do you plan including "factions" (as discussed in another topic, AI would like certain type of bodies, propulsion and weapons, like factions from campaign) in this mod?
In the challenge just deleted, one of the enemies starts with Nexus bodies available :)
Post Reply