Commit Graph
27 Commits
Author SHA1 Message Date
Ivan Savenko 4e605b84d5 Fix compilation failure
Caused by merge of 2 independent PR's - one removed macro, another added its usage
2026-06-02 18:56:50 +03:00
Ivan Savenko 5c3456f04f Merge pull request #7296 from MichalZr6/ai-nk-fixes
[AI/NK2] Fix hero-chain path reconstruction and exchange semantics
2026-06-01 21:18:59 +03:00
Ivan Savenko 80ee758753 Remove STRONG_INLINE macro 2026-05-28 22:59:31 +03:00
Ivan Savenko 861a4be471 Deterministic AI - do not rely on pointer ordering
This replaces std::maps that use hero instance pointer as key with
std::maps with custom comparator that guarantees same element order

Should prevent potential non-reproducible behavior in AI
2026-05-24 21:11:36 +03:00
Michał Zaremba 3d201caf3a Replace inline to STRONG_INLINE 2026-05-17 22:42:11 +02:00
Michał Zaremba 01cddcecca Fix branched hero chain reconstruction to preserve order and parent links
Fix reconstruction of branched hero chains so branch nodes keep their
original ordering and parentIndex links remain valid.
Previously, reconstructed paths could connect nodes in the wrong sequence,
which produced invalid handoff paths during chain execution.
2026-05-17 22:42:11 +02:00
Michał Zaremba 61e41b1243 Fix whitespaces 2026-05-17 14:56:55 +02:00
Mircea TheHonestCTO 61c71e9295 NK2: AIPath::targetNode logging and better error handling for strange paths;
- AINodeStorage::getOrCreateNode dropped buckets, all within 1 because properly load balancing multiple buckets is not worth. Backwards compatible;
- fix HeroChainCalculationTask and AINodeStorage::calculateHeroChain deadlock and livelock, no more delayed work, with deadlock and livelock prevention and thread back-off;
- fix HeroChainCalculationTask::addHeroChain danger consideration for the entire path;
2026-01-02 11:43:37 +01:00
Mircea TheHonestCTO 5c6fc06f3c NK2: AINodeStorage::getBucketIndex for better index distribution 2025-12-28 11:51:17 +01:00
Mircea TheHonestCTO 3c7abd988e nullkiller2: revert NK2AI_TRACE_LEVEL to 0 for merge in develop 2025-11-16 17:59:23 +01:00
Mircea TheHonestCTO b8eb49bc82 finished removing thread local from NK2 2025-09-12 19:25:56 +02:00
Mircea TheHonestCTO 9cdf74fb42 add pathfinderTurnStorageMisses to track how bucket size should be adjusted; modfied nk2ai-settings.json to simulate 3 clearer AI difficulty levels 2025-09-05 03:49:09 +02:00
Mircea TheHonestCTO 7a40981a95 overall refactoring, HeroPtr adjustments, AiNodeStorage remove unnecessary callback 2025-09-04 00:07:12 +02:00
Mircea TheHonestCTO 13bd7ed8f4 WIP remove thread_local CCallback in HeroPtr 2025-09-01 04:49:21 +02:00
Mircea TheHonestCTO ebdd044838 delete unused code 2025-08-30 08:51:44 +02:00
Mircea TheHonestCTO d081c6c54e nothing to trigger CI/CD again, dummy download failure in the last run 2025-08-30 08:44:54 +02:00
Mircea TheHonestCTO 12076a03fd NK2AI_TRACE_LEVEL 0 -> 2 because it should be safe now after the thread local fix 2025-08-30 06:53:26 +02:00
Mircea TheHonestCTO 7c64d2a93e move *TRACE_LEVEL to 0 2025-08-25 19:59:41 +02:00
Mircea TheHonestCTO 3905b2ec1c maximum logging for BattleAI, NK and NK2 2025-08-25 18:24:56 +02:00
Mircea TheHonestCTO 54b3d17bcf AINodeStorage.h NKAI #define to NK2AI 2025-08-24 21:15:34 +02:00
Mircea TheHonestCTO 188a0ebfd8 temporarily activate tracing logs 2025-08-19 23:08:14 +02:00
Mircea TheHonestCTO bf3d5627e0 Bring back cbc in CAdventureAI and rename the rest to cc 2025-08-16 20:17:18 +02:00
Mircea TheHonestCTO 6692df58da consistent renaming of ai into aiGw or aiNk and cbc 2025-08-15 18:53:57 +02:00
Mircea TheHonestCTO e861ac8fe7 revert to NKAI_TRACE_LEVEL 0 2025-08-15 16:26:50 +02:00
Mircea TheHonestCTO 64324f4821 change namespace 2025-08-13 17:16:27 +02:00
Mircea TheHonestCTO fec11fc9f5 revert file name without 2 to make it easier to compare new vs old 2025-08-13 17:05:30 +02:00
Mircea TheHonestCTO ffad6c6a43 cloned Nullkiller into Nullkiller2 2025-08-13 14:41:15 +02:00