The candidate-action pipeline at the heart of a Wesnoth-style AI: stages run in order, the first
one whose when passes scores every candidate with its weigh, and the highest score wins (the
earlier candidate on a tie, so a decision is stable across equal scores).
The default weigh is the aspect-weighted sum of each candidate's factors, which is what makes
the aspects worth having: a game sets aggression: 2 once and every candidate naming
aggression is worth twice as much. keep_away is honoured through a candidate's distance
factor. A stage that needs more - goal priorities, terrain, this turn's state - brings its own
weigh, and mwg stays out of the rules.
The candidate-action pipeline at the heart of a Wesnoth-style AI: stages run in order, the first one whose
whenpasses scores every candidate with itsweigh, and the highest score wins (the earlier candidate on a tie, so a decision is stable across equal scores).The default
weighis the aspect-weighted sum of each candidate'sfactors, which is what makes the aspects worth having: a game setsaggression: 2once and every candidate namingaggressionis worth twice as much.keep_awayis honoured through a candidate'sdistancefactor. A stage that needs more - goal priorities, terrain, this turn's state - brings its ownweigh, andmwgstays out of the rules.Example