[wesnoth-commits] [wesnoth/wesnoth] d0f1b2: AI goals: do not protect units hidden from the AI

GitHub noreply at github.com
Tue Dec 18 14:25:58 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: d0f1b27dee4bfa55d35f278264b3058b3576836a
      https://github.com/wesnoth/wesnoth/commit/d0f1b27dee4bfa55d35f278264b3058b3576836a
  Author: mattsc <mattsc000 at gmail.com>
  Date:   2018-12-07 (Fri, 07 Dec 2018)

  Changed paths:
    M src/ai/composite/goal.cpp

  Log Message:
  -----------
  AI goals: do not protect units hidden from the AI


  Commit: 6824f9bced575553a64e7a2e371de03eb3a92f07
      https://github.com/wesnoth/wesnoth/commit/6824f9bced575553a64e7a2e371de03eb3a92f07
  Author: mattsc <mattsc000 at gmail.com>
  Date:   2018-12-07 (Fri, 07 Dec 2018)

  Changed paths:
    M src/ai/default/ca.cpp

  Log Message:
  -----------
  AI leader_shares_keep CA: re-evaluate possible_moves after move


  Commit: 761b110f1fd151877a3fdb12e1f0208b3dce19f6
      https://github.com/wesnoth/wesnoth/commit/761b110f1fd151877a3fdb12e1f0208b3dce19f6
  Author: mattsc <mattsc000 at gmail.com>
  Date:   2018-12-07 (Fri, 07 Dec 2018)

  Changed paths:
    M src/ai/default/ca_move_to_targets.cpp

  Log Message:
  -----------
  AI move_to_targets CA: do not use dynamic limit for a* search

Using a dynamic limit here is not the right way to do this, among other things for the reasons given in the old comment. The new comment is copied from a bit earlier in the code, where more path finding is done. Path finding is indeed the most expensive part of the evaluation, but which of the two path finding loops takes more time depends on whether there are more goals or more units on the map.

In any case, if we want to improve the efficiency of this part of the code, it should be done by some sort of "smart pre-selection" rather than by limiting the a* search like this.  Also, this second path finding loop can already be skipped by using simple_targeting=yes.

Note that this commit does not change current behavior, it only removes the TODO and commented-out code.


  Commit: 5f8b0a34dfe245bf33ce7bbf95da9039cf528f1f
      https://github.com/wesnoth/wesnoth/commit/5f8b0a34dfe245bf33ce7bbf95da9039cf528f1f
  Author: mattsc <mattsc000 at gmail.com>
  Date:   2018-12-07 (Fri, 07 Dec 2018)

  Changed paths:
    M src/ai/actions.cpp
    M src/ai/actions.hpp
    M src/ai/composite/ai.cpp
    M src/ai/composite/aspect.cpp
    M src/ai/composite/aspect.hpp
    M src/ai/composite/component.hpp
    M src/ai/contexts.cpp
    M src/ai/default/attack.cpp
    M src/ai/default/ca.cpp
    M src/ai/default/contexts.hpp
    M src/ai/formula/ai.cpp
    M src/ai/formula/engine_fai.cpp
    M src/ai/formula/function_table.cpp
    M src/ai/formula/stage_side_formulas.cpp
    M src/ai/game_info.hpp
    M src/ai/lua/core.cpp
    M src/ai/manager.cpp
    M src/ai/testing.cpp

  Log Message:
  -----------
  AI: remove outdated TODOs

These are TODOs which have been implemented, are not worth implementing, can be converted to notes (for example because they are obvious or because they are not really TODOs), etc.

Some additional comments are given in Issue #3695.


  Commit: 73bd58282e9737338286a66b6aa84812e51981c2
      https://github.com/wesnoth/wesnoth/commit/73bd58282e9737338286a66b6aa84812e51981c2
  Author: mattsc <mattsc000 at gmail.com>
  Date:   2018-12-08 (Sat, 08 Dec 2018)

  Changed paths:
    M src/ai/actions.cpp
    M src/ai/composite/ai.cpp
    M src/ai/game_info.hpp
    M src/ai/manager.cpp

  Log Message:
  -----------
  AI: remove references to extended event system

There is no plan to implement anything like this. In fact, there is no information anywhere what this was even meant to be. My best guess is that it was some sort of log system of what actions the AI had done, or potentially was planning to do, so that actions could be considered in combination rather than in isolation. However, except for the recent_attacks table appearing right after these comments, nothing like this exists in the Wesnoth AI.

