sweatyboatman sweatyboatman

[0.981] Argh, monsters still not agroing the AI

[0.981] Argh, monsters still not agroing the AI

Started a new game, love the New Game interface and all the options.  :thumbsup:

Takes way too long to build meat shields.  There's got to be a better way to balance late game troop building than making the early game a tedious slog as you wait 15 turns for a couple guys to make themselves some spears.  Or maybe I just need to learn to play the game better and stop trying to play this like it's 0.95.  :ninja:

Well, I may be waiting for troops, but I am loving the environment!  I'm surrounded by monsters, everywhere I turn there's a troll or an ogre or a bandit lair or a gasp slag!  Nowhere is safe!  The world is super dangerous!  Finally, my troops arrive, I am able to brave the wilderness... and I find that my neighbor has expanded wildly.  Foolish.

Wait.  Why is that Slag chasing me and not the pioneers wandering without protection?  Well, no worries, easy enough to escape.  It's just a fluke of the random monster AI...

Strange to see an Ogre just wandering, oh, it's because some earlier pioneer put down an outpost and released him.  Strange, the completely undefended outpost is still there.  And here's another undefended outpost with roaming monsters all around it.  Suspicious...

And then it happened.  That same foolhardy AI Pioneer that the slag had ignored a few turns earlier walks into a forest infested with mites.  Haha!  Silly AI, now you're in for it.  The pioneer steps closer, the mites move in for the kill... and they occupy the same space?!

A couple turns later, the AI's pioneer reaches a nice spot next to a river, with four monsters dens within a tile's distance and founds a city.  Completely undefended.  Maybe the monsters are just not attacking anything?  I walk over to check it out, bang, I am attacked by a Troll and his wolf army.

That really sucks.  XO The whole AI unit and monster unit on the same tile thing sucks.  The monsters only attacking my stuff sucks.  The whole concept that a pioneer can wander undefended and plop down outposts or a city without fear of the monsters it passes or settles next to sucks.  The world is supposed to be dangerous.

255,319 views 124 replies
Reply #51 Top

I just wonder if because Frogboy would be testing the monster behaviour with the Ctrl+U command to remove the fog of war, whether that is hiding a problem that we see because we (generally) play with FOW on.

The last game I played, I had a loosed dragon heading directly to my city from 2 screens away.  BUT I saved and logged out before it got to my territory.  When I loaded the game it started heading back from whence it came.

Perhaps the function GetNearestEnemy, or ScanRadius, or a compbination isn't working as intended.  OR there aren't enough triggers for the function to run again so it can select a more realistic target.

I agree with the above, that monsters should behave rationally.  In fact I actually play assuming that if I stop in a square next to a beastie, I will get attacked if the unit is weaker than the beastie.  I would much prefer that :)  (note:  I play on Hard monster to get a higher chance it will attak) :D

Reply #52 Top

Quoting StillSingle, reply 51
I just wonder if because Frogboy would be testing the monster behaviour with the Ctrl+U command to remove the fog of war, whether that is hiding a problem that we see because we (generally) play with FOW on.

Yep...been saying that all along.

Reply #53 Top

Quoting Adjuvant774, reply 51
Reduced 71%Original 800 x 450

Found out 2 turns later there was another forest drake to the east, too.

Its the "friendly" neighbourhood watch... :)

Sincerely
~ Kongdej

Reply #54 Top

Quoting Frogboy, reply 19
The world difficulty determines the rand()% odds of the monsters attacking someone.

You could lower the world difficulty and that would change the rand()%.

The code is basically this:

EnemyUnit = AIGetClosestEnemy(radiustoscan);

if EnemyUnit && rand()%WorldDifficultyInverse == 0 THEN attack(EnemyUnit)

I agree with have a problem because as long as we have the *perception* that the AI is getting a pass, then it is irrelevant whether it's getting a pass or not.  

But I am not sure the best way to handle it. It needs to be random because it makes it fun not knowing when or if a monster might attack.

I can say there is a lot of work put in to try to avoid getting killed by monsters and a lot of AI cities die every game. You'll quite occasionally see an AI player who simply gets killed off entirely. 

 

Is there a way to just toggle the Monster aggressivness without everything else that goes with changing World difficulty? IMO this should be s seperate toggle in the options

Reply #55 Top

Quoting Bellack, reply 55
Is there a way to just toggle the Monster aggressivness without everything else that goes with changing World difficulty? IMO this should be s seperate toggle in the options

