1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-14 02:33:51 +02:00

Exploration

Slightly adjust the value of exploring within the hunter-gather-prirority.
This commit is contained in:
Xilmi 2024-09-10 00:23:17 +02:00
parent 37f9f93948
commit df119370c7
2 changed files with 6 additions and 2 deletions

View File

@ -62,7 +62,8 @@ EvaluationContext::EvaluationContext(const Nullkiller* ai)
threatTurns(INT_MAX), threatTurns(INT_MAX),
involvesSailing(false), involvesSailing(false),
isTradeBuilding(false), isTradeBuilding(false),
isExchange(false) isExchange(false),
isExplore(false)
{ {
} }
@ -930,6 +931,7 @@ public:
int tilesDiscovered = task->value; int tilesDiscovered = task->value;
evaluationContext.addNonCriticalStrategicalValue(0.03f * tilesDiscovered); evaluationContext.addNonCriticalStrategicalValue(0.03f * tilesDiscovered);
evaluationContext.isExplore = true;
} }
}; };
@ -1444,7 +1446,8 @@ float PriorityEvaluator::evaluate(Goals::TSubgoal task, int priorityTier)
score -= evaluationContext.armyInvolvement * evaluationContext.armyLossPersentage; score -= evaluationContext.armyInvolvement * evaluationContext.armyLossPersentage;
if (score > 0) if (score > 0)
{ {
score = 1000; if(!evaluationContext.isExplore)
score = 1000;
score *= evaluationContext.closestWayRatio; score *= evaluationContext.closestWayRatio;
if (evaluationContext.enemyHeroDangerRatio > 1) if (evaluationContext.enemyHeroDangerRatio > 1)
score /= evaluationContext.enemyHeroDangerRatio; score /= evaluationContext.enemyHeroDangerRatio;

View File

@ -80,6 +80,7 @@ struct DLL_EXPORT EvaluationContext
bool involvesSailing; bool involvesSailing;
bool isTradeBuilding; bool isTradeBuilding;
bool isExchange; bool isExchange;
bool isExplore;
EvaluationContext(const Nullkiller * ai); EvaluationContext(const Nullkiller * ai);