fheroes2 icon indicating copy to clipboard operation
fheroes2 copied to clipboard

AI Hero with strong army ignores me

Open fheroes2bugs opened this issue 2 years ago • 10 comments

Preliminary checks

Describe the problem requiring a solution

I am sitting at my town, AI hero (purple) is ignoring me, he is scounting near me with a very strong army, he could defeat me with no problem, but seems his aim is not to defeat me. saves.zip

https://github.com/ihhub/fheroes2/assets/145407420/0497508d-44f9-46d2-acab-c25cfcba8de4

Describe the possible solution

I think AI should defeat me first, than decide defeat those golems or not and then do whatever he wants.

Additional info

No response

fheroes2bugs avatar Sep 19 '23 00:09 fheroes2bugs

Just another example, AI army is stronger than mine, there is no way I can win battle. But he just moves somewhere else. He could win the map at this turn...

https://github.com/ihhub/fheroes2/assets/145407420/b4c4ef33-fb33-4379-a7e1-095bcb6b5736

AI ignores me.zip

fheroes2bugs avatar Sep 23 '23 01:09 fheroes2bugs

Hi @fheroes2bugs , are you using the latest version of the engine?

ihhub avatar Sep 23 '23 07:09 ihhub

Hi @fheroes2bugs , are you using the latest version of the engine?

yes, 1.0.8

fheroes2bugs avatar Sep 23 '23 13:09 fheroes2bugs

Hi, @fheroes2bugs I can actually win this battle. image

Starter hero has a huge stats and I even managed to save a medium amount of army: image

I believe, that AI knows the stats of your hero (warning, cheating detected!) and he is just afraid to attack. Am I right, @ihhub ?

Branikolog avatar Sep 24 '23 14:09 Branikolog

Hi, @fheroes2bugs I can actually win this battle. image

Starter hero has a huge stats and I even managed to save a medium amount of army: image

I believe, that AI knows the stats of your hero (warning, cheating detected!) and he is just afraid to attack. Am I right, @ihhub ?

You are a human. Isn't a AI calculating risks of assumption, that he will fight AI too? If AI vs AI then my hero lose.

fheroes2bugs avatar Sep 24 '23 15:09 fheroes2bugs

The AI will attack only if its army is much stronger than the opponent. This is not the case. The AI get army strength estimation based on the troops and hero stats so yes, indirectly the AI knows about hero's stats.

ihhub avatar Sep 26 '23 03:09 ihhub

Agreed with @ihhub . After auto battle AI has just a pack of Giants left. Not really sure anyone would be satisfied with such a result...

Branikolog avatar Sep 26 '23 11:09 Branikolog

Just an another example of AI behavior similar to first post of the issue.

AI has strong army: image

In my castle I have only 5 dragons: image

So it is no problem for computer to defeat me.

He is standing near my castle: image

But (as I can see from debug info) he is going to visit Mercenary camp): image

But he did not visit it. He moved to it, but did not reach it. image

And then is going back to finally capture the town: image

image

https://github.com/ihhub/fheroes2/assets/145407420/0f4b2239-f662-4446-8d1c-71acaf441e35

Sure, AI could capture my town without useless going back.

save: could capture.zip

fheroes2bugs avatar Oct 08 '23 06:10 fheroes2bugs

Then (as I can see from debug info) is going to visit Mercenary camp):

This debug info shows objects that were already visited by this hero, and not the objects he is going to visit. AI decisions can be shown by enabling the corresponding AI logging level via the fheroes2.cfg.

oleg-derevenetz avatar Oct 09 '23 01:10 oleg-derevenetz

Hi @ihhub behavior described in this issue could be fixed by #8952.

oleg-derevenetz avatar Jul 27 '24 17:07 oleg-derevenetz

Closing this issue as this should have been fixed by #8952.

ihhub avatar Jul 04 '25 16:07 ihhub