1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-16 10:19:47 +02:00
Commit Graph

27 Commits

Author SHA1 Message Date
Xilmi
4a552d411c Decisionmaking-changes
There's 3 new evaluation-contexts that are now taken into account:
Whether an action is building, whether an action involves sailing and the newly introduced threat.

The value-evaluation of creatures now also takes special resources into account.

No longer treating other AIs differently than players when it comes to how afraid we shall be of them.

The cost of buildings for decision-making now determines missing resources. Available resources are ignored when it comes to how they impact the cost. But missing-resources will heftily impact the assumed price by calculating their market-value. This shall encourage the AI to rather build what it currently can build instead of saving up for something that it lacking the special resources for.

AI is no longer willing to sacrifice more than 25% of their army for any attack except when it has no towns left.

Revamped the priority-tiers of AI decision-making.

Higest priority is conquering enemy towns and killing enemy heroes. However, the AI will no longer try to do so when the target is more than one turn away and protected by a nearby enemy-hero that could kill the one tasked with dealing with the target. Except when they have no towns left. Then they get desperate and try everything.

As a general rule of thumb one could say the AI will prioritize conquest over collecting freebies over investing army to get something that isn't a city. It's a bit more complex than that but this is roughly what can be expected. It will also highly value their own heroes safety during all this.
2024-07-15 18:12:52 +02:00
Xilmi
d878d0ce18 Avoid being killed
Heroes with conquest-tasks will only endanger themselves to be killed when they can execute a conquest in the same turn.

Heroes with other tasks will dismiss any tasks except of defending when they'd be within one turn of an enemy hero that could kill them.
2024-07-12 23:36:41 +02:00
Xilmi
92bed2305e priority-tiers
Tasks are now in different priority-tiers. For now there's 2 tiers. One for regular tasks and one for tasks of the new "conquest"-type. Regular tasks will only be considered when no possible conquest-type tasks were found.

Slightly reworked scoring heuristics.
2024-07-12 17:41:46 +02:00
Alexander Wilms
7d925b3689 Fix typo: Preasure -> Pressure 2024-04-16 21:10:15 +00:00
Ivan Savenko
fd01a25352 Implemented basic version of configurable Witch Hut 2023-10-16 00:12:38 +03:00
Andrii Danylchenko
ebe155fa95 NKAI: mana recovery 2023-09-30 10:37:36 +03:00
Alexander Wilms
6c15e5b426 Add include path of a more recent version of fuzzylite, which is required to build it with gcc 12.2.0
a651f3d13e
2023-09-16 05:13:16 +00:00
Andrii Danylchenko
6ba74f02bc NKAI: playing around with defence 2023-07-31 22:01:11 +03:00
Andrii Danylchenko
b19ac01bf9 Fuzzy rework, added more defence and gather army routines 2023-07-31 22:01:10 +03:00
Andrii Danylchenko
b1ca663eb6 Fuzzy rework 2023-07-31 22:01:10 +03:00
Andrii Danylchenko
8b0c7b6601 NKAI improve defence and some fixes 2023-03-07 20:10:58 +02:00
Andrii Danylchenko
eeea01d778 NKAI: namespace 2022-10-04 08:40:14 +03:00
Andrey Filipenkov
ff635edc0b wrap all library code into namespace if VCMI_LIB_NAMESPACE is defined
preparation for having client and server in a single process
2022-09-24 15:55:21 +03:00
Andrey Filipenkov
a1cf120ea6 add missing virtual destructors 2022-09-22 11:54:09 +03:00
Andrii Danylchenko
3480f17a68 Nullkiller: fix defence 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
3e9bf9b662 Nullkiller: try to fix build 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
32fb465823 Nullkiller: stabilization+clasterization improvements+fuzzy fear 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
1806dd8447 Nullkiller: remove AIhelper + refactoring 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
8f8c5ca255 Nullkiller: initial decomposition 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
17a960e850 Nullkiller: gold preasure and turn variables for priority evaluation. Tweaking building behavior 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
400967904b Nullkiller AI: stabilization of build and prioritization fixes 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
af9261d428 NullkillerAI: Added movement cost by hero role. New priority engine looks more or less stable. 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
66ed1a2901 Nullkiller AI: add strategical value fuzzy variable 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
ada76a5603 Nullkiller: fix file headers, move fuzzy config to ai folder 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
5fe2630c64 Nullkiller: rework prioritization, add hero roles, skills and other variables 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
3744125270 Nullkiller: armed heros prefer armed targets 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
cd0f479d7e Nullkiller: rough implementation of prioritization 2021-07-26 21:02:50 +03:00