MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002051VCMIAI - Adventure Mappublic2015-01-20 19:312018-01-15 14:21
ReporterPovelitel 
Assigned ToWarmonger 
PriorityhighSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version0.97b 
Target VersionFixed in Version1.next 
Summary0002051: AI loop when hero try to visit same standing on
DescriptionWhat a bad luck. As soon as I start playing with the computer, make sure there are such nasty things.
TagsEndTurn
Attached Filesrar file icon freeze.rar [^] (1,150,883 bytes) 2015-01-20 19:31

- Relationships
has duplicate 0002212closedSXX Loop detected while calculating AI move (visiting same tile) 

-  Notes
(0005492)
SXX (administrator)
2015-02-14 23:32

This one still reproducible with latest git:
Player 6 starting turn
Striving to goal of type WIN
Considering goal WIN
Considering goal CONQUER
Considering goal EXPLORE
Choosing abstract goal EXPLORE (Styg)
Striving to goal of type EXPLORE (Styg)
Considering goal EXPLORE (Styg)
Considering goal VISIT TILE (59 8 1) (Styg)
Trying to realize VISIT TILE (59 8 1) (Styg) (value 3.994)
Why do I want to move hero Styg to tile 59 8 1? Already standing on that tile! 
Hero Styg visited tile (59 8 1)
Striving to goal of type EXPLORE (Styg)
Considering goal EXPLORE (Styg)
Considering goal VISIT TILE (59 8 1) (Styg)
Trying to realize VISIT TILE (59 8 1) (Styg) (value 3.998)
Why do I want to move hero Styg to tile 59 8 1? Already standing on that tile!

And this repeated till client freezes.

Styg is teal player hero that stand on nothing interesting.
If killed freeze doesn't occur to other player.
(0005493)
SXX (administrator)
2015-02-14 23:33

Can you please clarify while you played this map did you ever saved/loaded the game before this problem occur?
(0005494)
SXX (administrator)
2015-02-14 23:45

So first visible problem is: Explore::getAllPossibleSubgoals only return one possible goal for "Explore" that is visit tile under hero.
(0005495)
Povelitel (updater)
2015-02-14 23:57

I do not remember exactly. But in my opinion there were no glitches so far.
If I understand the question

Я уже точно не помню. Но по моему не было глюков до этого момента.
Если я правильно понял вопрос
(0005496)
SXX (administrator)
2015-02-15 00:32

Не, вопрос был не в этом. Мне интересно, до того как этот глюк случился ты хоть раз до этого загрузил игру или нет?

Это важно, потому, что после загрузки что-то связанное с ИИ может быть поломано.
(0005497)
SXX (administrator)
2015-02-15 01:28

Anyway for other interested developers. There is clearly problem with exploration affect this hero and this is need to be investigated, but freeze occur for different reason.

There is special check in function:
void VCAI::tryRealize(Goals::VisitTile & g)
...
    if(g.tile == g.hero->visitablePos()  &&  cb->getVisitableObjs(g.hero->visitablePos()).size() 
< 2)

Basically that check if previous functions that suggest tile for exploration ask hero to visit his own tile. As far as I get this case is threatened as unexpected behaviour so it's should never ever happen.

Though in your case Styg isn't suggested to move to his own tile, but one on the left where other hero standing. So basically there two idea what need to be fixed:
1 - Possible AI functions that choose tile explore shouldn't choose one that already have hero on it.
2 - Also possible this exception shouldn't occur if it's not really same hero stay on this tile.
(0005589)
SXX (administrator)
2015-03-01 23:21

Also just accidentally bethink about this bug while coding AI. This problem may be also related to missing CGHeroInstance::convertPosition somewhere where it's needed.
(0006170)
SXX (administrator)
2015-12-09 14:52

So I'm not remember when this happen, but both this and 0002212 fixed in current git.
(0007372)
Povelitel (updater)
2018-01-15 14:21

Very old saves, can't recheck them

- Issue History
Date Modified Username Field Change
2015-01-20 19:31 Povelitel New Issue
2015-01-20 19:31 Povelitel Status new => assigned
2015-01-20 19:31 Povelitel Assigned To => Warmonger
2015-01-20 19:31 Povelitel File Added: freeze.rar
2015-01-20 19:31 Povelitel Tag Attached: EndTurn
2015-02-14 23:32 SXX Note Added: 0005492
2015-02-14 23:33 SXX Note Added: 0005493
2015-02-14 23:45 SXX Note Added: 0005494
2015-02-14 23:57 Povelitel Note Added: 0005495
2015-02-15 00:32 SXX Note Added: 0005496
2015-02-15 01:28 SXX Note Added: 0005497
2015-03-01 23:21 SXX Note Added: 0005589
2015-12-09 14:48 SXX Relationship added has duplicate 0002212
2015-12-09 14:51 SXX Summary FREEZE AI => AI loop when hero try to visit same standing on
2015-12-09 14:52 SXX Note Added: 0006170
2017-07-16 08:44 Povelitel Status assigned => resolved
2017-07-16 08:44 Povelitel Fixed in Version => 1.next
2017-07-16 08:44 Povelitel Resolution open => fixed
2018-01-15 14:21 Povelitel Note Added: 0007372
2018-01-15 14:21 Povelitel Status resolved => closed

Site | Forums | Wiki | Slack | GitHub


Copyright © 2000 - 2024 MantisBT Team
Hosting provided by DigitalOcean