I am removing these comments in one commit separate from the TODO clean-up, so that this can be found more easily should it ever become relevant.


  Commit: 3179b4707592e3b74539f37c7d39f1c47c8653f7
      https://github.com/wesnoth/wesnoth/commit/3179b4707592e3b74539f37c7d39f1c47c8653f7
  Author: mattsc <mattsc000 at gmail.com>
  Date:   2018-12-08 (Sat, 08 Dec 2018)

  Changed paths:
    M src/ai/composite/aspect.cpp
    M src/ai/composite/aspect.hpp

  Log Message:
  -----------
  AI: remove invalidate_on_minor_gamestate_change

This has never been implemented and there is not even a clear use case for it. It was envisioned to be used to invalidate AI aspects when "minor" changes occurred that do not actually move an AI unit or change one of its main properties (such as changes to unit variables).


  Commit: 8a7a5a153f32b71ff2810ddeea846e6109e83d72
      https://github.com/wesnoth/wesnoth/commit/8a7a5a153f32b71ff2810ddeea846e6109e83d72
  Author: mattsc <mattsc000 at gmail.com>
  Date:   2018-12-15 (Sat, 15 Dec 2018)

  Changed paths:
    M data/ai/ais/ai_default_rca.cfg
    M data/ai/ais/ai_experimental.cfg
    M data/ai/dev/ai_default_rca_alternate_recruiting.cfg
    M data/ai/dev/formula_ai.cfg
    M data/ai/dev/formula_ai_poisoning.cfg
    M src/ai/configuration.cpp

  Log Message:
  -----------
  AI configuration: invert mp_rank based ordering

This is supposed to be equivalent to the campaign rank, so it should be in ascending order.


  Commit: ba4202caf8b916692dd254f1eddb54bff74153f6
      https://github.com/wesnoth/wesnoth/commit/ba4202caf8b916692dd254f1eddb54bff74153f6
  Author: mattsc <mattsc000 at gmail.com>
  Date:   2018-12-16 (Sun, 16 Dec 2018)

  Changed paths:
    M src/ai/actions.cpp
    M src/ai/contexts.cpp
    M src/ai/manager.hpp

  Log Message:
  -----------
  AI code: remove more outdated TODOs

Some more comments and explanations in Issue #3695.


  Commit: 49e216bba3496f1b0bc957c28fb6f60b3c36c1e5
      https://github.com/wesnoth/wesnoth/commit/49e216bba3496f1b0bc957c28fb6f60b3c36c1e5
  Author: mattsc <mattsc000 at gmail.com>
  Date:   2018-12-16 (Sun, 16 Dec 2018)

  Changed paths:
    M src/ai/contexts.cpp
    M src/ai/contexts.hpp
    M src/ai/default/contexts.hpp
    M src/ai/lua/engine_lua.cpp
    M src/ai/manager.cpp
    M src/ai/manager.hpp

  Log Message:
  -----------
  AI code: remove old version annotations from TODOs

Also use consistent capitalization and add a couple comments referring to existing TODOs.


  Commit: cb3049681bb8538f1ad9d1adf9dac5657b722382
      https://github.com/wesnoth/wesnoth/commit/cb3049681bb8538f1ad9d1adf9dac5657b722382
  Author: mattsc <mattsc000 at gmail.com>
  Date:   2018-12-18 (Tue, 18 Dec 2018)

  Changed paths:
    M data/ai/ais/ai_default_rca.cfg
    M data/ai/ais/ai_experimental.cfg
    M data/ai/dev/ai_default_rca_alternate_recruiting.cfg
    M data/ai/dev/formula_ai.cfg
    M data/ai/dev/formula_ai_poisoning.cfg
    M src/ai/actions.cpp
    M src/ai/actions.hpp
    M src/ai/composite/ai.cpp
    M src/ai/composite/aspect.cpp
    M src/ai/composite/aspect.hpp
    M src/ai/composite/component.hpp
    M src/ai/composite/goal.cpp
    M src/ai/configuration.cpp
    M src/ai/contexts.cpp
    M src/ai/contexts.hpp
    M src/ai/default/attack.cpp
    M src/ai/default/ca.cpp
    M src/ai/default/ca_move_to_targets.cpp
    M src/ai/default/contexts.hpp
    M src/ai/formula/ai.cpp
    M src/ai/formula/engine_fai.cpp
    M src/ai/formula/function_table.cpp
    M src/ai/formula/stage_side_formulas.cpp
    M src/ai/game_info.hpp
    M src/ai/lua/core.cpp
    M src/ai/lua/engine_lua.cpp
    M src/ai/manager.cpp
    M src/ai/manager.hpp
    M src/ai/testing.cpp

  Log Message:
  -----------
  Merge pull request #3764 from mattsc/ai_todos

Clean up old AI TODOs


Compare: https://github.com/wesnoth/wesnoth/compare/6cb4729cedd6...cb3049681bb8
      **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the Commits mailing list