[wesnoth-commits] [wesnoth/wesnoth] 3bd661: AI: Set up macros for Experimental AI candidate ac...
mattsc
noreply at github.com
Sun Dec 15 22:15:58 UTC 2019
Branch: refs/heads/master
Home: https://github.com/wesnoth/wesnoth
Commit: 3bd6613dda5f3890d70849e1b0ca6b5957e63e71
https://github.com/wesnoth/wesnoth/commit/3bd6613dda5f3890d70849e1b0ca6b5957e63e71
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-11-29 (Fri, 29 Nov 2019)
Changed paths:
M data/ai/ais/ai_experimental.cfg
M data/core/macros/ai.cfg
M data/core/macros/ai_candidate_actions.cfg
Log Message:
-----------
AI: Set up macros for Experimental AI candidate actions
In the same way as they are set up for the default AI
Commit: 7bbe5329c1ade7952f2a8513bb76e73383f07a07
https://github.com/wesnoth/wesnoth/commit/7bbe5329c1ade7952f2a8513bb76e73383f07a07
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-11-29 (Fri, 29 Nov 2019)
Changed paths:
A data/ai/ais/ai_default_rca_1_14.cfg
Log Message:
-----------
AI: create copy of the current default AI
... and call it the "1.14 default AI".
Commit: 5c285cfde0c369c78e32381383bb32eb2e90c37d
https://github.com/wesnoth/wesnoth/commit/5c285cfde0c369c78e32381383bb32eb2e90c37d
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-11-29 (Fri, 29 Nov 2019)
Changed paths:
M data/ai/ais/ai_default_rca.cfg
Log Message:
-----------
AI: copy Experimental AI candidate actions into default AI
Commit: a38356e61c11cbc51576d5044b7226e91e9d47f6
https://github.com/wesnoth/wesnoth/commit/a38356e61c11cbc51576d5044b7226e91e9d47f6
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-11-29 (Fri, 29 Nov 2019)
Changed paths:
M data/ai/ais/ai_experimental.cfg
M data/core/macros/ai.cfg
Log Message:
-----------
Experimental AI: add comments that it is now same as default
Commit: 24af20cf839d6115c3f57491d937d09d0ae57f7a
https://github.com/wesnoth/wesnoth/commit/24af20cf839d6115c3f57491d937d09d0ae57f7a
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-11-29 (Fri, 29 Nov 2019)
Changed paths:
R data/ai/ais/ai_experimental.cfg
A data/ai/dev/ai_experimental.cfg
Log Message:
-----------
Experimental AI: show in MP menu in debug mode only
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.
Commit: 3e70358d8d4fbd20f59b1c6431cf60358c52ab55
https://github.com/wesnoth/wesnoth/commit/3e70358d8d4fbd20f59b1c6431cf60358c52ab55
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-11-29 (Fri, 29 Nov 2019)
Changed paths:
M data/ai/lua/ca_castle_switch.lua
M data/ai/lua/ca_move_to_any_enemy.lua
M data/ai/micro_ais/cas/ca_healer_move.lua
Log Message:
-----------
AI: ensure all CAs respect unit guardian status
This adds the correct behavior for the castle_switch, move_to_any_enemy and place_healers CAs. It was already in place for the other former ExpAI CAs (except for recruiting and spread_poison, for which it does not apply).
This automatically also adds this behavior to the Healer Support Micro AI.
Commit: bb23781b17e6a381f39e45931de95c02f8720b57
https://github.com/wesnoth/wesnoth/commit/bb23781b17e6a381f39e45931de95c02f8720b57
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-11-29 (Fri, 29 Nov 2019)
Changed paths:
M data/ai/lua/ai_helper.lua
Log Message:
-----------
ai_helper: new function find_path_with_avoid()
This lets the AI find paths around areas defined by [avoid] tags, rather than being stopped dead by them. See comments in the code for details.
The relevant custom cost function, custom_cost_with_avoid(), can be accessed directly as well.
Commit: 4e80a8f028f7fd7a25f05b3472555b0874a88c9e
https://github.com/wesnoth/wesnoth/commit/4e80a8f028f7fd7a25f05b3472555b0874a88c9e
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-11-29 (Fri, 29 Nov 2019)
Changed paths:
M data/ai/lua/ai_helper.lua
Log Message:
-----------
ai_helper.next_hop: add option to use pre-evaluated path
Commit: fdb3f2e71a927c762865a57ce72375bc550806f1
https://github.com/wesnoth/wesnoth/commit/fdb3f2e71a927c762865a57ce72375bc550806f1
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-11-29 (Fri, 29 Nov 2019)
Changed paths:
M data/ai/lua/ai_helper.lua
Log Message:
-----------
ai_helper.next_hop: add optional parameter 'avoid_map'
Commit: 891ca93710cdb62b5e5f9f1c41395c5567026fc0
https://github.com/wesnoth/wesnoth/commit/891ca93710cdb62b5e5f9f1c41395c5567026fc0
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-12-06 (Fri, 06 Dec 2019)
Changed paths:
M data/ai/lua/ai_helper.lua
Log Message:
-----------
ai_helper.put_labels: add two optional parameters
Commit: f5990b7e9530edbb52d71c5cefc605cd2efd02ba
https://github.com/wesnoth/wesnoth/commit/f5990b7e9530edbb52d71c5cefc605cd2efd02ba
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-12-06 (Fri, 06 Dec 2019)
Changed paths:
M data/ai/lua/ai_helper.lua
Log Message:
-----------
ai_helper.get_attackable_enemies: add optional parameter 'avoid_map'
Commit: 620da22082f1ad57d08ef316b3060c9cd020a0bd
https://github.com/wesnoth/wesnoth/commit/620da22082f1ad57d08ef316b3060c9cd020a0bd
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-12-06 (Fri, 06 Dec 2019)
Changed paths:
M data/ai/lua/ca_castle_switch.lua
Log Message:
-----------
AI: fix score assignment in castle switch candidate action
Commit: 34956ac15dd398bae83177498706239371743f3b
https://github.com/wesnoth/wesnoth/commit/34956ac15dd398bae83177498706239371743f3b
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-12-06 (Fri, 06 Dec 2019)
Changed paths:
M data/ai/lua/ca_castle_switch.lua
M data/ai/lua/ca_grab_villages.lua
M data/ai/lua/ca_move_to_any_enemy.lua
M data/ai/lua/ca_retreat_injured.lua
M data/ai/lua/ca_village_hunt.lua
M data/ai/lua/retreat.lua
Log Message:
-----------
AI: ensure all CAs respect [avoid] tags
This is for the candidate actions that were merged into the default AI from the former Experimental AI.
Commit: 07d149cbfb779a7949a3a569efa5c0c5b3ffbea1
https://github.com/wesnoth/wesnoth/commit/07d149cbfb779a7949a3a569efa5c0c5b3ffbea1
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-12-06 (Fri, 06 Dec 2019)
Changed paths:
M data/ai/lua/ai_helper.lua
Log Message:
-----------
ai_helper.next_hop: let units fan out
... as opposed to lining up if there are allied units in the way.
This changes (fixes) the default behavior. An optional 'no_fan_out' parameter is provided in order to restore the old behavior.
Commit: 2d86cb20cef94110295c7bedfc2384129ddee5e8
https://github.com/wesnoth/wesnoth/commit/2d86cb20cef94110295c7bedfc2384129ddee5e8
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-12-06 (Fri, 06 Dec 2019)
Changed paths:
M data/ai/lua/ai_helper.lua
Log Message:
-----------
ai_helper.find_path_with_avoid: add 'ignore_enemies' option
Note that we do not add an 'ignore_units' option, as allies and enemies are taken into account in different ways and we want to have a way of ignoring each type individually.
Commit: 1391745c9f71eee516c0edc209c282fb53e7eec8
https://github.com/wesnoth/wesnoth/commit/1391745c9f71eee516c0edc209c282fb53e7eec8
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-12-06 (Fri, 06 Dec 2019)
Changed paths:
M data/ai/lua/ca_retreat_injured.lua
M data/ai/lua/retreat.lua
Log Message:
-----------
AI: consider caution in retreat_injured CA
Not retreating at all for caution <= 0 is the same as for the old retreating CA. The rest is specific to this CA.
Commit: 038dc2d7fe822562d97dbc667b694d5b985acd91
https://github.com/wesnoth/wesnoth/commit/038dc2d7fe822562d97dbc667b694d5b985acd91
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-12-06 (Fri, 06 Dec 2019)
Changed paths:
M data/ai/ais/ai_default_rca.cfg
M data/ai/dev/ai_experimental.cfg
M data/core/macros/ai.cfg
Log Message:
-----------
AI: remove old retreat_phase CA from AI configs
It is now superseded by the retreat_injured CA (of the former Experimental AI).
Commit: 1e01df84ffd90aabfb131b383facb772d26257f9
https://github.com/wesnoth/wesnoth/commit/1e01df84ffd90aabfb131b383facb772d26257f9
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-12-06 (Fri, 06 Dec 2019)
Changed paths:
M data/ai/ais/ai_default_rca.cfg
M data/ai/dev/ai_experimental.cfg
M data/core/macros/ai.cfg
Log Message:
-----------
AI: do not use new grab_villages CA for default AI
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.
Commit: 64e969af11fc21104752d27f2ad24b6c476d4ae3
https://github.com/wesnoth/wesnoth/commit/64e969af11fc21104752d27f2ad24b6c476d4ae3
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-12-06 (Fri, 06 Dec 2019)
Changed paths:
M data/ai/lua/retreat.lua
M data/ai/micro_ais/cas/ca_healer_move.lua
Log Message:
-----------
AI: ensure all CAs respect passive_leader aspect
Most of the former Experimental AI CAs did already (or don't use the leader in the first place), but not quite all of them.
Commit: ab2c3bfcc22f50b65d1ba3059569c80c4e50159e
https://github.com/wesnoth/wesnoth/commit/ab2c3bfcc22f50b65d1ba3059569c80c4e50159e
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-12-06 (Fri, 06 Dec 2019)
Changed paths:
M data/ai/lua/ca_castle_switch.lua
M data/ai/lua/ca_recruit_rushers.lua
Log Message:
-----------
AI: enable multiple leaders in castle_switch CA
Previously the CA would already move multiple leaders if all leaders were to be moved, but it would abandon moving any leader after finding one that should not move.
Commit: 18b5d5159e0b3ec8a79a48e2f6d74f54880c3939
https://github.com/wesnoth/wesnoth/commit/18b5d5159e0b3ec8a79a48e2f6d74f54880c3939
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-12-06 (Fri, 06 Dec 2019)
Changed paths:
M data/ai/lua/ca_castle_switch.lua
Log Message:
-----------
AI castle switch: bug fix for units on keep check
Commit: 917f7ef9a590e54ad2890a411d3066e789b2a339
https://github.com/wesnoth/wesnoth/commit/917f7ef9a590e54ad2890a411d3066e789b2a339
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-12-06 (Fri, 06 Dec 2019)
Changed paths:
M data/ai/lua/ca_castle_switch.lua
Log Message:
-----------
AI castle_switch: reconsider CA score when using saved data
If the units previously on the keep moved off, we don't have to use the low score any more.
Commit: fd05a01af511f609ad0f96f660c1a3ed1c6f0ca3
https://github.com/wesnoth/wesnoth/commit/fd05a01af511f609ad0f96f660c1a3ed1c6f0ca3
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-12-06 (Fri, 06 Dec 2019)
Changed paths:
M data/ai/lua/ca_castle_switch.lua
M data/ai/lua/ca_recruit_rushers.lua
M data/ai/lua/generic_recruit_engine.lua
Log Message:
-----------
AI: make recruitment work with multi-leader castle switch
Recruiting itself still only handles one leader. This will be taken care of later.
Commit: a227e768f99dfe08d7e283ada1c1367ed1c00dcf
https://github.com/wesnoth/wesnoth/commit/a227e768f99dfe08d7e283ada1c1367ed1c00dcf
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-12-06 (Fri, 06 Dec 2019)
Changed paths:
M data/ai/lua/ai_helper.lua
Log Message:
-----------
ai_helper.get_cheapest_recruit_cost: add extra recruits
Commit: f8a9238e3f8a4d876edb01c32f6d2faed98837ce
https://github.com/wesnoth/wesnoth/commit/f8a9238e3f8a4d876edb01c32f6d2faed98837ce
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-12-06 (Fri, 06 Dec 2019)
Changed paths:
M data/ai/lua/ai_helper.lua
Log Message:
-----------
ai_helper.get_cheapest_recruit_cost: add optional input 'leader'
Commit: 96dd9c17120bd91e43256ffb409587f9654e0f39
https://github.com/wesnoth/wesnoth/commit/96dd9c17120bd91e43256ffb409587f9654e0f39
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-12-06 (Fri, 06 Dec 2019)
Changed paths:
M data/ai/lua/ca_castle_switch.lua
Log Message:
-----------
AI castle switch CA: use leader-specific cheapest recruit cost
Commit: 2cc8cce0e837f591ade28c314034e214c36739e7
https://github.com/wesnoth/wesnoth/commit/2cc8cce0e837f591ade28c314034e214c36739e7
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-12-06 (Fri, 06 Dec 2019)
Changed paths:
M data/ai/lua/ca_castle_switch.lua
M data/ai/lua/ca_move_to_any_enemy.lua
M data/ai/lua/ca_village_hunt.lua
Log Message:
-----------
AI: use ai_helper.robust_move_and_attack() in all CAs
Commit: 1ba7e9c76c68e508910c1bb1cca168b1cb0a5822
https://github.com/wesnoth/wesnoth/commit/1ba7e9c76c68e508910c1bb1cca168b1cb0a5822
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-12-07 (Sat, 07 Dec 2019)
Changed paths:
M data/ai/lua/ca_spread_poison.lua
Log Message:
-----------
AI spread poison CA: use more complete attack rating
battle_calcs.attack_rating() includes most of the contributions to the previous rating, plus a lot more.
Commit: 009a9ef2da35c891584dc8a625d7410f9667feaf
https://github.com/wesnoth/wesnoth/commit/009a9ef2da35c891584dc8a625d7410f9667feaf
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-12-07 (Sat, 07 Dec 2019)
Changed paths:
M data/ai/lua/ca_spread_poison.lua
Log Message:
-----------
AI spread poison CA: apply aggression aspect
In the same way as it is done in the combat CA
Commit: c93b1db30a8b39f3cc572c26227bb3ec362f43a4
https://github.com/wesnoth/wesnoth/commit/c93b1db30a8b39f3cc572c26227bb3ec362f43a4
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-12-07 (Sat, 07 Dec 2019)
Changed paths:
M data/ai/ais/ai_default_rca.cfg
M data/ai/dev/ai_experimental.cfg
M data/core/macros/ai.cfg
Log Message:
-----------
AI: do not use village hunt CA in any AI config
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.
Commit: 6a3015f0e200f2911fd41913af5024913bf886c7
https://github.com/wesnoth/wesnoth/commit/6a3015f0e200f2911fd41913af5024913bf886c7
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-12-07 (Sat, 07 Dec 2019)
Changed paths:
M data/ai/lua/battle_calcs.lua
Log Message:
-----------
battle_calcs.lua: fix bug in relative_damage_map()
Commit: a4a9a3ba82e7abd5b3eb86d7cee2b0c4c86f2ede
https://github.com/wesnoth/wesnoth/commit/a4a9a3ba82e7abd5b3eb86d7cee2b0c4c86f2ede
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-12-09 (Mon, 09 Dec 2019)
Changed paths:
M data/campaigns/Legend_of_Wesmere/scenarios/chapter1/01_The_Uprooting.cfg
M data/campaigns/Legend_of_Wesmere/scenarios/chapter1/03_Kalian_under_Attack.cfg
Log Message:
-----------
LoW: remove poisoning CAs from two scenarios
With the merge of Experimental AI candidate actions into the default AI, a spread_poison CA is now included by default.
Commit: abd03051f672d9483892f98eb5ac809d2ec02813
https://github.com/wesnoth/wesnoth/commit/abd03051f672d9483892f98eb5ac809d2ec02813
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-12-09 (Mon, 09 Dec 2019)
Changed paths:
R data/campaigns/The_Rise_Of_Wesnoth/ai/ca_retreat.lua
M data/campaigns/The_Rise_Of_Wesnoth/scenarios/15_A_New_Land.cfg
Log Message:
-----------
TRoW S15: remove custom retreat CA
With the merge of Experimental AI candidate actions into the default AI, the retreat CA is now included by default.
Commit: ec1420fae7e89369fabafdfbc753b7b73ab541f6
https://github.com/wesnoth/wesnoth/commit/ec1420fae7e89369fabafdfbc753b7b73ab541f6
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-12-09 (Mon, 09 Dec 2019)
Changed paths:
M data/campaigns/The_Rise_Of_Wesnoth/scenarios/15_A_New_Land.cfg
Log Message:
-----------
TRoW S15: remove spread_poison CA from enemy sides
This scenario has a custom CA for attacks, so all other attack CAs need to be removed.
Commit: ecca2c43ba150ca745f6769ad3790682afd6e28f
https://github.com/wesnoth/wesnoth/commit/ecca2c43ba150ca745f6769ad3790682afd6e28f
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-12-10 (Tue, 10 Dec 2019)
Changed paths:
M data/ai/micro_ais/mai-defs/fast.lua
Log Message:
-----------
Fast Micro AI: fix re-adding default CAs when deleting the MAI
The high_xp_attack CA is deleted when adding the Fast MAI, but not added back in when deleting the MAI.
Commit: d8b25ab14983fc8087ad110b4e3e0e0ea0b2f438
https://github.com/wesnoth/wesnoth/commit/d8b25ab14983fc8087ad110b4e3e0e0ea0b2f438
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-12-10 (Tue, 10 Dec 2019)
Changed paths:
M data/ai/micro_ais/mai-defs/fast.lua
Log Message:
-----------
Fast Micro AI: delete/add the new default AI CAs
Commit: 0806a2bbe119b09ffaa043eaf205ca30de40747d
https://github.com/wesnoth/wesnoth/commit/0806a2bbe119b09ffaa043eaf205ca30de40747d
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-12-11 (Wed, 11 Dec 2019)
Changed paths:
M data/ai/lua/ca_spread_poison.lua
Log Message:
-----------
AI spread poison CA: take attacks aspect into account
Commit: 5a9ac3ee15adfdff15ee78199d7c25dcffa20f29
https://github.com/wesnoth/wesnoth/commit/5a9ac3ee15adfdff15ee78199d7c25dcffa20f29
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-12-11 (Wed, 11 Dec 2019)
Changed paths:
M data/core/macros/ai_candidate_actions.cfg
Log Message:
-----------
AI: adjust names of new default candidate actions
This has no impact on functionality or use, it is simply done for consistency with other CAs and to indicate that these CAs are now part of the default AI.
Commit: 3f665ae8b1b1928f443273de0b90e19b342cec9a
https://github.com/wesnoth/wesnoth/commit/3f665ae8b1b1928f443273de0b90e19b342cec9a
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-12-11 (Wed, 11 Dec 2019)
Changed paths:
M data/ai/ais/ai_default_rca.cfg
Log Message:
-----------
AI: do not use the recruit_rushers CA as default recruitment
It is too different from previous default recruiting and would significantly affect scenario balance. It also currently does not work with multiple leaders and many of the aspects. It will be made available as an option (and is already in the Experimental AI) after these shortcomings have been fixed.
Commit: d650a8336d097214d36aefa4df6d0c9bb421b5e0
https://github.com/wesnoth/wesnoth/commit/d650a8336d097214d36aefa4df6d0c9bb421b5e0
Author: mattsc <mattsc000 at gmail.com>
Date: 2019-12-15 (Sun, 15 Dec 2019)
Changed paths:
M data/ai/ais/ai_default_rca.cfg
A data/ai/ais/ai_default_rca_1_14.cfg
R data/ai/ais/ai_experimental.cfg
A data/ai/dev/ai_experimental.cfg
M data/ai/lua/ai_helper.lua
M data/ai/lua/battle_calcs.lua
M data/ai/lua/ca_castle_switch.lua
M data/ai/lua/ca_grab_villages.lua
M data/ai/lua/ca_move_to_any_enemy.lua
M data/ai/lua/ca_recruit_rushers.lua
M data/ai/lua/ca_retreat_injured.lua
M data/ai/lua/ca_spread_poison.lua
M data/ai/lua/ca_village_hunt.lua
M data/ai/lua/generic_recruit_engine.lua
M data/ai/lua/retreat.lua
M data/ai/micro_ais/cas/ca_healer_move.lua
M data/ai/micro_ais/mai-defs/fast.lua
M data/campaigns/Legend_of_Wesmere/scenarios/chapter1/01_The_Uprooting.cfg
M data/campaigns/Legend_of_Wesmere/scenarios/chapter1/03_Kalian_under_Attack.cfg
R data/campaigns/The_Rise_Of_Wesnoth/ai/ca_retreat.lua
M data/campaigns/The_Rise_Of_Wesnoth/scenarios/15_A_New_Land.cfg
M data/core/macros/ai.cfg
M data/core/macros/ai_candidate_actions.cfg
Log Message:
-----------
Merge pull request #4600 from mattsc/expai_ca_merge
Merge Experimental AI candidate actions into the default AI
Compare: https://github.com/wesnoth/wesnoth/compare/16cdecc06437...d650a8336d09
More information about the Commits
mailing list