[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: an adaptive skirmish AI for Warzone 2100 v3.1+

Post by NoQ »

effigy wrote:I was wondering does he also do nice MG research? I was surprised that once I got to his base he put up a lot of HMG Hardpoints
If it was a hard or insane AI, and you used only tanks, he might have slowed his MG research down. He doesn't apply this behaviour to his choice of defenses yet. Of course, he doesn't research much MGs in flamer-based personalities, but i think you played the challenge, right? Then he was mg/cannons, and i'm surprised to hear that he didn't use cannon hardpoints.
aubergine wrote:Maybe you could do something on eventDroidBuilt() -- if you know the built droid isn't a hover/vtol then use that, and have a de-spam so it only does the enumFactories thing no more than once per 3 minutes?
I just ended up switching to hovers completely after i have them and encounter at least one reachibility problem. Sounds like the safest way possible.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

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

Post by NoQ »

v1.04

Changes:
  • Add tanks that can't reach the enemy to a special group. This group only defends the base and doesn't attack the enemy. This way they no longer slow down the attacks.
  • Make sure at least some hover trucks are produced after hovers are invented.
  • Switch to hovers completely as soon as at least one enemy critical structure is found to be on an island.
  • Make sure at least one truck is responsible for building the base.
I will probably find a better use for defender group later. For example, add some percentage of tanks into in in FFA matches.
Last edited by NoQ on 14 Mar 2012, 19:57, edited 1 time in total.
zany
Trained
Trained
Posts: 303
Joined: 20 Sep 2011, 07:04

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

Post by zany »

aubergine wrote:I'm on an Apple Macbook heh. What should it look like?
I shrunk it down so it isn't too big but you get the picture
this.jpg
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: an adaptive skirmish AI for Warzone 2100 v3.1+

Post by aubergine »

@Effigy - what base type setting was the game played under? If "Walls" or "Base" then it's likely those structures were pre-placed on the map rather than built by the AI.

@Zany - not sure why you have different gfx - if you look at Effigy's pic on page 17 its using same gfx as mine was. It looks like you have different wall design or something? Maybe a mod in your install?
"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: an adaptive skirmish AI for Warzone 2100 v3.1+

Post by aubergine »

@Zany - I just realised you were using Collective structures rather than Project structures. I see from the bottom left corner of your pic that the normal Project walls look just the same as mine. In other words, the only difference between my screenshot and yours is that you were using structures not normally available without cheat mode.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
effigy
Regular
Regular
Posts: 1217
Joined: 22 Jan 2010, 03:21

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

Post by effigy »

NoQ wrote:
effigy wrote:I was wondering does he also do nice MG research? I was surprised that once I got to his base he put up a lot of HMG Hardpoints
If it was a hard or insane AI, and you used only tanks, he might have slowed his MG research down. He doesn't apply this behaviour to his choice of defenses yet. Of course, he doesn't research much MGs in flamer-based personalities, but i think you played the challenge, right? Then he was mg/cannons, and i'm surprised to hear that he didn't use cannon hardpoints.
...
Yes, it was the challenge mode. I think he's set to medium. So, I think that means you didn't edit Highground, but Nullbot becomes the AI (re: aubergine)?
This is why some features aren't implemented: http://forums.wz2100.net/viewtopic.php?f=30&t=7490&view=unread#p87241
zany
Trained
Trained
Posts: 303
Joined: 20 Sep 2011, 07:04

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

Post by zany »

aubergine wrote:@Zany - I just realised you were using Collective structures rather than Project structures. I see from the bottom left corner of your pic that the normal Project walls look just the same as mine. In other words, the only difference between my screenshot and yours is that you were using structures not normally available without cheat mode.
I am not talking about walls or anything but the ground textures. compare your pic with mine and it looks like you are playing some really low res textures or something? don't know how you can stand looking at that
User avatar
effigy
Regular
Regular
Posts: 1217
Joined: 22 Jan 2010, 03:21

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

Post by effigy »

zany wrote:
aubergine wrote:@Zany - I just realised you were using Collective structures rather than Project structures. I see from the bottom left corner of your pic that the normal Project walls look just the same as mine. In other words, the only difference between my screenshot and yours is that you were using structures not normally available without cheat mode.
I am not talking about walls or anything but the ground textures. compare your pic with mine and it looks like you are playing some really low res textures or something? don't know how you can stand looking at that
Hmm... I was going to guess you were running at a lower texture size, judging from the appearance of the models in your screen shot. Also, from my perspective aubergine's look dark, and yours look kinda washed out.
This is why some features aren't implemented: http://forums.wz2100.net/viewtopic.php?f=30&t=7490&view=unread#p87241
zany
Trained
Trained
Posts: 303
Joined: 20 Sep 2011, 07:04

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

Post by zany »

yeah I shrunk the screenshot to fit the forum rules
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

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

Post by NoQ »

effigy wrote:Yes, it was the challenge mode. I think he's set to medium. So, I think that means you didn't edit Highground, but Nullbot becomes the AI (re: aubergine)?
Yeah, then he researched everything more or less uniformly.
Cyp
Evitcani
Evitcani
Posts: 784
Joined: 17 Jan 2010, 23:35

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

Post by Cyp »

When NullBot 1.03 follows my transports around ready to bomb the contents with VTOL thermite bombers, once noticing what it's doing, it's possible to kill the bombers by flying the transports over friendly AA, or by flying around in the middle of nowhere while the transport HMG kills the VTOLs. (The second option probably works better when you have 10 transports, not just one.)

At the end of the game the bots were very busy taking oil, but not rebuilding a base to spend it with. And they didn't send any tanks in transports to the small (oil-less) VTOL islands on the map I flew to, instead they were just walking back and forth in front of the VTOL island. But think those are known issues.

While they were still willing to rebuild, they only seemed to build their base in one place. Think building wherever the trucks happen to be is often a good idea.

And once there's nothing else left to do, they should run to a corner with a truck, and the truck should build walls around itself, in order to survive a few seconds more.
User avatar
aubergine
Professional
Professional
Posts: 3462
Joined: 10 Oct 2010, 00:58

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

Post by aubergine »

@Cyp: Water is a problem for JS AIs at the moment - we have no way of finding out what's on the map, and although NoQ has been coming up with some imaginative solutions, it would really help if the JS API could expose more information about the map - such as continents, and terrain types, etc.

To give you some idea of the problems currently faced, the AI literally has no clue what's on the map. Instead it has to check "can droid X get to point Y". In order to determine if there is water blocking access to wheeled/tracked vehicles, the AI scripter needs to first have a wheeled droid (as in actually have one exist on the map) to check if it can get to a specific location, then have a hovercraft droid to do the same check. If the hover can get there but the wheeled can't then we know we have some water somewhere on the map (but no real clue where or how much). If neither can get there then we know we have some areas only accessible via VTOLs/transports. And we have to do this sort of test for each location on the map in order to get some idea of what the map is like.

To make matters worse, AI's dont know what body/propulsion/turret(s) droids or structures have. In recent versions we're able to find some basic things out, like .canHitAir, .canHitLand, .hasIndirect, but still no idea what the actual weapon is for example. This also means the AI has no real clue about enemy droids or structures other than some basic macroscopic information, but even then a lot of that information isn't going to be available until WZ 3.2.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
Berg
Regular
Regular
Posts: 2204
Joined: 02 Sep 2007, 23:25
Location: Australia

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

Post by Berg »

aubergine wrote:To give you some idea of the problems currently faced, the AI literally has no clue what's on the map. Instead it has to check "can droid X get to point Y".
This issue is plain to see on maps with cliff islands the AI does not look on top of them for players so you can hide from it. Yes this is evil but the nullbot is so much fun you need to play the evil victor.

PS : is it bad to tell the author these things so we cant win?
User avatar
aubergine
Professional
Professional
Posts: 3462
Joined: 10 Oct 2010, 00:58

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

Post by aubergine »

I think it's us telling NoQ about all these things that is leading to the regular releases of nullbot and in turn making it better and better.

I only hope that I can one day write an AI that will rival nullbot, but it's a tall order. NoQ's done an amazing job here.

Although, rushing it with trucks and building walls around it's bases is still an easy way to defeat it...

@NoQ - maybe ensure each base gets at least one mortar pit early on to defeat that tactic? (mortars will kill the trucks I leave near walls to repair 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: an adaptive skirmish AI for Warzone 2100 v3.1+

Post by NoQ »

When NullBot 1.03 follows my transports around ready to bomb the contents with VTOL thermite bombers, once noticing what it's doing, it's possible to kill the bombers by flying the transports over friendly AA, or by flying around in the middle of nowhere while the transport HMG kills the VTOLs. (The second option probably works better when you have 10 transports, not just one.)
Sounds like a nice catch. Why DORDER_ATTACK for bombers against a transport even succeeds? Probably they were waiting for the transport itself to land to bomb the transport itself. Will have a look (:
At the end of the game the bots were very busy taking oil, but not rebuilding a base to spend it with.
Hmm, i think i fixed this in v1.04 already, just forgot to mention in the changelog (this commit).
maybe ensure each base gets at least one mortar pit early on to defeat that tactic?
Well, this tactic works pretty well on humans sometimes; also, fighting it off requires a very non-trivial micromanagement (giving enemy towers false targets, shooting trucks first when necessary, etc.), and we currently suck in micromanagement.
Mortar pits are usually built as soon as they are available, and if you're having a tower war against a Hard AI, it invents mortars rather early. You will also encounter sensor-supported mortar tanks pretty soon. Rocket AIs will try to hit you with MRAs and bunker busters, which is usually pretty hard too. But it is still usually too late. That tactic is to be countered earlier.