Simplest: pieces can move one step along any edge connected to their current node. Analogous to a chess king.
Add colors to edges. Some pieces can only move along certain colored edges. Analogous to diagonal versus orthogonal movement. Some pieces make one step along one color edge, then another step on another color edge: analogous to a knight.
Create a relationship among edges adjacent to a node. Pieces entering through one edge can "connect to" another edge, exiting out that way. This permits ranged pieces like queen, rook, and bishop. It also permits limiting the second "diagonal" step of the knight.
We can then go beyond orthodox chess by adding adding directed edges and weights to edges: pieces can only move where the sum of the edges traversed is less than their budget for that move.
Simpler and more general is for each piece type, a graph of node connectivity. There remains the tricky problem of pieces blocking the progress of ranged pieces. Most generally, each directed edge gets annotated with a predicate which must be satisfied to reach the destination node.
Motivation is to create massive and complex games for general game playing.
No comments :
Post a Comment