MantisBT - VCMI
View Issue Details
0000225VCMIAI - Battlespublic2009-11-21 18:142014-05-30 17:40
Zamolxis 
Tow 
normalmajoralways
closedfixed 
0.74 
0.88 
0000225: AI does not re-assess its attack each round, staying locked on the initial target, so if we block the access AI stops advancing
ORIGINAL REPORT: Enemy stops advancing towards my troops, after I place my melee units as such that shooters & machines become "inaccessible". From that position, I can just use Defend on my melee troops and keep shooting and casting spells until the enemy is finished.

UPDATE: It seems the cause is not related to shooters or machines (as in my original report), but simply to which targets the enemy chooses. Especially if all enemy creatures choose the same target I think (and/or it may also be related to which hex the target creature is and battle obstacles, but that may also be combination with other bugs). This can always be reproduced (in 0.86, 0.84, 0.75...) if you do the following:
- Load the map from 0000707, open Neela's hero screen and split some of her stacks so that she has at least 5 in total
- Attack the blue player in front of her castle
- Use Wait in the first part of the first round; you'll notice enemies start advancing to the top-left hex where the Gremlin is (I didn't yet try with other creatures)
- Then finish first round (and continue in the second) by moving the creatures as such that they occupy all hexes around the top-left Gremlin
- Once all hexes around the "target" are occupied, the enemy will stop moving; I used defend on my creatures for 5-6 rounds in a row and the enemy did not make a move
(see the new screenshot - it's from an edited version of the 0000707 map, where blue player had lots of Hydras yet remained stuck since I blocked the Gremlin, and didn't move even if I was moving around some of the other creatures, but without creating a passage to the target - but you don't need the Hydras, it can be reproduced with any creatures in the enemy army)

I know this was marked as fixed in 0.84, because the release brought major Battle AI changes, but this flaw remains exactly the same, hence the re-opening of the ticket.
No tags attached.
related to 0000067closed Tow Strange AI battle behavior (enemy Pikeman fighting Ammo Cart, while the rest of the enemy stacks remain stuck midfield) 
related to 0000130closed Tow Sometimes in battles between player's ranged troops and enemy melee troops, the melee troops stay stuck. 
jpg 2009-11-21_EnemyConfusedIfShootersCovered.jpg (79,502) 2009-11-21 18:14
https://bugs.vcmi.eu/file_download.php?file_id=90&type=bug
jpg

jpg 2011-10-28_HydraLockedOnTarget.jpg (64,864) 2011-10-28 18:38
https://bugs.vcmi.eu/file_download.php?file_id=821&type=bug
jpg
Issue History
2009-11-21 18:14ZamolxisNew Issue
2009-11-21 18:14ZamolxisFile Added: 2009-11-21_EnemyConfusedIfShootersCovered.jpg
2009-11-21 18:16ZamolxisSummaryEnemy stops advancing towards my troops, after I place my melee troops as such to make shooters & machines inaccessible => Enemy stops advancing towards my troops, after I place my melee units as such to make shooters & machines "inaccessible"
2009-11-21 18:16ZamolxisDescription Updatedbug_revision_view_page.php?rev_id=364#r364
2009-11-21 18:19ZamolxisDescription Updatedbug_revision_view_page.php?rev_id=365#r365
2010-12-17 00:57ZamolxisRelationship addedrelated to 0000067
2010-12-17 00:58ZamolxisRelationship addedrelated to 0000130
2010-12-17 01:01ZamolxisNote Added: 0001466
2011-01-15 02:55TowNote Added: 0001479
2011-01-15 02:55TowStatusnew => resolved
2011-01-15 02:55TowFixed in Version => 0.89
2011-01-15 02:55TowResolutionopen => fixed
2011-01-15 02:55TowAssigned To => Tow
2011-03-02 23:28ZamolxisNote Added: 0001591
2011-03-02 23:28ZamolxisStatusresolved => closed
2011-10-28 18:09ZamolxisNote Added: 0002095
2011-10-28 18:09ZamolxisStatusclosed => feedback
2011-10-28 18:09ZamolxisResolutionfixed => reopened
2011-10-28 18:38ZamolxisReproducibilityhave not tried => always
2011-10-28 18:38ZamolxisSummaryEnemy stops advancing towards my troops, after I place my melee units as such to make shooters & machines "inaccessible" => AI does not re-assess its attack each round, staying locked on the initial target, so if we block the access AI stops advancing
2011-10-28 18:38ZamolxisDescription Updatedbug_revision_view_page.php?rev_id=1456#r1456
2011-10-28 18:38ZamolxisFile Added: 2011-10-28_HydraLockedOnTarget.jpg
2011-10-28 18:41ZamolxisNote Deleted: 0001591
2011-10-28 18:44ZamolxisFixed in Version0.84 =>
2011-10-31 21:09IvanNote Added: 0002112
2011-11-01 11:50ZamolxisNote Added: 0002115
2011-11-01 11:50ZamolxisStatusfeedback => assigned
2011-11-01 11:51ZamolxisNote Edited: 0002115bug_revision_view_page.php?bugnote_id=2115#r1466
2011-11-21 10:18majaczekNote Added: 0002134
2012-02-16 21:26TowNote Added: 0002175
2012-02-16 21:26TowStatusassigned => resolved
2012-02-16 21:26TowFixed in Version => 0.89
2012-02-16 21:26TowResolutionreopened => fixed
2014-05-30 17:40beegeeStatusresolved => closed

Notes
(0001466)
Zamolxis   
2010-12-17 01:01   
Probably related to 0000061, 0000130, maybe even 0000021. But I guess all these will be moved to Fixed/Resolved as soon as the new battle AI will be put in place.
(0001479)
Tow   
2011-01-15 02:55   
r1910 brought a new battle AI, still very, very basic but the issue described here should be gone.
(0002095)
Zamolxis   
2011-10-28 18:09   
I'm not sure what I tested back in 0.84, but the bug is still there. Perhaps I missed it because I didn't know what was the cause. But I believe I identified it now.

And it's not something which was fixed and came back. Now that I identified the pattern (while testing something else in 0.86), I went back with it in 0.84 and even 0.75, and the behavior was identical. The AI simply locks their target on a certain creature and gets stuck if we block the path to that creature. I'll update the summary and description with the necessary details.
(0002112)
Ivan   
2011-10-31 21:09   
That "new battle AI" mentioned by Tow currently used only for neutral player. If you'll place this Hydra in town without fort or in garrison, battle will be controlled by new AI and this bug should no longer be present.
(0002115)
Zamolxis   
2011-11-01 11:50   
(edited on: 2011-11-01 11:51)
N00b question maybe, but would it be difficult (or creating bug risks) to expand the new battle AI to all computer players? The way I see it, as long as I can still reproduce the problem, we cannot mark this as Resolved yet.

Anyway, I guess that explains why I couldn't reproduce it in 0.84. Probably I was just fighting a monster on the map.

(0002134)
majaczek   
2011-11-21 10:18   
well it's not catastrophic that VCMI team has this type of bug.
Very similair bug once existed in oryginal HoMM 2.
but well it certainly need be fixed.

greetings to all devs and testers for their great and valuable work
(0002175)
Tow   
2012-02-16 21:26   
VCAI is adventure-only AI able to cede battle tasks onto another AI. At the moment StupidAI is used.
With an introduction of VCAI the GeniusAI (that caused the problem) is not used anymore at all and the issue is totally gone.