The 15 puzzle has a state space of 16!, which is too large to represent in Edgy. The smaller, 8 puzzle could work. But I'm curious about another approach:
use the stage to display the current state in a 4x4 graph
provide a block that maps a string representation of the state, e.g. 34c5a1_18ed69f7b, to the 4x4 graph
provide a block that returns a list of states that are accessible from any given state (where states are represented using the strings)
provide a block that calculates the taxicab distance between a pair of states
support updating of the graph display using the arrow keys (which manipulate the blank square), enabling users to experiment with new start states.
The 15 puzzle has a state space of 16!, which is too large to represent in Edgy. The smaller, 8 puzzle could work. But I'm curious about another approach:
34c5a1_18ed69f7b
, to the 4x4 graph