Skip to content

Commit

Permalink
Less aggressive use of Monte Carlo simulation
Browse files Browse the repository at this point in the history
5000 turned out to be a too low threshold: at that complexity score traditional probability calculation is still much faster.
  • Loading branch information
jyrkive committed Dec 31, 2016
1 parent 3dac13a commit 169946f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelog
@@ -1,5 +1,7 @@
Version 1.13.6+dev:
* AI:
* Fix a performance regression in complex combat situations such as the
"Oath of Allegiance" UMC campaign.
* Fix some Micro AIs and AI helper functions not working correctly for AI
sides under shroud
* New function ai_helper.find_path_with_shroud()
Expand Down
4 changes: 4 additions & 0 deletions players_changelog
Expand Up @@ -3,6 +3,10 @@ changes may be omitted). For a complete list of changes, see the main
changelog: https://github.com/wesnoth/wesnoth/blob/master/changelog

Version 1.13.6+dev:
* AI:
* Fix a performance regression in complex combat situations such as the
"Oath of Allegiance" UMC campaign.

* Graphics:
* Improved terrain graphics: lava.

Expand Down
2 changes: 1 addition & 1 deletion src/attack_prediction.hpp
Expand Up @@ -61,7 +61,7 @@ struct combatant
#endif

private:
static const unsigned int MONTE_CARLO_SIMULATION_THRESHOLD = 5000u;
static const unsigned int MONTE_CARLO_SIMULATION_THRESHOLD = 50000u;

const battle_context_unit_stats &u_;

Expand Down

0 comments on commit 169946f

Please sign in to comment.