fheroes2
fheroes2 copied to clipboard
Optimize troop positioning before battle for AI
Preliminary checks
- [X] I've checked that there aren't other open issues on the same topic.
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