fheroes2 icon indicating copy to clipboard operation
fheroes2 copied to clipboard

Optimize troop positioning before battle for AI

Open ihhub opened this issue 3 years ago • 0 comments

Preliminary checks

Describe the problem requiring a solution

AI heroes does not always have most optimal positioning of their troops prior battles against neutral monsters. This is a video when a hero should have put Genies before Boars to have less losses against Grand Elves:

https://user-images.githubusercontent.com/19829520/193308353-56aebe88-6789-4bec-93d5-e6821382550a.mp4

Describe the possible solution

It could be that OptimizeTroopsOrder() method has errors in its logic as we suppose to have Genies going first. Also this method should have an overloaded variant when the type of opposing army is known like in case of neutrals.

Additional info

No response

ihhub avatar Sep 30 '22 15:09 ihhub