Neutral Units

Neutral Units

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

Post Reply
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Neutral Units

Post by Argh »

Dear AI people: KAIK and AAI do not handle Units assigned to Gaia properly, and crash Spring. I am willing to bet that this will also be the case when other AIs are available for 0.76b1 as well.

I'm guessing that this is a pretty fundamental problem that's been overlooked. I've never seen an AI try to Capture before, and I'll bet they're borked because all of the nearby build-spots are "covered" with "units". Poor things, they're too stupid to realize they've been given a fortune in new resources and ways to hose players, especially players who don't bother scouting ;)

What to do about this?

Well, I think that AIs need to either attempt to Capture the Gaia units, suck them up as free resources, or kill them, by force-firing on them. They shouldn't kill things that don't attack them first, however- they should probably capture them, since they're going to always be too dumb to know what Gaia stuff is a nifty tech upgrade, and what's just some free lunch. But the days of "that's a tree, go get some E" are going to be over. Very, very soon.

Not having AIs make this fundamental choice will cripple them as I get my new LUA code, that very heavily makes use of Gaia, in play, and mappers / modders start using it.

I'm going to have a tech demo ready sometime fairly soon, and it's going to show you what the future looks like- I haven't been this excited since the early days with CEGs, let's put it that way... this is going to change everything about how we interact with maps, both as game designers and as players. AIs need to adjust, too.
User avatar
kiki
Posts: 859
Joined: 05 Nov 2007, 03:06

Re: Neutral Units

Post by kiki »

At this point, incorporate a lua based ai into the map :lol:
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Re: Neutral Units

Post by submarine »

I dont know much about LUA and all that stuff and I dont know what crashes AAI either; if you put up an example map, I can have a look at it and check it. However I'm not very keen on delving into LUA....
User avatar
Triaxx2
Posts: 422
Joined: 29 Aug 2004, 22:24

Re: Neutral Units

Post by Triaxx2 »

Nah, I'll pretty much stick with: If it doesn't move reclaim it, if it moves shoot it until it stops moving, then reclaim it.
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Re: Neutral Units

Post by submarine »

AAI doesnt purposeful reclaim features atm anyway; i guess ignoring some neutral units on the map is not such a big problem, is it?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Neutral Units

Post by AF »

As I understand it:

GetFriendlyUnits()
GetEnemyUnits()

Lets take the case of gaia units, those neutral things:

My bird unit is not an enemy, therefore it won't show up on enemy units, but it isnt a friendly unit either! I receive no messages signifying what it's doing or events save for possibly unit damaged if the neutral unit attacks, because its no an enemy so there are no enemy entered los ro radar, or enemy destroyed events!

So to find the gaia units to begin with I need to set up an array to hold all the allied and enemy units, and then get all the units and compare them so I have a list of units that arent enemies or allies. tbh I don't like the idea of doing this at regular intervals or repeated checks, it'd be much much faster to ignore gaia units unless provoked.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Neutral Units

Post by Kloot »

Perhaps the easiest solution is to change
those interface functions so they filter out
neutral units by default, and then to add a
GetNeutralUnits() for AI's that want to deal
with them in due time. It wouldn't solve any
call-in problems stemming from neutral units
attacking stuff (for UnitDamaged(), etc), but
the amount of tedious work needed to make
them compatible would be reduced.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Neutral Units

Post by Argh »

I probably mis-understand what you're saying, but I really think that having the AI try to pretend that the new Units don't exist, for now, is probably worse than going ahead with some drudgery. The issue of the Gaia units taking up world-space is the first major issue- the second one is dealing with hostility, the third one, the biggie, is building rational responses- capture, kill, reclaim.

A lot of the problem here is that Gaia, instead of being inherently special, with special rules, is really just a player like any other. However, from an AI's perspective, it's not. It's a "player" that may or may not require a lethal response. This is going to take a lot of work to resolve.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Neutral Units

Post by AF »

The lengths needed to do this do not justify the means, it's as simple as that. An engine side system as suggested by kloot would be needed. Heck I already have complaints about performance in some mods I'm not going to hassle my AI with a performance hogging routine that wont apply in 9/10 cases.
User avatar
Triaxx2
Posts: 422
Joined: 29 Aug 2004, 22:24

Re: Neutral Units

Post by Triaxx2 »

The fastest way to check would boil down to:

Does the unit belong to me? No.
Blow it up.

While it wouldn't add much, or even potentially any threat to my grids, and I wouldn't order a fighter scramble to splatter one bird, if the ground AA, MT"s and flak, got the chance, they'd fire on it.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Neutral Units

Post by Argh »

But, what if that Neutral Unit is something that should get captured, if the AI is going to win?

Methinks you're trapping AIs in an OTA game design with these kinds of statements, guys. Neutral stuff is coming, and AIs that waste time and firepower blowing it all up around them, are just going to get owned by human players :P
User avatar
Triaxx2
Posts: 422
Joined: 29 Aug 2004, 22:24

Re: Neutral Units

Post by Triaxx2 »

Not necessarily, they won't be priority targets by any means. So if an actual enemy unit is coming, they'll shoot those first.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Neutral Units

Post by Argh »

You're not getting it. LUA has changed everything here.

What if you need to capture certain things on the map in order to win? They're Gaia, and Neutral, and don't attack players. If the AI is stupid, and blows them up, then it's just going to lose.

I've already requested the FBI tags that would make all of this readily available in UnitDef, so that AIs can handle this issue a lot easier, but having AIs just blow things up will result in borked play. I keep telling y'all, things are about to change... just wait, the map thingy is coming, these issues will be a lot more clear at that point.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Neutral Units

Post by AF »

Part of this is that some of this behaviour can be attributed to spring sub behaviour AIs too.

Also a unitdef based system would be innefficient. For example neutral nodes and active nodes in fibre would have to be two totally different unit types. Its a horrible solution that causes problems too.

As was originally said, seperating neutral untis from the GetEnemies calls and adding special Neutral calls for gaia units is the way to go. Until then code performance trumps all.
Post Reply

Return to “AI”