That would be nice, playing with the world on insane tends to get the AI flipping around dying, but actually makes a very interesting game.
But would be nice to choose monsters artificial boosts separate from agressiveness.

Sincerely
~ Kongdej

Reply #56 Top

I have asked about a monster aggressiveness slider about 20 times already :d

Something like:

Docile - Gentle - Normal - Active - Nasty

Reply #57 Top

Quoting joasoze, reply 57
I have asked about a monster aggressiveness slider about 20 times already

Something like:

Docile - Gentle - Normal - Active - Nasty

Decile - Gentle - Normal - Active - Nasty - Out of theyre way - Overly aggressive - Charging stuff they can't even see

:-"

Sincerely
~ Kongdej

Reply #58 Top

World difficulty only affects monster aggressiveness and their toughness.

Reply #59 Top

Quoting Trojasmic, reply 52
Quoting StillSingle, reply 51I just wonder if because Frogboy would be testing the monster behaviour with the Ctrl+U command to remove the fog of war, whether that is hiding a problem that we see because we (generally) play with FOW on.



Yep...been saying that all along.

 

I know this has been a problem in the past, Brad, I wonder if it's still tainting your testing.

Reply #60 Top

Quoting Frogboy, reply 59
World difficulty only affects monster aggressiveness and their toughness.

Yea but some players want maximum aggressiveness and not so powerful monsters. If anything else for testing purposes, my current home rules include levelling all my heroes in path of the governor (God thats useless) and then only really using trained troops, while 1 governor at a time is grouping up with a couple of trained units to whack the world. With monsters set on insane I have to tech up to ludicrous amounts of technology before trained units stand a chance against mites with 70 hp. But I really want the world's monsters to be aggressive, they need to attack stuff.

I do still see monsters in enemy faction's territory though, so obviously insane is not aggressive enough.

Sincerely
~ Kongdej

Reply #61 Top

Quoting Frogboy, reply 11
The monsters don't treat AI units any differently from your units. I know it sucks when you get killed by a monster but the AI gets killed plenty as well just like there are times where your pioneer will walk safely by a monster.

They are not picking on the human.  If you saw the code you'd laugh. There's not a lot to it. A couple random rolls and a get closest enemy unit. 

Unless I put in code to explicitly target AI units, we're always going to have people assume the monsters are picking on them. 

You can unhide the map and watch it for yourself (load it with /cheat and then ctrl-U to unhide FOW).

I'm going to have to do the cheat. My anecdotal evidence though is very different. Twice in 9.8.2 I have invaded a superior AI empire. I bypassed the roaming enemy heroes. I took all the cities. By the time I was done, the mobs had destroyed all the cities I had conquered. In both cases, there were so many medium and strong mobs floating a round that I wasn't able to get my heroes back in one piece, and yet the AI had, seemingly, had no issues. The AI was on Challenging.

 

I actually don't care if the AI cheats, but if you think it isn't then something isn't copacetic.

Reply #62 Top

The theory is that it's related to simultaneous turns. That is, the monsters move at the same time the players do and monsters are only allowed to move 1 tile per turn (not sure if anyone noticed that before). So they tend to end up where the AI unit was previously. Whereas, a human, being slower, wouldn't get their unit out of the way in time.

So even if I explicitly target an AI unit, the monster might have trouble getting him.  What I'd have to do is, cheat and have the monster look at the destination of the AI unit and then intercept him.  But this is a pretty significant bit of surgery to try out.

It should be noted that AI players, unlike humans, start with a significant disadvantage -- there is no limitation to how close monsters start to AI players. We did this so that we can stuff more monsters onto a map.  But if you unhide a new map with lots of monsters, you'll note that the AI gets a lot more monsters around them.

And from the logs, I can tell you, for a fact, that the monsters kill a lot more AI units per game than humans per game.  Every saved game we get shows this. The monsters do far more harm to AI players than human players in the bigger scheme of things.  

 

 

Reply #63 Top

The part that gets me is their very selective seeming blindness to AI cities/outposts/resource nodes. I've popped that shadow rift spell down adjacent to an AI city before and every single monster it spawned ran directly away from the town.

Reply #64 Top

Quoting Frogboy, reply 63
The theory is that it's related to simultaneous turns. That is, the monsters move at the same time the players do and monsters are only allowed to move 1 tile per turn (not sure if anyone noticed that before). So they tend to end up where the AI unit was previously. Whereas, a human, being slower, wouldn't get their unit out of the way in time.

