fheroes2 icon indicating copy to clipboard operation
fheroes2 copied to clipboard

Teach AI to hire heroes for army

Open fheroes2bugs opened this issue 1 year ago • 4 comments

Preliminary checks

Describe the problem requiring a solution

At map marooned AI has a lot of strong neutral monsters surrounding him, and have town+marketplace. When I found him at 6 month, he had starting army and only 2 heroes. AI had enough gold to buy a lot of heroes, but he got only 2. He could buy and use starting army.

Describe the possible solution

Teach AI to hire heroes just for stronger army.

Additional info

No save/video at this time.

fheroes2bugs avatar Sep 23 '23 01:09 fheroes2bugs

Hi, @fheroes2bugs ! It would be nice to have a save file for that issue. At least for the first day. Maybe the design of this map is so poor, that neither fheroes2 nor original AI could beat those creatures? Are you sure, that hiring 40 peasants could help AI to beat those guardians?

Branikolog avatar Sep 24 '23 14:09 Branikolog

Hi, @fheroes2bugs ! It would be nice to have a save file for that issue. At least for the first day. Maybe the design of this map is so poor, that neither fheroes2 nor original AI could beat those creatures? Are you sure, that hiring 40 peasants could help AI to beat those guardians?

Here is the save in 0 day. but this is the another game, I haven't try it. In my sitiuation, green player had near him sorceress town, he had enough wood, ore and gold for upgrading to castle, but that is all, he could not build any creature-providing buildings. He could not use marketplace (it is already build in this map). He bought a second hero, but his army was with him, so AI don't even have idea to place all army in 1 hero to attack monsters. So that is how I found him in the 6 months of the game, 2 heroes with starting army and no building in the castle and no will to win.

marooned day1.zip

fheroes2bugs avatar Sep 24 '23 15:09 fheroes2bugs

Here is the save of marooned the month is 12, but none of computer players really want to win. They don't hire heroes for army.

marooned 12 month.zip

Green: image

Blue: image

Orange: image

Purple: image

fheroes2bugs avatar Oct 17 '23 12:10 fheroes2bugs

In this situation, after I lose the battle, computer decides to hire 3 (3!) new heroes. But as we know from auto-battle (I win the autobattle) chances are nearly equal... To improve his chances computer could first - hire those heroes, give army to main hero (that is going to attack me) and then attack me with a stronger army.

https://github.com/ihhub/fheroes2/assets/145407420/248a8e2c-ad55-436c-bade-4a5229f8f174

version: 1.0.11 save: suicide.zip

fheroes2bugs avatar Dec 30 '23 01:12 fheroes2bugs