Wesnoth AI
This page is currently under construction (Feb 2016) |
Contents
Introduction to the Wesnoth AIs
Wesnoth provides a general artificial intelligence (AI) which is active by default, as well as several more specialized optional AIs. These AIs are highly configurable and can be included and/or customized by scenario and map creators using simple WML. For AI developers, it is also possible to replace parts or all of the default AI with custom code.
This page provides a brief summary of the available AIs and of the methods, tools and resources available for using and modifying them. Links are provided to more detailed pages on each of the topics.
Available AIs
Wesnoth comes with several built-in AIs:
- Default (RCA) AI: If no special instructions are given, this AI is used automatically for all computer-controlled sides with no setup needed. In addition, it can be configured, modified and partly or fully replaced by custom AIs in a variety of ways. For details see:
- The Experimental AI adds additional features to the RCA AI and can be added to both single-player scenarios and multi-player games. It is still under development (thus its name) and might change from release to release.
- Experimental_AI details
- Micro AIs add specialized behavior to Wesnoth that cannot be achieved by adjusting default AI parameters. A Micro AI can be included in a scenario with a few lines of WML code, using the [micro_ai] tag.
- Micro_AIs details
- The Idle AI does nothing at all and can be chosen with ai_algorithm=idle_ai in the side definition. This is generally not particularly useful and has some bugs when trying to reenable it. It is usually better to set controller=null to deactivate sides (although that also disables healing, income/uptake and side specific events).
In addition to these AIs, Wesnoth provides a variety of options for writing you own AI code. See the links below for details.
AI Resources
Todo: flesh this out
AI Implementations
- Wesnoth_AI_Framework: general principle of how all Wesnoth AIs are implemented
- Default (RCA) AI: currently described at General_RCA_AI_Howto — create new page
- LuaAI
- FormulaAI
- C++ and Python
AI Resources for Scenario and Map Creators
- AiWML
- Other methods to modify the default AI
AI Resources for AI Coders
- Wesnoth_AI_Framework: General principle of how the Wesnoth AI (all AIs) work internally
- LuaAI
- FormulaAI
- AI_Arena: AI testing framework [not maintained, but should be functional]
Miscellaneous Legacy Resources
These are kept because they might be useful to those who really want to dig into the inner workings of the AI and potentially update the C++ code itself. However, these pages are not updates any more, so they might be inaccurate and/or incomplete.