Jump to content

Experiments with AI


Max_Caine

Recommended Posts

I'm carrying out experiments with the AI to see if it's possible to make the AI both more varied per race and to try and make the AI match up with the racial descriptions. My current experiments can be found here.

Things I have learnt not to do so far

  • Use ProbablisticSearch without reducing EngagementRange. If you give ProbablisticSearch a positive value with the standard EngagementRange values, the AI starts taking lots of pot shots in the undiscovered tiles. I'm trying out the Sound weight to see if that will be more suitible.
  • Reduce EnemyLOS beyond -5. If you do that, the enemy will keep retreating and retreating, always trying to escape LOS. Ambush is a better value to set, IMO.

Has anyone experimented with any of values which aren't really explained (or explained at all) in aiprops, like EnemyInfluenceValue, EnemyInfluenceDecay, AlliedInfluenceValue, AlliedInfluenceDecay, any of the weapon weights or any of the Effect weights and be willing to talk about their experiences?

Link to comment
Share on other sites

I've made more changes to the AI which I'll put up some time tonight or tomorrow morning. Might show some footage as well, depending. Something I've noticed (and I don't know how true this is) is the AI lacks cohesion. When I set the various rules in aiprops, I'm setting rules which each individual AI will follow. Each AI unit in-game follows those rules without seeming to care what other AI units will do. If the aliens didn't have special rules and powerful weapons, they'd get roflstomped as putting them up against a human player is rather like put up a group of holidaymakers out to play paintball for a day against a team of hardcore enthusiasts. They don't work together like a human player does (which is a good thing, I guess?). I personally think if AI were to be enhanced in any way, then the AI really needs some kind of planner which can develop overall strategies for the individual units to follow.

Link to comment
Share on other sites

Updated the upload. Here's a pair of videos featuring altered Sebillians. The first is 10 minutes long and is a fairly well-armed squad verses a scout. You can see almost immediately just how much more aggressive Sebillians are.

[video=youtube;jyo8fTLaYRU]

Link to comment
Share on other sites

I will watch the videos but first I want to share some experiences.

I worked on some melee aggressive ai and now try to make an aggressive ranged ai for some special aliens. The main thing is the damage out put of an alien is a big point. Even big stun damage or low dmg with high mitigation make the aliens a real coward who never attacks even the enemy is in front öf them.

Another thing is aliens don't use kneeling even they try to hide or shoot. This is a big penalty for them because they lose a good cover and acc bonus. They try to go out of the los. Maybe they do but just staying back öf a soldier with the idea öf staying at Los, won't give them any purpose.

Link to comment
Share on other sites

The more I work with the AI, the more I can see it's missing one or two things.

Command

The AI is very individualistic. I say "individualistic" rather than "scripted" because behaviour isn't scripted - it's directed. You encourage the AI to stay close or stay far away from its buddies. You encourage the AI to look for the best shots or the worst shots. You don't specifically tell it to do something - you set up the variables which then lead it to hopefully do what you want it to do. Because each AI unit is individualistic, they act in their own best interest, not in the interest of the group. For example, each AI targets shoots at what it individually thinks is the priority target, instead of raining hot plasma down on the same target.

The AI could use some kind of separate planner or commander which tries to think for the group and guide the group to do things it doesn't want to do. Keeping in with the way the individual AI works, I'd probably have the planner set beacons as attractors, repellers and priorities. So if the planner wants some units to move quietly up a flank, it would set up a beacon to attract units to the quiet area and other beacons to repel units away from the areas it doesn't want the AI to go. I'd also have it set target priorities on enemy units.

Communication

The AI doesn't talk. Other than occasional "help me kill this guy" requests (which can be modified through Goal), the AI units don't talk to each other to communicate and develop emergent strategies. An AI unit which is getting suppressed by Xenonaut soldiers is left to fate - other aliens won't come to the aid of that alien. Aliens don't share information like who among the Xenonauts is scoring the most hits, who has killed the most aliens, which are the best targets to go after. Better communication between aliens would help a lot to make the aliens more tactical.

Edited by Max_Caine
Link to comment
Share on other sites

I didnt look yet your AI, Max because i dont know exactly which ones did you changed. You made sebillian videos but did you touch any others AI?

And i want to share my tests today.

<Pathing

Sight="-2"

Sound="-5"

Cover="-3"

Ambush="-20"

Trepidation="10"

ShotPotential="-18"

EnemyInfluence="-10"

AlliedInfluence="-1"

EnemyLOS="15"

ProbabilisticSearch="-5"

NearestEnemy="-3"

Goal="-30" />

With this aggressive cod, i saw the AI is really aggressive but not a stupid style. I wish to create a fighting AI who uses covers and sight but not crazy lame LOS hiding.

