[wesnoth-commits] [wesnoth/wesnoth] efe5a4: Add new AI aspect retreat_factor
mattsc
noreply at github.com
Wed Mar 3 16:22:39 UTC 2021
Branch: refs/heads/master
Home: https://github.com/wesnoth/wesnoth
Commit: efe5a4d4971bdd8d12d254da43bad18acc0b78a4
https://github.com/wesnoth/wesnoth/commit/efe5a4d4971bdd8d12d254da43bad18acc0b78a4
Author: mattsc <mattsc000 at gmail.com>
Date: 2021-02-25 (Thu, 25 Feb 2021)
Changed paths:
M data/ai/utils/default_config.cfg
M data/schema/ai/aspect_complex.cfg
M data/schema/ai/aspect_simple.cfg
M data/schema/ai/modify.cfg
M data/tools/emacs_mode/wesnoth-wml-data.el
M src/ai/contexts.cpp
M src/ai/contexts.hpp
M src/ai/formula/ai.cpp
M src/ai/lua/core.cpp
M src/ai/manager.cpp
M src/ai/registry.cpp
Log Message:
-----------
Add new AI aspect retreat_factor
Commit: 903e03d68a2198aea137b1117f9d09d1faf70b00
https://github.com/wesnoth/wesnoth/commit/903e03d68a2198aea137b1117f9d09d1faf70b00
Author: mattsc <mattsc000 at gmail.com>
Date: 2021-02-26 (Fri, 26 Feb 2021)
Changed paths:
M data/ai/lua/ca_retreat_injured.lua
M data/ai/lua/retreat.lua
Log Message:
-----------
AI retreat_injured CA: improve retreat threshold calculation
The main problem was that the previous calculation was based on the 'caution' aspect. While that is not technically wrong, caution is also used for other purposes and there are mainline (and presumably UMC) scenarios that use large values for caution. In those cases, units retreated that were barely injured. This, again, might even be desirable for some use cases, but it needs to be decoupled from the other uses of caution. Thus, the new 'retreat_factor' aspect is used now.
In addition, the calculation is now based on a unit's maximum hitpoints, rather than its level.
Commit: fe316aec3a4bf864d2b0628f6cdf404bea5031ab
https://github.com/wesnoth/wesnoth/commit/fe316aec3a4bf864d2b0628f6cdf404bea5031ab
Author: mattsc <mattsc000 at gmail.com>
Date: 2021-02-26 (Fri, 26 Feb 2021)
Changed paths:
M data/ai/utils/default_config.cfg
M data/schema/ai/aspect_complex.cfg
M data/schema/ai/aspect_simple.cfg
M data/schema/ai/modify.cfg
M data/tools/emacs_mode/wesnoth-wml-data.el
M src/ai/contexts.cpp
M src/ai/contexts.hpp
M src/ai/formula/ai.cpp
M src/ai/lua/core.cpp
M src/ai/manager.cpp
M src/ai/registry.cpp
Log Message:
-----------
Add new AI aspect retreat_enemy_weight
Commit: 663a0ef8ec1138ddb6be570b45f4a1a7985a845d
https://github.com/wesnoth/wesnoth/commit/663a0ef8ec1138ddb6be570b45f4a1a7985a845d
Author: mattsc <mattsc000 at gmail.com>
Date: 2021-02-26 (Fri, 26 Feb 2021)
Changed paths:
M data/ai/lua/retreat.lua
Log Message:
-----------
AI retreat_injured CA: fix bug in finding hexes next to healers
The CA was supposed to mark hexes next to healers as potential healing locations, but because of this bug that did not work.
Commit: f799269fa1461cf1dd1878488270f2e2ac68c50e
https://github.com/wesnoth/wesnoth/commit/f799269fa1461cf1dd1878488270f2e2ac68c50e
Author: mattsc <mattsc000 at gmail.com>
Date: 2021-02-26 (Fri, 26 Feb 2021)
Changed paths:
M data/ai/lua/retreat.lua
Log Message:
-----------
AI retreat_injured CA: improve retreat location evaluation
This includes several improvements to the retreat hex evaluation:
- Enemy threats are not the dominant rating contribution any more
- Enemy threats are based mostly on HP balance, rather than simply enemy number
- Enemy threat assessment can be modified with the retreat_enemy_weight aspect
- By default, only healing locations are considered as retreat locations, but this can be overridden with the retreat_enemy_weight aspect
Commit: f67a5b269e3076a02d4c9cc943be9eb6294c8a1c
https://github.com/wesnoth/wesnoth/commit/f67a5b269e3076a02d4c9cc943be9eb6294c8a1c
Author: mattsc <mattsc000 at gmail.com>
Date: 2021-02-27 (Sat, 27 Feb 2021)
Changed paths:
M data/ai/lua/retreat.lua
Log Message:
-----------
AI retreat_injured CA: fix retreat_enemy_weight use
Only enemy threats are to be multiplied by this factor, not the ally support.
Commit: 7e8cedaea8b98798254e15fe8e8e216d3d53e6e6
https://github.com/wesnoth/wesnoth/commit/7e8cedaea8b98798254e15fe8e8e216d3d53e6e6
Author: mattsc <mattsc000 at gmail.com>
Date: 2021-03-03 (Wed, 03 Mar 2021)
Changed paths:
M data/ai/lua/ca_retreat_injured.lua
M data/ai/lua/retreat.lua
M data/ai/utils/default_config.cfg
M data/schema/ai/aspect_complex.cfg
M data/schema/ai/aspect_simple.cfg
M data/schema/ai/modify.cfg
M data/tools/emacs_mode/wesnoth-wml-data.el
M src/ai/contexts.cpp
M src/ai/contexts.hpp
M src/ai/formula/ai.cpp
M src/ai/lua/core.cpp
M src/ai/manager.cpp
M src/ai/registry.cpp
Log Message:
-----------
Merge pull request #5573 from mattsc/ca_retreat_injured
AI: Improve behavior of the retreat_injured CA
Compare: https://github.com/wesnoth/wesnoth/compare/043ee7a80b68...7e8cedaea8b9
More information about the Commits
mailing list