1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-03 00:46:55 +02:00
Commit Graph

42 Commits

Author SHA1 Message Date
f238d89601 NKAI - Prefer giving fast units to scouts
Nullkiller AI will now prefer giving its scout heroes faster units to
optimize their movement points on next turns.

Unit selection logic:
- AI prefers to give 'weak' units that won't affect army strength of main
hero. Unit is considered 'weak' if its level below 4 or if its AI value
is below 1% of total army strength. So AI can give high-tier unit to
scout, but only if main hero already has massive army.

- Within weak units, if hero is moving on terrain with penalty, AI will
always prefer units that are native to this terrain. So on snow AI will
always prefer unit from Tower even if its speed is lower than unit from
another faction.

- Within remaining candidates, AI will prefer unit that will give higher
movement points limit. This also means that in case of H3 rules, all
units with 11+ speed will be viewed as equally good

- If there are multiple units with same speed, AI will prefer unit with
lowest AI value
2025-02-11 16:37:54 +00:00
b25702f15e expose safeAttackRatio to AI config 2024-11-28 11:53:51 +00:00
cd65e69c91 Update GatherArmyBehavior.cpp
Fixed an issue that made AI consider unpurchased troops as reinforcements for their armies which caused AI to visit cities over and over without actually doing anything there.
Buying units is handled by BuyArmyBehavior.
2024-11-26 15:15:08 +01:00
68e264d990 Prune paths involving enemy heroes
Capture objects and gather army will now skip paths that involve foreign heroes.
2024-10-03 15:06:34 +02:00
455ad648ae More warning fixes
heroRole is no longer needed here.
2024-07-15 20:09:11 +02:00
638c1350b8 Path-safety
No longer excluding paths for exposing a hero to an enemy in the behaviors. There definitely are reasons for doing something anyways, even if threatened. The logic for that should be done in the PriorityEvaluator.
2024-07-12 15:43:40 +02:00
1388fb1493 NKAI: port exploration from VCAI 2024-05-20 22:43:23 +03:00
98a78b3386 #3930 - fix usage of wrong variable 2024-05-12 18:04:23 +03:00
7d925b3689 Fix typo: Preasure -> Pressure 2024-04-16 21:10:15 +00:00
728f673763 NKAI: remove static ai field 2024-03-31 21:11:25 +03:00
d6f1a5c2b3 NKAI: parallel capture objects 2024-03-29 20:39:03 +02:00
adfcb650e2 NKAI: object graph fixes 2024-03-25 21:04:08 +02:00
35429eab52 NKAI: moddable configuration 2024-03-01 22:03:07 +02:00
87957e74c1 Replaced boost::thread_specific_ptr with thread_local 2023-08-23 16:32:29 +03:00
60f0a4553a NKAI: fix freeze on army gathering 2023-08-06 09:03:29 +03:00
ec0596f3dd NKAI: fix error message can not take away last stack 2023-07-31 22:01:12 +03:00
fb7477047a NKAI: loosen gold presure on build system. 2023-07-31 22:01:12 +03:00
c93bb0a502 nkai: fixes and skill rewards 2023-07-31 22:01:11 +03:00
db2be3ee05 Anoother unused variable 2023-07-31 22:01:11 +03:00
0fd118d3ce NKAI: gold reward 2023-07-31 22:01:11 +03:00
6ba74f02bc NKAI: playing around with defence 2023-07-31 22:01:11 +03:00
b19ac01bf9 Fuzzy rework, added more defence and gather army routines 2023-07-31 22:01:10 +03:00
87fcfa4add Removed excessive pathfinder includes 2023-06-21 12:00:44 +03:00
acac42291e Remove excessive CMap.h includes 2023-05-31 23:18:38 +03:00
ab84cb9931 NKAI: fix defense tasks priority evaluation 2023-04-02 10:10:17 +03:00
fa9e1d2d83 NKAI: fix crash 2023-03-12 16:31:15 +02:00
148c3436df NKAI: improve army gathering 2023-03-08 11:53:26 +02:00
8b0c7b6601 NKAI improve defence and some fixes 2023-03-07 20:10:58 +02:00
eeea01d778 NKAI: namespace 2022-10-04 08:40:14 +03:00
3fa7e0976f Nullkiller: update / fix build, core changes required for Nullkiller AI 2021-07-26 21:02:50 +03:00
b4241670ba Nullkiller: rename VCAI to AIGateway 2021-07-26 21:02:50 +03:00
cf4484e071 Nullkiller: stabilization 2021-07-26 21:02:50 +03:00
35a1167f3d Nullkiller: refactoring and stabilization of gather army & clusterization 2021-07-26 21:02:50 +03:00
32fb465823 Nullkiller: stabilization+clasterization improvements+fuzzy fear 2021-07-26 21:02:50 +03:00
1806dd8447 Nullkiller: remove AIhelper + refactoring 2021-07-26 21:02:50 +03:00
8f8c5ca255 Nullkiller: initial decomposition 2021-07-26 21:02:50 +03:00
223a52b3d1 Nullkiller: Try to join behavior and goal and see what come out of it. 2021-07-26 21:02:50 +03:00
af0dcf97c4 Nullkiller: initial cleanup of unused code 2021-07-26 21:02:50 +03:00
5344df51c6 Nullkiller: capture guarded artifacts and other fixes 2021-07-26 21:02:50 +03:00
1fd838a5b9 Nullkiller: stabilisation 2021-07-26 21:02:50 +03:00
df78e3243b Nullkiller: stabilisation, improve gather army 2021-07-26 21:02:50 +03:00
b7b615ec70 Nullkiller: stabilisation fixes 2021-07-26 21:02:50 +03:00