So even if I explicitly target an AI unit, the monster might have trouble getting him.  What I'd have to do is, cheat and have the monster look at the destination of the AI unit and then intercept him.  But this is a pretty significant bit of surgery to try out.

It should be noted that AI players, unlike humans, start with a significant disadvantage -- there is no limitation to how close monsters start to AI players. We did this so that we can stuff more monsters onto a map.  But if you unhide a new map with lots of monsters, you'll note that the AI gets a lot more monsters around them.

And from the logs, I can tell you, for a fact, that the monsters kill a lot more AI units per game than humans per game.  Every saved game we get shows this. The monsters do far more harm to AI players than human players in the bigger scheme of things.  

 

 

I think all 'experienced' player of this game clear the area of lairs as we go to allow for clear 'inner' city transport. Out of curiosity, does the AI? I know that the AI does a much better job of connecting the dots from an influence perspective. I wait to do that until after I have myself settled a bit.

 

Heh, I really don't want the mobs to specifically target the AI, that would suck. I will though start a new game and see what the cheat shows. Like I said, my evidence was anecdotal.

Reply #65 Top

Quoting Frogboy, reply 63
So even if I explicitly target an AI unit, the monster might have trouble getting him. What I'd have to do is, cheat and have the monster look at the destination of the AI unit and then intercept him. But this is a pretty significant bit of surgery to try out.

While the AI and monsters move on the players turn, have you tried making each AI player and the monsters have seperate turn orders, so while I am playing my turn, the game would first play say gilden's turn, then tarths' then resoln, and then when the AI is done it would move the monsters?

Sincerely
~ Kongdej

Reply #67 Top

Quoting Frogboy, reply 63
The theory is that it's related to simultaneous turns. That is, the monsters move at the same time the players do and monsters are only allowed to move 1 tile per turn (not sure if anyone noticed that before). So they tend to end up where the AI unit was previously. Whereas, a human, being slower, wouldn't get their unit out of the way in time.

So even if I explicitly target an AI unit, the monster might have trouble getting him.  What I'd have to do is, cheat and have the monster look at the destination of the AI unit and then intercept him.  But this is a pretty significant bit of surgery to try out.

It should be noted that AI players, unlike humans, start with a significant disadvantage -- there is no limitation to how close monsters start to AI players. We did this so that we can stuff more monsters onto a map.  But if you unhide a new map with lots of monsters, you'll note that the AI gets a lot more monsters around them.
 

Thanks for engaging us on this issue.  That theory is sound (I really don't think FoW is affecting anything.)  I also think the "NearestEnemyUnit" might need a little tweaking to keep monsters from reacting to local stimulus by charging wildly across the map.

Personally, I don't think AI players should have that disadvantage on the higher difficulties.  I would bet that when you fix the simultaneous move bug (or whatever it is), the logs are going to show the AI getting absolutely crushed because they can't even get their pioneers out of their first city.

I do understand the motivation for it: you don't want human players getting frustrated by mega-monsters ending their game on turn 50.  So on Easy or even Normal, maybe you can give the player a nice comfortable cushion protected from monsters.  But on Hard and above, the monsters should just be around.


And from the logs, I can tell you, for a fact, that the monsters kill a lot more AI units per game than humans per game.  Every saved game we get shows this. The monsters do far more harm to AI players than human players in the bigger scheme of things.  

 

But how much of that is due to the AI not knowing how to use spells or build sufficiently strong armies?  There's two interconnected issues.  One, the AI seems to be able to dodge monster attacks.  Two, the AI does not know how to use magic (though it's getting better at this and at building armies).

Reply #68 Top

Quoting Frogboy, reply 63
nd monsters are only allowed to move 1 tile per turn (not sure if anyone noticed that before).

I have been engaged 2 tiles away from some monsters (Mostly mites actually, and yes in 0.981), so it doesn't always follow that rule, but in general yes I see it and thats is half the reason I'm not being eaten by monsters all the time :P

Quoting Frogboy, reply 63
It should be noted that AI players, unlike humans, start with a significant disadvantage -- there is no limitation to how close monsters start to AI players. We did this so that we can stuff more monsters onto a map. But if you unhide a new map with lots of monsters, you'll note that the AI gets a lot more monsters around them.

Hmm, I don't think I would have done like this, but whatever works.

Quoting Frogboy, reply 63
And from the logs, I can tell you, for a fact, that the monsters kill a lot more AI units per game than humans per game. Every saved game we get shows this. The monsters do far more harm to AI players than human players in the bigger scheme of things.

