[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
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 »

I don't know but is there a script func to check game_version ? So custom scripts could use it so to execute in right game-version.
There is, and there is a bug in it mentioned a couple of messages ago, so i just switched away from using it since v0.23.
User avatar
aubergine
Professional
Professional
Posts: 3462
Joined: 10 Oct 2010, 00:58

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

Post by aubergine »

Terminator wrote:I don't know but is there a script func to check game_version ? So custom scripts could use it so to execute in right game-version.
p.s. sorry for off-top
Even when the version global bugs are fixed, it's still not a reliable way to check what flavour of the JS API you're using. It's a bit like browser sniffing, which is often unreliable. It's better to check for the existence of new API features that were implemented just after a bug fix, etc., https://warzone.atlassian.net/wiki/disp ... sofchanges
"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: 3462
Joined: 10 Oct 2010, 00:58

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

Post by aubergine »

@NoQ - v0.22 still struggled to get AA defences in place prior to enemy sending VTOLs at nullbot bases.

Will test out the new v0.24 later today.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

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

Post by Per »

'version' has been changed for beta3/master, it now says either "3.1" or "3.2" (on all platforms).
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 »

I know, but i still can't rely on it as long as v3.1 beta2 is around (:
aubergine wrote:@NoQ - v0.22 still struggled to get AA defences in place prior to enemy sending VTOLs at nullbot bases.
Still can't reproduce, please give more details (i don't think i fixed anything about it since 0.22) (savegame?)
User avatar
aubergine
Professional
Professional
Posts: 3462
Joined: 10 Oct 2010, 00:58

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

Post by aubergine »

It seems to only build AA once it's come under attack, and even then only at locations where it's detected attacks.

In the game I just played (me + nullbot ~MC~ vs. 2 nexus on your 4c-freezing 1.0.1 map) nexus was attacking with VTOLs early, easily destroying several nullbot buildings and lots of nullbot troops.

Key problems seem to be:

1. Doesn't research Hurricane/Sunburst early enough
2. Once VTOLs start striking, it doesn't alter it's research path
3. Even once required research is in place, it still doesn't build many AA sites
4. It should ideally be building AA sites regardless of VTOL attacks
"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 »

Were Nexus AIs on insane? In that case, they get VTOLs much earlier than possible.
Once VTOLs start striking, it doesn't alter it's research path
Well, dynamic research path is what we certainly are currently lacking. I already started ... thinking ... about it and making necessary preparations.
Even once required research is in place, it still doesn't build many AA sites
The current code makes it build exactly as many AA sites as there are enemy VTOLs, hopefully regardless of wether they were attacking. On the other hand, it might have been a bit slow or busy with building something else, and the gap between Nexus's producing VTOLs and using them is very very small, not enough to actually react. What i had in mind while planning this feature was that you keep VTOLs at your base until you have around 30 and then suddenly wipe out the unprepared AI - well, this will currently be harder due to AA adaptation. But this doesn't really affect the behaviour against Nexus AI too much.
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.25

Changes:
  • Some major adaptation rework (will discuss the details later), now uses anti-building tanks (mortars, bunker busters, MRAs etc.) and mobile sensors (doesn't attach tanks to them yet, will do someday ... still helpful for targeting long-range arty) against a turtling opponent, also adds anti-air tanks to the attack groups;
  • Hover AI now decreases the number of labs when has some allies (they (labs) researched crap anyway);
  • Fixed broken group attack target persistance;
  • Fixed broken NaN VTOL workaround, fixed a few version detection bugs;
User avatar
aubergine
Professional
Professional
Posts: 3462
Joined: 10 Oct 2010, 00:58

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

Post by aubergine »

For any backwards-compatible workarounds you've got, could you add them to this page (even if only a comment): https://warzone.atlassian.net/wiki/disp ... patibility

At some point I want to make a small js file that can be included which will patch up older versions of the JS API to make them as compatible as possible. I noticed that the API functions and globals are read-only, but configurable which means that I can override them from JS. For example, I can create an enumDroid() that backports a lot of the newer droid object properties to earlier versions of the JS API in a transparent manner.

The plan is that AI scripts using the backport library will be able to use most if not all of the latest stuff without any code cruft.

Will give v0.25 a go shortly and try and post a savegame if the AA defence issues persist. Will be interesting to see the anti-turtling stuff at work. :)

Note: I've not been testing hover or generic personalities much, I mostly use the MR and MC ones.
"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: 3462
Joined: 10 Oct 2010, 00:58

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

Post by aubergine »

NoQ wrote:Well, dynamic research path is what we certainly are currently lacking. I already started ... thinking ... about it and making necessary preparations.
My initial ponderings on a very basic solution: https://warzone.atlassian.net/wiki/disp ... g+research

I too have ideas on how to make fully adaptive research path, but it's going to be a while before I can work through them.
"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 »

I think i'll just make the initial research path (till around all modules) and then several research branches to adaptively balance between.

Also, here are a couple of screenshots of Generic AI fighting against so-far-unreleased Turtle AI (i think i'll put it into 0.26). It switched to MRAs and bunker busters, as it didn't research mortars yet.
wz2100-20120221_112425-Sk-Clover.jpg
wz2100-20120221_112930-Sk-Clover.jpg
Well, just thought they looked cool (:
You do not have the required permissions to view the files attached to this post.
User avatar
aubergine
Professional
Professional
Posts: 3462
Joined: 10 Oct 2010, 00:58

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

Post by aubergine »

For turtling I highly recommend Seraph missile arrays. Once you get a bunch of those (like 25+ of them), backed with a few radars, the enemy won't get close until they've researched nexus bodies. Also, as soon as you get Seraph's you need to be ready to build a load of them as the enemy will already be getting superior droid tech that will start overwhelming your defences - so you'll have to demolish older defences to a) free up space to build and b) get some cash (power) to pay for the new structures.

Can't wait to play against the turtle!

EDIT: Also the turtle should have a cyborg meat shield at the ready to draw fire away from it's expensive defence buildings.
"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 »

Sadly, I doubt that all these defenses would do any good against an enemy that uses a bunch of mortars.
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 »

Sure sure. I also doubt beating a turtle be of any difficulty to a human player, but it already proved to be not really too bad in AI vs. AI matches, even though my new AIs already adapt to turtling by using bunch of mortars or bunker busters. The trick is that it focuses on arty so much that it is able to invent ripples (or at least counter-battery) by the time an [unprepared, implementing its general strategy] enemy bot comes up with mortars (cause the research isn't flexible enough yet, and inventing mortars is a bad idea most of the time).

It gets even more complicated in FFA matches, where you will be dead if you waste too much technological and economical attention on blowing up turtled defenses, and in team games, where sometimes you wouldn't mind having a turtly ally that will just keep himself alive and quickly provide artillery and VTOL technologies.

Yeah, i forgot to mention that turtle AI will use VTOLs (primarily HEAP bombs, which depend on mortars). You may thus call it a "VTOL AI", for it will work well on VTOL-only maps, much like Hover AI is the only one that works well on sea maps.

One last thing i'm planning to implement before the next release is selling old defenses; it is essential for Turtle AI because it is running of space pretty quickly.

Sorry for talking so much without providing the actual thing (:
User avatar
aubergine
Professional
Professional
Posts: 3462
Joined: 10 Oct 2010, 00:58

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

Post by aubergine »

NoQ wrote:Sorry for talking so much without providing the actual thing (:
Heh, I win the prize for that: viewtopic.php?f=35&t=8801 :ninja:
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO