This is part of removing Formula AI uses from mainline. These are just small experimental additions to the default AI that have been superseded by more recent additions to the AI.
This whole textdomain is dedicated to localized strings revolving around the
game's AI engine and the AI demos/test scenarios, with around 370 strings in
it.
Other than a few strings near the start of the catalogue template, none of these
have any value for regular players since they are sourced from AI demos and
test scenarios in data/ai/micro_ais/ and data/ai/scenarios/. None of them will
be displayed to people who aren't tinkering with WML or contributing to AI
development as part of the Wesnoth dev team, and some of the language used in
them is very technical in nature.
This commit leaves the "#textdomain wesnoth-ai" lines in the AI demos, but
drops the .po and .pot catalogues for wesnoth-ai. The few strings that are
seen by regular players move to the wesnoth-lib textdomain.
This reverts 24af20cf83, which made it available in debug mode only, as there remain more differences to the new default AI than initially envisioned. This takes care of Issue #4997.
The algorithm used in this CA is too simple to work reliably in a general setting, it tends to send whole groups of units toward small numbers of villages, or even individual ones. In its current version, it should not be used at all, not even in the Experimental AI. The recommended way to emphasize village hunting is to set the village_value aspect to a larger-than-default value and let the move-to-targets CA take care of it.
We are, however, leaving the CA code and the macros in place for potential future work.
The old villages CA is quite a bit better at distributing multiple units across multiple villages. The advantage of the new grab_villages CA is that it has a variable score, sometimes grabbing villages before, and sometimes after attacks. This does not outweigh its shortcomings though.
So for now, the default AI will continue to use the previous CA, and the Experimental AI will use the new one. Thus, the two AIs are not quite identical any more (but still very similar).
I also added a todo comment that the grab_villages CA might be reinstated if it is improved.
It is now identical to the default AI, so we only show it in debug mode in the MP computer player selection menu. It will be moved back to be always available when there is new development happening.
This parameter determines in which order the available AIs are shown in the MP computer player selection menu. This can be used for eras, modifications or cores to change which AI is first in the list.
It was left there in cfb2aa8050 for backward compatibility. However,
this causes a “duplicate AI” error at start-up in debug mode.
Furthermore, the file is not included in any current 1.12 or 1.13
add-on, so it should be safe to remove it. Using
[ai]ai_algorithm=idle_ai is the preferred option to include the Idle AI.
As indicated in the comment of the idle_ai config file, an AI needs to
contain at least one stage, otherwise the default AI will be injected
under certain circumstances. Unlike indicated in the comment, this now
also applies to loading a mid-scenario save. (I will add that to the
comment in the next commit.)
As this AI was in data/ai/dev/, it was previously only loaded when
Wesnoth was started in debug mode. The config was thus not available
when playing in no-debug mode, causing the default AI to be injected on
reload. This caused issue #1955.
While not strictly necessary, we keep a redirect in data/ai/dev for
backward compatibility, in case the file is included in add-ons.
This means:
1. Adding the new CA to AI configs
2. Removing it whenever the combat CA is removed
3. Preventing conflicts for AIs that previously used overlapping scores
In normal MP and SP games, these macros are defined previously and
including them here produces unnecessary overhead. However, they are
not defined when an AI MP game is started from the commandline with the
-m and --ai-config options.
- Alter macro {AI_CA_RECRUITMENT} to point to the new CA
- Create a new AI cfg file for a stronger AI
- Create a new AI cfg (dev) file for choosing the old recruitment CA in debug mode.
- Alter macro {AI_NO_RECRUITMENT}
...testing_ai_default::default_move_to_targets_phase into
testing_ai_default::testing_move_to_targets_phase - set up everything
for experiments on ai movement and targeting phase