1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Nullkiller: small optimization of AIPathfinder for big maps

This commit is contained in:
Andrii Danylchenko
2021-05-16 14:56:13 +03:00
committed by Andrii Danylchenko
parent 07b6b0605c
commit 5bfe71c8f3
13 changed files with 115 additions and 58 deletions

View File

@@ -640,13 +640,6 @@ EvaluationContext PriorityEvaluator::buildEvaluationContext(Goals::TSubgoal goal
return context;
}
/// distance
/// nearest hero?
/// gold income
/// army income
/// hero strength - hero skills
/// danger
/// importance
float PriorityEvaluator::evaluate(Goals::TSubgoal task)
{
auto evaluationContext = buildEvaluationContext(task);
@@ -677,7 +670,7 @@ float PriorityEvaluator::evaluate(Goals::TSubgoal task)
fearVariable->setValue(evaluationContext.enemyHeroDangerRatio);
engine->process();
//engine.process(VISIT_TILE); //TODO: Process only Visit_Tile
result = value->getValue();
}
catch(fl::Exception & fe)