Tip: Solver runs fastest on Chrome
See the help page for more information. The settings menu in the top-right has advanced features.
Create constraints between pairs of cells by providing a custom JavaScript function.
// Return true if the cell values a and b are
// a valid pair.
// Example: a < b (thermometer constraint)
constraintCheck = (a, b) =>
Define a finite-state machine using JavaScript transition and accept functions. The constraint will be satisfied the state-machine reaches an accept state after processing the cells in order.
NUM_CELLS is available as the number of currently selected cells.
NUM_CELLS
Tip: You can use console.log to debug your state machine.
console.log
// The initial state(s). States can be any
// JSON-serializable value, except arrays.
// Use an array for multiple start states.
startState =
;
// transition takes the current state and
// cell value and returns the next state, or
// an array of states. Returning undefined or
// the empty array generates no next states.
function transition(state, value) {
}
// accept returns true when the state is a
// valid final state.
function accept(state) {
// Max depth for state creation (optional).
maxDepth =
help()