brain
The turnAiKit planner: a computer opponent for turn-based grid / tactics games. A game calls `Brain.nextAction(adapter, side, opts)` in a loop during the AI side's turn and applies each returned step (move, act, or end). It plans each unit's move jointly with the action it would…
turnAiKit.brain
The turnAiKit planner: a computer opponent for turn-based grid / tactics games.
A game calls Brain.nextAction(adapter, side, opts) in a loop during the AI
side's turn and applies each returned step (move, act, or end). It plans each
unit's move jointly with the action it would take from the new cell, scores
cover, incoming threat, kill chance, flanks, objectives and protecting a
healer or leader, and explains every choice in action.reasons.
Also: Brain.planUnit (one unit's joint plan), Brain.personality /
Brain.definePersonality (weight tables), Brain.difficulty,
Brain.PERSONALITIES, Brain.DIFFICULTIES, Brain.WEIGHT_KEYS,
Brain.VERSION. Pure Luau, deterministic for a seed. The package README
documents the adapter contract and every weight.
Scoped to this part · feeds back into the world's score.