The ai's doing battle with monsters, and being attacked by them is not the question at fault here, not at all, it is the constant finding of AI cities right next to river slags, where the river slag is within the territory of the AI's city, and then 2 turns after you see this, the river slag wakes up and instead of going for the city who annoyed the slag, it will bee-line for player territory to munch on the poor Umber.
Thats how I understand it anyways, correct me if I am wrong, And hope you don't see me as too negative, I just want monsters to FEEL like they are fair, I understand that while I am not seeing the AI the monsters are surely to eat tons of AI pioneers and units, and whatever, I am confident in it anyways since you keep stating the AI is being eaten, and there must be something to support that, besides AI heroes have wounds once in a while.

GJ working on the AI and thanks for trying to both talk to us ppl and listening :thumbsup:

Sincerely
~ Kongdej

Reply #69 Top

Quoting Frogboy, reply 63
The theory is that it's related to simultaneous turns. That is, the monsters move at the same time the players do and monsters are only allowed to move 1 tile per turn (not sure if anyone noticed that before). So they tend to end up where the AI unit was previously. Whereas, a human, being slower, wouldn't get their unit out of the way in time.

So even if I explicitly target an AI unit, the monster might have trouble getting him.  What I'd have to do is, cheat and have the monster look at the destination of the AI unit and then intercept him.  But this is a pretty significant bit of surgery to try out.

It should be noted that AI players, unlike humans, start with a significant disadvantage -- there is no limitation to how close monsters start to AI players. We did this so that we can stuff more monsters onto a map.  But if you unhide a new map with lots of monsters, you'll note that the AI gets a lot more monsters around them.

And from the logs, I can tell you, for a fact, that the monsters kill a lot more AI units per game than humans per game.  Every saved game we get shows this. The monsters do far more harm to AI players than human players in the bigger scheme of things.  

 

 

Hi Brad,

I can live with the monsters moving to a space just vacated by an AI army.  The almost-simultaneous turns stuff is pretty cool.  Kind of freaky really.  I've been sitting there watching my screen when all of the sudden a big ogre takes a step towards me.  Kind of eery.  Really cool!  Anyway, two things:

1 ) Do monsters always have to move last during the turn?  Could it be random?  Sometimes they move first (before the AI can get out the way).  Sometimes they move last and just miss the AI.

2 ) Towns don't move; therefore, the monsters should not be missing the AI towns like they do.

Reply #70 Top

Quoting sweatyboatman, reply 35
The simultaneous turns really does set up a conundrum.  The clearest benefit is that the AI can calculate its moves well in advance, which means no waiting when you end turn.  It's also pure on a theoretical level.  Everyone moves at once so there's no advantage to going first.

The game is not "real-time", obviously, and you want to give the user the impression that they are taking discrete turns. So the player gets a special benefit: nothing moves while the player takes his turn.  But for the rest of the factions (and the monsters) every unit on the map is a moving target.

Most of the time, this presents little challenge.  Most of the things on the map don't move; research, buildings and unit training are all independent decisions.  But when two players need to interact, then it gets thorny.

What I would suggest is that the attacking AI designates its target(s) as well as moving towards that unit.  If while the turn is executing, the units come close enough to fight (and the attacker has movement), the attack is initiated.  If the attacking unit is victorious, it will stop there.  If the defending unit is victorious it will continue its move. (Alternatively, you can have the victorious unit recalculate its destination.)

If two units try to occupy the same space without either designating an attack target, then you can just roll to determine who gets to move to that spot.  (Alternatively, you can take a second to determine if either party wants to initiate an attack.)

Note that the AI can (and should) designate multiple targets per turn.  Which would allow a powerful unit to attack a few smaller units (assuming it has the movement). It would also keep you from sneaking past the AI using a quick unit.

This is a single player game so there is no need for simultaneous turns.  Now if this is game ever becomes a MP game then an option should be put in for simultaneous turns  (but let it be an option.)

Reply #71 Top

Quoting Trojasmic, reply 70
1 ) Do monsters always have to move last during the turn? Could it be random? Sometimes they move first (before the AI can get out the way). Sometimes they move last and just miss the AI.

They move first in the turn, but your notion about random orders makes me think of the simultaneous turns in "Age of Wonders" where only 1 unit had a "movement queue" at a time, so they would avoid clogups like this, it was slightly messy to play with, but an almost similar system could be used for the logic engine on monsters and ai, and then let the game queue up the animations and run them after the player moves.

Sincerely
~ Kongdej

Reply #72 Top

