fheroes2 icon indicating copy to clipboard operation
fheroes2 copied to clipboard

Adventure map, AI behavior, AI castle defenseless despite a threat (0.9.20 5949)

Open LeHerosInconnu opened this issue 2 years ago • 1 comments

Preliminary checks

Describe the problem requiring a solution

In fheroes2, there is AI castle defenseless despite a threat.

In fheroes2:

https://user-images.githubusercontent.com/43583994/200174726-3bbc1905-39f6-4ebe-a90b-bf15dc263826.mp4

Here is the save file: No troop defense 01.zip

Describe the possible solution

Make the AI defend its castles if it is possible and worthwhile. In the example, the available creatures could have caused the castle to be preserved or at least inflicted significant losses on the attacker.

Additional info

No response

LeHerosInconnu avatar Nov 06 '22 14:11 LeHerosInconnu

The behavior I've currently observed is that the AI will defend it's castle for one day exactly and then the next day it will move out. It seems we need to have it defend for as long as the threat is in the nearby area.

zenseii avatar Nov 06 '22 15:11 zenseii

Other saves for this (1.0.2 6820): Castle no defense 0100.zip

In fheroes2:

Castle no defense 001

Castle no defense 002

LeHerosInconnu avatar Mar 14 '23 15:03 LeHerosInconnu

Hi @LeHerosInconnu , is it still valid for the current build?

ihhub avatar Jun 20 '23 10:06 ihhub

Hello @ihhub,

Hi @LeHerosInconnu , is it still valid for the current build?

I'm going to take a look at it in my current game (started with version 1.0.5 7308).

LeHerosInconnu avatar Jun 20 '23 11:06 LeHerosInconnu

Hello @ihhub,

Hello @ihhub,

Hi @LeHerosInconnu , is it still valid for the current build?

I'm going to take a look at it in my current game (started with version 1.0.5 7308).

So, I tested this in my latest game (started with version 1.0.5 7308 and continued with version 1.0.5 7339) and AI is better at protecting its threatened castles.

LeHerosInconnu avatar Jul 03 '23 19:07 LeHerosInconnu

Closing this issue as we improved castle defense logic since 1.0.5 release which was good enough for the topic creator.

ihhub avatar Aug 21 '23 11:08 ihhub