FormulaAIandDynamicScripting

From The Battle for Wesnoth Wiki
Revision as of 04:56, 17 March 2008 by Dhains (talk | contribs)

These is a *very* rough outline of some ideas I have for the AI improvement. I'm pretty much open to any suggestions but this outlines what I had in mind, giving the AI some adaptive capability and seems to mesh well with the idea of making the AI tunable by scenario designers and for all out combat.

Dynamic Scripting

I was hoping to apply some machine learning concepts to the AI, specifically online learning. Online learning allows the AI to adapt it's strategy to fix holes being exploited by the human player and over all to perform more intelligently, giving the player a feeling he or she is playing against a thinking, clever opponent.

One method that seems quite suitable is dynamic scripting. This method relies on a manually designed rulebase from which the AI can construct moves. Each rule in the rulebase has an associated weight which influences the probability of a given rule being used in an upcoming move. As a game progresses, the weights are updated automatically according to the success or failure of the rules in the past of the current game (or campaign). This would allow the AI to adapt to a player's tactics and encourage the player to develop diverse strategies for use in campaign mode.

Formula AI

Formula AI can come into play for designing the rules. The rules can be written in Formula AI thus providing an easy interface for scenario designers to modify AI behavior. I imagine providing something like a core rulebase which provides decent gameplay, and scenario designers could add rules to the core rulebase as needed using Formula AI.

Rulebases

Since these are manually designed, I think this should allow us to incorporate the rules of the game such as ZoC, special unit maneuvers (backstab, etc.) into the AIs strategy and let the dynamic scripting backend decide when things are appropriate. Scenario designers could then customize the weights and probabilities associated with the rules easily in Formula AI and ad their own in addition to the core set.

Related Papers

Online Adaptation of Game Opponent AI in Simulation and in Practice, Spronk et al. [1]