I also appreciate Frogboy's candor in the matter and the discussion on environment vs units and same-turn mechanic disparity. I don't understand how it's relevant to "how an AI expands into hostile environment without clearing the area or suffering lost expansion".

 

Do the environment mobs switch target often? If 2 slags and a forest dragon are "aggro" and have potential to eat a city does an AI unit spawn detract said mobs' attention and path the creature away perpetually? Can we do this? Can I "train" 2 slags and a forest dragon at someone, for the monsters to "get tired" of chasing and decide to eat an opponent city?

Reply #73 Top

Quoting Sarudak, reply 36



Quoting Frogboy,
reply 19
The world difficulty determines the rand()% odds of the monsters attacking someone.

You could lower the world difficulty and that would change the rand()%.

The code is basically this:

EnemyUnit = AIGetClosestEnemy(radiustoscan);

if EnemyUnit && rand()%WorldDifficultyInverse == 0 THEN attack(EnemyUnit)

I agree with have a problem because as long as we have the *perception* that the AI is getting a pass, then it is irrelevant whether it's getting a pass or not.  

But I am not sure the best way to handle it. It needs to be random because it makes it fun not knowing when or if a monster might attack.

I can say there is a lot of work put in to try to avoid getting killed by monsters and a lot of AI cities die every game. You'll quite occasionally see an AI player who simply gets killed off entirely. 

 


 

I don't think the randomness is helping the fun. This is a strategy game remember? How am I supposed to make a meaningful decision when I have utterly no way of knowing if that super dragon is going to let me walk on by or completely obliterate my stack that I spent 80 turns building and cost each of my champions an injury? That's not a strategy question. That's a gambling question.

What if instead you just gave each monster type a personality. Say there were a few. Territorial, indifferent, chaotic, aggressive. Indifferent ones would never attack your units they would only guard. That would go good with an obsidian golem. Teritorial monsters would attack ANY players unit that came within a certain radius. This could be good for dragons, drakes, etc. This would really shut down areas of the map in early game and it would be scary but it wouldn't feel random. Chaotic might be good for some of the weaker enemies and they could just attack randomly. Aggressive monsters would beeline for your cities/units if they could see them. This would work well for the weaker spawns like mites/darklings/bandits. Keep you on your toes in the early game and make sure you don't leave your city undefended until you've cleared out the locations they spawn from.

This is fun because it forces the player to make strategic decisions. I want to get through that pass but I HAVE to fight that territorial drake. Is it worth it? Also as players notice the monsters behaving differently but in a consistent manner it will give the world more of a feel of actual life. Also the player will actually pay attention. Oh look a cave bear. I think he was acting territorial in the last game.

See randomness in this case isn't fun. And it's not believable. It doesn't feel right. We equate the monsters in the game to animals in real life so we expect some consistency. Animals aren't random. The boar is always territorial and the deer always runs away from you. The bear you just are wondering if he's hungry or not. But the bear that might attack a lone human would never attack a large group. The monsters need some simple ability to make local decisions or the game is never going to feel right. Especially in a game that has so much PvE.

 

Very AOW:SM ish   I like. But I also like a little randomness in my games as well.

Reply #74 Top

Quoting Bellack, reply 74
Very AOW:SM ish I like. But I also like a little randomness in my games as well.

I made some maps in the old Starcraft game, and in Warcraft 3, and I found one of the most interesting random mechanics was a low chance to act differently, when designing encounters and a world that wants to eat players, let it be predictable most of the time, but make 10% of the guardian statues aggressive instead of docile, give dragons a 15% chance each 25 turns to spawn dragonlings that roam aggressively in a 4 tile radious around the dragon lair, that kind of chances instead of 50% to ignore troops, and 30% chance to ignore its own lair, and beeline for the opposite side of the entire map.

Meaby thats just me though :S

Sincerely
~ Kongdej

Reply #75 Top

Quoting Frogboy, reply 63

And from the logs, I can tell you, for a fact, that the monsters kill a lot more AI units per game than humans per game.  Every saved game we get shows this. The monsters do far more harm to AI players than human players in the bigger scheme of things.  

 

 

 

we trust you

but this isnt good if you think it deeply

 

this is really bad in fact

we dont want randomness, we dont want ai to die randomly cause they spawn near 20 dragons, this is unfun and just plain bad

 

we want ai to be attacked WHEN IT DESERVES it, like when ai build a city in front of a lair, when a strong monster randomly roam near ai city, here is when we want ai to be attacked (and us players too ofc)

 

tbh i dont like so much ai spawn points to not have the same privileges as players, its much better all start the same way