Minimax Algorithm with Percolation from Resolved States
Initialize color, a map of states to their outcome (MOUSE, CAT, DRAW).
Initialize a queue and add all initially resolved states to it.
While the queue is not empty:
a. Dequeue a state.
b. For each parent state of the dequeued state:
i. If immediate coloring is possible, color the parent state.
ii. If not, decrement the count of DRAW children.
iii. If the count of DRAW children is zero, apply eventual coloring.
c. Enqueue any newly colored parent states.
After processing all states, return the color of the initial state (1, 2, 1).