2
0
Эх сурвалжийг харах

NKAI: penalty for extra chains

Andrii Danylchenko 2 жил өмнө
parent
commit
69ceee5dd6

+ 2 - 1
AI/Nullkiller/Analyzers/ArmyManager.cpp

@@ -13,6 +13,7 @@
 #include "../Engine/Nullkiller.h"
 #include "../../../CCallback.h"
 #include "../../../lib/mapObjects/MapObjects.h"
+#include "../../../lib/GameConstants.h"
 
 namespace NKAI
 {
@@ -306,7 +307,7 @@ std::vector<creInfo> ArmyManager::getArmyAvailableToBuy(
 	int freeHeroSlots = GameConstants::ARMY_SIZE - hero->stacksCount();
 	bool countGrowth = (cb->getDate(Date::DAY_OF_WEEK) + turn) > 7;
 
-	const CGTownInstance * town = dwelling->ID == CGTownInstance::TOWN
+	const CGTownInstance * town = dwelling->ID == Obj::TOWN
 		? dynamic_cast<const CGTownInstance *>(dwelling)
 		: nullptr;
 

+ 5 - 0
config/ai/object-priorities.txt

@@ -166,6 +166,11 @@ RuleBlock: basic
   rule: if closestHeroRatio is LOWEST and heroRole is SCOUT then Value is WORST
   rule: if closestHeroRatio is LOW and heroRole is SCOUT then Value is BAD
   rule: if closestHeroRatio is LOWEST and heroRole is MAIN then Value is BAD
+  rule: if heroRole is SCOUT and turn is NOW and mainTurnDistance is LONG then Value is WORST
+  rule: if heroRole is SCOUT and turn is NOW and mainTurnDistance is MEDIUM then Value is BAD
+  rule: if heroRole is SCOUT and turn is NEXT and mainTurnDistance is LONG then Value is BAD
+  rule: if heroRole is SCOUT and turn is NOW and scoutTurnDistance is LONG then Value is BAD
+  rule: if heroRole is SCOUT and turn is NOW and scoutTurnDistance is MEDIUM then Value is BAD with 0.3
 RuleBlock: strategicalValue
   enabled: true
   conjunction: AlgebraicProduct