Log inGet started
World

Next Move: Computer Opponents for Turn-Based Tactics

Branchmain
Branchesmain
Commit263f499d32

README.md

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.