[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
JDW
Regular
Regular
Posts: 1669
Joined: 18 May 2010, 20:44

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

Post by JDW »

Hi NoQ,

Have some feedback for you (But I think this is generic to all bots).

Nullbot does not destroy features that come in the way between itself and his enemies. And it does not seem to care for the presence of barrels either (don't know if it should, but since it doesn't cheat maybe it's fair enough for Nullbot to pick up). I'm not even sure that this is in your scope to fix.

Tested with 1.11 on Snowbridge map
wz2100-20120405_172723-Snowbridge8b-T1.jpg
wz2100-20120405_172742-Snowbridge8b-T1.jpg
wz2100-20120405_172759-Snowbridge8b-T1.jpg
You do not have the required permissions to view the files attached to this post.
"Speak when you are angry and you will make the best speech you will ever regret."
-- Ambrose Bierce
User avatar
Giani
Regular
Regular
Posts: 804
Joined: 23 Aug 2011, 22:42
Location: Argentina

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

Post by Giani »

JDW: :augh:

But i never saw nullbot trying to make tanks going over water before...
My maps: http://forums.wz2100.net/viewtopic.php?f=10&t=9501
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 »

AIs can't take barrels at all (by game design).

It is too hard to make AI fight its way through features, because the notion of "the way is blocked by features" is impossible to define via scripts (we don't even know if a certain map tile is passable or not). Probably i need to make it constantly shoot at features? Is it worth it? :hmm:

On the other hand, the way is *not* blocked by features in fact (there is a way around) :hmm:
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 »

ISTR Cyp or Cybersphinx mentioning that barrels can be picked up by AI in latest masters but only when using DORDER_RECOVER.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
Giani
Regular
Regular
Posts: 804
Joined: 23 Aug 2011, 22:42
Location: Argentina

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

Post by Giani »

NoQ wrote:AIs can't take barrels at all (by game design).

It is too hard to make AI fight its way through features, because the notion of "the way is blocked by features" is impossible to define via scripts (we don't even know if a certain map tile is passable or not). Probably i need to make it constantly shoot at features? Is it worth it? :hmm:

On the other hand, the way is *not* blocked by features in fact (there is a way around) :hmm:
I saw that Nexus AI shoots at the features randomly.
My maps: http://forums.wz2100.net/viewtopic.php?f=10&t=9501
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 »

Giani wrote:I saw that Nexus AI shoots at the features randomly.
Emm i've heard of this sort of fix too, but i couldn't find it in its code yet :hmm: isn't it rather a microAI feature?
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.14

Changes:
  • Hopefully fix savegaming bugs found by camellia0x++.
  • Easy generic AI now uses a noobish build order (to make it even more easy).
  • Reimplement old-style group number management (without creating and deleting groups though).
User avatar
JDW
Regular
Regular
Posts: 1669
Joined: 18 May 2010, 20:44

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

Post by JDW »

Giani wrote:But i never saw nullbot trying to make tanks going over water before...
If you mean that you saw some tanks on the water, then it's just a graphical issue. The point I was trying to make is that AI could have (if allowed to) just shoot through the features and go through the passages just like a human player would as it seems like the logical thing to do, rather than choose a route which is not worthwhile in that situation. Also, as a side note, I don't understand why tanks with wheels/tracks and cyborgs should try to pathfind through water terrain. Unnecessary computations?
NoQ wrote:AIs can't take barrels at all (by game design).
Hmmm, was afraid you would say that.
NoQ wrote:Probably i need to make it constantly shoot at features? Is it worth it?
Yeah, why not? I don't see much harm in it. But, if possible, it should give top priority to enemy units over harmless features.
NoQ wrote:On the other hand, the way is *not* blocked by features in fact (there is a way around)
That's just the case in the map that it was tested on. It won't be the same on maps that have all paths blocked by features though.
NoQ wrote:
Giani wrote:I saw that Nexus AI shoots at the features randomly.
Emm i've heard of this sort of fix too, but i couldn't find it in its code yet :hmm: isn't it rather a microAI feature?
If it's not implemented in code, then it's possible that the features were caught in the crossfire or were in the way when Nexus AI was targeting the enemy.
"Speak when you are angry and you will make the best speech you will ever regret."
-- Ambrose Bierce
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 »

Well, i'll try think of something about features.

v1.15.

Changes:
  • Include a scavenger AI modification, based on the ultimate scavenger mod but without any game stat and model changes. That is, it doesn't build structures etc, but still shows some more advanced behaviour than the default scavenger AI. The scavenger AI is packed in a separate file. The reason for this is that it actually is a mod that modifies game and not adds up to it, so you won't enjoy playing it in multiplayer as easily as you do with NullBot.
NOTE: the regular AIs didn't change, merely a version bump.
cue
Trained
Trained
Posts: 59
Joined: 06 Nov 2011, 00:12

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

Post by cue »

Ill start by admitting that I did not read through all the posts.

We were playing a 8 player map, 2 humans vs 4 AIs.
It was rater early in the game, the Lancer just arrived and we were using our usual defensive stand and the AI was throwing erratic attacks as usual.

But then the AI attacked me and wiped out my defenses in a heartbeat (blitzkrieg), it was awesome! But to my amazement after cleaning out my defenses completely it stopped and retreaded back so I could rebuild.

Why would the AI not kill me off?
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 »

Why would the AI not kill me off?
No idea, need more info. Probably something distracted it (did some other player attack him?), or he found a more suitable target belonging to you (another oil derrick or truck somewhere outside the base?), or the group you met was actually targeting another enemy and distracted on you only because your defenses caught their attention by shooting at them? Were the 4 ais allied? Did he come back after a while? Hmm, or maybe the group was too damaged to go on with the attack?
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

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

Post by Per »

NoQ wrote:Emm i've heard of this sort of fix too, but i couldn't find it in its code yet :hmm: isn't it rather a microAI feature?
Yes, part of micro-AI. If the droid is stuck for long enough, it should get "frustrated" (I think I called the variable that), and start firing at nearby destructible features, to see if that helps clearing a path.
cue
Trained
Trained
Posts: 59
Joined: 06 Nov 2011, 00:12

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

Post by cue »

We are trying to play with NullBot 1.15.
But we have very bad problems with slowdowns.

I see that you have a hunch that the AI is CPU unfriendly
I'm not sure, but probably some of this code is highly ineffective and CPU-intensive.
Is there any way to see what part of the game is slowing us down, or for that matter who?

I also asked what system requirements are for Beta 7.
viewtopic.php?f=6&t=9259
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 »

To see if NullBot is the problem, try playing against Nexus instead. Nexus is much less CPU-unfriendly.

In fact, on my PC, i'm starting to have problems with around 5 NullBot AIs running. But my hardware is much older than yours (one of the early P4, ~8 years old).
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 suspect it's the clustering code later in the game when there is more stuff on the map. Also, I suspect that possibly nullbot doesn't know when it's been defeated and thus keeps running that code. Maybe have a check to see if nullbot has any units/buildings left and if not throw a kill switch? Obviously, human ally could gift a truck so it would still need to do minimal check to detect "resuscitation" and reactivate itself if it suddenly finds it has a truck from somewhere.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO