mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-14 02:33:51 +02:00
Using correct priorityTier for Clusterization
Clusterizer now uses PriorityTier = 5 for evaluation, which is used to generate priority for guarded objects
This commit is contained in:
parent
64c3fbd519
commit
c667ca46d1
@ -467,7 +467,7 @@ void ObjectClusterizer::clusterizeObject(
|
||||
|
||||
heroesProcessed.insert(path.targetHero);
|
||||
|
||||
float priority = priorityEvaluator->evaluate(Goals::sptr(Goals::ExecuteHeroChain(path, obj)));
|
||||
float priority = priorityEvaluator->evaluate(Goals::sptr(Goals::ExecuteHeroChain(path, obj)), 5);
|
||||
|
||||
if(ai->settings->isUseFuzzy() && priority < MIN_PRIORITY)
|
||||
continue;
|
||||
@ -490,7 +490,7 @@ void ObjectClusterizer::clusterizeObject(
|
||||
|
||||
heroesProcessed.insert(path.targetHero);
|
||||
|
||||
float priority = priorityEvaluator->evaluate(Goals::sptr(Goals::ExecuteHeroChain(path, obj)));
|
||||
float priority = priorityEvaluator->evaluate(Goals::sptr(Goals::ExecuteHeroChain(path, obj)), 5);
|
||||
|
||||
if (ai->settings->isUseFuzzy() && priority < MIN_PRIORITY)
|
||||
continue;
|
||||
|
@ -180,7 +180,7 @@ Goals::TTaskVec Nullkiller::buildPlan(TGoalVec & tasks, int priorityTier) const
|
||||
for(size_t i = r.begin(); i != r.end(); i++)
|
||||
{
|
||||
auto task = tasks[i];
|
||||
if (task->asTask()->priority <= 0 || priorityTier != 3)
|
||||
if (task->asTask()->priority <= 0 || priorityTier != 0)
|
||||
task->asTask()->priority = evaluator->evaluate(task, priorityTier);
|
||||
}
|
||||
});
|
||||
@ -385,7 +385,7 @@ void Nullkiller::makeTurn()
|
||||
|
||||
if(bestTask->priority > 0)
|
||||
{
|
||||
logAi->info("Performing task %s with prio: %d", bestTask->toString(), bestTask->priority);
|
||||
logAi->info("Pass %d: Performing task %s with prio: %d", bestTask->toString(), bestTask->priority);
|
||||
if(!executeTask(bestTask))
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user