COSC 159 - Fundamentals of AI20 Successor Function b = position of blank; successors = {}; // empty set if (b-1 % 3 != 2) { create new state by swapping state[b] and state[b-1]; add new state to successors; } if (b+1 % 3 != 0) { create new state by swapping state[b] and state[b+1]; add new state to successors; } if (b-3 >= 0) { create new state by swapping state[b] and state[b-3]; add new state to successors; } if (b+3 < 9) { create new state by swapping state[b] and state[b+3]; add new state to successors; } return successors;
{}