I made tests aliens with normal weapons and low damage weapons. I made low damage+very high mitigation weapons for special use for aliens. And as i expected at melee aliens, ranged aliens prefers reaction fire over normal attacks when their damage out put gets lower. Its a big fact. With this AI, even low damage weapons, the enemy uses realy good tactics and still attacking well.

As i experienced with this AI, aliens dont bother about LOS but they use sight. Even you can see them u cant shoot them because they get covers to the edges or cars. At least they fire as much as they can and then get lost. Sometimes i saw some fleeing aliens and then they made fast ambushes. It was a fast manuever rather then a long ambush.

And again i tried to make them help or react each other. My tests was with little maps, scout maps. I saw that, some far aliens joins to fight with time. Against default aliens with default damage weapons, only two sebillian hold be at chopper and 2 came after 2-3 turns.

At times i think they act coward, they shoot me from another side. I cant imagine this at a terror site..

Max i still dont get something. The behavior code just after the race line, what does it replace? Aggressive, passive, defend? which one? If it replaces all then there is no point.. if it replaces only the main behavior then the ScriptOverrides will override it anyway.. same for the behavior edit you put for an alien type. example for guard, you put a behavior before sebillian guard.. what will update that line..

Link to comment
Share on other sites

I honestly don't know how the script overrides work - based on Sentelin's comments of "patching" EITHER the racial weights override all script presets, or the weights are added to the script presets. Aiprops talks about "merging", but that isn't clear either. Is the merge an overwrite, or are the figures summed? I don't know. The only way I'll be able to tell is with more testing.

Link to comment
Share on other sites

Its very hard to see this with tests. I mean i checked your AI and your numbers are much less then mines. I mean i use 20, u used 0.3. So even i used big numbers, aliens still use LOS, sight, everything. Yes you can see a difference at the game when you looked to big picture but its hard to detect the details from it..

You are right about merging too.. its a mess.. there are 5 different AI code which you dont exactly know, which overrides what and you try to merge something on it. I think a total "replace" of the aiprop data is a better solution rather then trying to hope it merges with right thing. There must be as less code as it can so you can control easily.

Link to comment
Share on other sites

  • 3 weeks later...

Hey all! Had some very pleasing results with Caesans. I've spent some time today trying out various versions of ProbablisticSearch. It's like adding salt to a stew. Too much and you spoil the meal, but just enough and the AI can do things like set ambushes as it can estimate where you are.

[video=youtube;tZDNI6tX18A]

Link to comment
Share on other sites

I notice the AI works better the more crowded the environment. In an open desert/farm environment it doesn't seem to know what to do, but once you start adding props, it seems to have a much better idea of where to go, what to do.

[video=youtube;Echc0k96DD0]

Link to comment
Share on other sites

  • 4 weeks later...

Hey Max, as you have tinkered with the AI a bit more I see, have you been able to solve the issue where AI units reserve TU's even when really close to a known xenonaut unit?

I've tried to add a CautiousDistance to different behaviour scripts' pathing settings and decreased the minimum accuracy values but those changes didn't seem to help as I still see aliens just running close to my units and reserve all their remaining TU's for reaction fire.

I wonder if the CautiousDistance even does anything as it's not used in the vanilla settings.

Link to comment
Share on other sites

I've only really used the vanilla settings, so based on my experience with vanilla settings you have to consider a variety of factors.

The primary factors are MinimumAccuracy and the type of shot that aliens take. Aliens seem to prefer shots in this order: burst shots, snaps shots, reserve shots. If the MinumumAccuracy is higher than burst or snap, it will always reserve. It's not as simple as just reducing MinimumAccuracy. If you do that without care for other influencers, you end up with aliens standing in the open just blasting off shot after shot, because the bar has been set so low.

The second factor to consider is the way the game scores the best tile to stand in and asymetrical LOS. If you have set up influencers so the AI doesn't care about cover, it will stand anywhere it will get a shot, LOS be damned. If you've set up the influencers to care about cover, then the AI may be making erronious assumptions about LOS - it might assume that just because it cannot shoot you, you cannot shoot it. (Which we all know isn't true).

The third factor to consider is that the AI scores all tiles before making a shot. It may decide that the tile score for the proposed firing path isn't low enough to bother shooting from.

Link to comment
Share on other sites

Hey Max, as you have tinkered with the AI a bit more I see, have you been able to solve the issue where AI units reserve TU's even when really close to a known xenonaut unit?

I've tried to add a CautiousDistance to different behaviour scripts' pathing settings and decreased the minimum accuracy values but those changes didn't seem to help as I still see aliens just running close to my units and reserve all their remaining TU's for reaction fire.

I wonder if the CautiousDistance even does anything as it's not used in the vanilla settings.

CautiousDistance works best with Local Forces--but it effects units with melee or no weapon to a dangerous extent.

(Causes Civilians to avoid moving when the smart move would be to run out of Alien LOS)

(Causes Reapers to sit behind doors in the hopes of catching a Xenonaut)

Link to comment
Share on other sites

  • 8 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...