MantisBT - VCMI
View Issue Details
0003035VCMIAI - Adventure Mappublic2019-02-12 13:242019-02-16 07:51
Dydzio 
Nullkiller 
normalminoralways
resolvedfixed 
Microsoft WindowsWindows 7Home Premium x64
1.next 
1.next 
0003035: AI pathfinder generating goal that cannot be realized
This happens with newest VCMI code (after https://github.com/vcmi/vcmi/pull/548 [^] merge):

In attached map AI will not capture town and heroes will stand in one place infinitely, because ai-ah->HowToVisitObj inside GatherArmy::getAllPossibleSubgoals() will generate VisitTile goal that requires beating the army that is supposed to be reason why we gather army in first place. That goal gets picked as best goal while it should not appear at all considering it's impossible to realize.
1.Run attached map
2.Enable vcmieagles cheat for player only
3.See how AI gets stuck after GatherArmy decomposition
I guess this could be fixed by filtering generated goals inside GatherArmy but proper solution would be fixing pathfinder logic.
No tags attached.
? vcmiaistacksplit_v1.h3m (8,615) 2019-02-12 13:24
https://bugs.vcmi.eu/file_download.php?file_id=2983&type=bug
Issue History
2019-02-12 13:24DydzioNew Issue
2019-02-12 13:24DydzioStatusnew => assigned
2019-02-12 13:24DydzioAssigned To => Nullkiller
2019-02-12 13:24DydzioFile Added: vcmiaistacksplit_v1.h3m
2019-02-14 13:48DydzioNote Added: 0007749
2019-02-16 07:51NullkillerStatusassigned => resolved
2019-02-16 07:51NullkillerResolutionopen => fixed

Notes
(0007749)
Dydzio   
2019-02-14 13:48   
For now bug won't appear with https://github.com/vcmi/vcmi/pull/551 [^] merged. Proper fix is inside https://github.com/vcmi/vcmi/pull/546 [^] (unified danger evaluation logic so there won't be deviation in danger determined by pathfinder and VisitTile internals).