Ivan Savenko
8eb01785cf
Move CSpell into a separate file
2026-05-26 19:21:11 +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
Andrej Dudenhefner
410d2c0623
add aviation
...
- add EPathfindingLayer `AVIATE` (different from `AIR`, can hover over free land and water)
- add transitions: `LAND` <-> `AVIATE` <-> `AIR` (cannot stop over obstacle)
- add layer specification to `MoveHero` destination handling
- add path finder `AVIATE` rules
- add node storage `AVIATE` specifications
- add adventure map aviation interactions
- add EAdventureState `DISEMBARKING`
- add disembark shortcut Shift+D for `ADVENTURE_DISEMBARK`
- add cursor icons for aviation under CC-BY-SA license
- correct move point generation / consumption
- can buy an airship from Airship Yard on land and coast at fixed cost
- add localization
2026-04-21 10:47:10 +02:00
Mircea TheHonestCTO
35747b8c88
NK2: cleanup
2026-01-06 17:55:45 +01:00
Mircea TheHonestCTO
15aceb8134
NK2: fix ExplorationBehavior: scanMap was inactive, now it's used for MAIN heroes
...
- ExplorationBehavior: double default scanRadius for, useful for SCOUT but not only
- Nullkiller: logging adjustments and print pathfinder misses per pass if applicable
- Pathfinder step ordering for "Failed to allocate node at" P:Step0... for debugging and sizing the storage node capacity
- AIGateway include performance log for makeTurn for better tuning
2026-01-02 19:28:02 +01:00
Mircea TheHonestCTO
84bf9cd677
NK2: refactoring
2026-01-02 11:44:42 +01: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
Ivan Savenko
a0b69d79f0
NKAI2 performance improvements
...
Performance improvements to functions that are called a lot by AI:
- simplify math in BuildAnalyzer
- remove complex randomization in NodeStorage
- Fix excessive copying in Creature::cost
- Generate list of all resources in ResourceTypeHandler once
2025-12-18 19:06:34 +02: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
bb7588852b
refactor AIMemory replacing getObj with getObjInstance to avoid unnecessary visibility filtering when just a simple iteration over objs is desired
2025-09-27 03:36:51 +02:00
Mircea TheHonestCTO
a836cd3aed
fix: time-of-check-to-time-of-use (TOCTOU) race condition in AIMemory::removeInvisibleObjects; a bit of refactoring in RecruitHeroBehavior and some todo comments for later on
2025-09-25 17:09:42 +02:00
Mircea TheHonestCTO
b8eb49bc82
finished removing thread local from NK2
2025-09-12 19:25:56 +02:00
Mircea TheHonestCTO
3aed53de3d
more thread_local removal work
2025-09-12 15:33:34 +02:00
Mircea TheHonestCTO
b49ba08a45
more thread_local removal in NK2, still WIP
2025-09-05 18:10:14 +02:00
Mircea TheHonestCTO
844d6c0b78
AIPathfinder remove unused init method
2025-09-05 05:08:24 +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
2e49d6aca9
fix: skip pass and priority pass if hero is not valid anymore to as extra checks for lost heroes
2025-09-04 00:56:36 +02:00
Mircea TheHonestCTO
7a40981a95
overall refactoring, HeroPtr adjustments, AiNodeStorage remove unnecessary callback
2025-09-04 00:07:12 +02:00
Mircea TheHonestCTO
19076ee29d
fix AINodeStorage::calculateChainInfo using invalid/unverified/lost heroes which lead to multiple issues down the line in makeTurn
2025-09-04 00:03:42 +02:00
Mircea TheHonestCTO
13bd7ed8f4
WIP remove thread_local CCallback in HeroPtr
2025-09-01 04:49:21 +02:00
Mircea TheHonestCTO
fa677eb243
WIP remove thread_local CCallback * ccTl
2025-08-30 20:15:03 +02:00
Mircea TheHonestCTO
3aedb44280
todo to investigate
2025-08-30 12:10:34 +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
1b0b15063f
fix nullptr thread_local gw and cc: introduce SET_GLOBAL_STATE_TBB for tbb:parallel_for
2025-08-30 06:52:48 +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
d113bc28d9
AINodeStorage.h NKAI #define to NK2AI
2025-08-24 22:35:27 +02:00
Mircea TheHonestCTO
54b3d17bcf
AINodeStorage.h NKAI #define to NK2AI
2025-08-24 21:15:34 +02:00
Mircea TheHonestCTO
58543f23cf
refactoring RecruitHeroBehavior + test sample; renamed more Nullkiller variables consistently
2025-08-24 09:12:34 +02:00
Mircea TheHonestCTO
188a0ebfd8
temporarily activate tracing logs
2025-08-19 23:08:14 +02:00
Mircea TheHonestCTO
daf24de3e9
better resources and mines gathering; include TODOs for all the things that need to be investigated
2025-08-17 16:20:25 +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
b8bf8714a1
consistent renaming of ai into aiGw or aiNk and cbc
2025-08-16 00:22:18 +02:00
Mircea TheHonestCTO
6b6298fa33
consistent renaming of ai into aiGw or aiNk and cbc
2025-08-15 18:58:14 +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
9a09654a0f
consistent renaming of ai into aiGw or aiNk and cbc
2025-08-15 18:30:28 +02:00
Mircea TheHonestCTO
306f01610d
AIGateway.cpp thread_local vars consistent renaming
2025-08-15 17:47:21 +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
7f2c3ba556
revert file name without 2 to make it easier to compare new vs old
2025-08-13 17:10:29 +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