Friday, April 15, 2022

[jzawrivl] push button maze

(say) 9 buttons.  each button can be enabled or disabled.  each button controls a light.  if a button is enabled, pushing the button toggles its light.  if disabled, the button doesn't do anything.  (note: whether a button is enabled is orthogonal to the state of its light.  we don't specify how a button communicates whether it is enabled, maybe an additional light.)  what buttons are enabled depends on the state of all the lights, a lookup table.  goal is to turn on all the lights.

this is simply a maze among the 512 vertices of a 9-dimensional hypercube.  the maze can be generated with a maze-generating algorithm like Wilson's algorithm.  find the longest path and call one of the endpoints the corner with all lights on.  the other endpoint, the starting state, will probably not have all lights off.

design the maze so that if you push an enabled button, you can always push it again to go back: the maze has no one-way passages.  the button you last successfully pushed remains enabled for the next move.

to make things slightly easier, annotate each enabled button with lookahead, what buttons would be enabled if the button were pushed.  each enabled button gets a mini-diagram of 9 buttons colored by enablement.

9 buttons, 512 states, is probably the maximum a human can mentally keep track of.  unlike a maze drawn on paper, you can't see all the states at once from "overhead".

let the buttons control something more memorable than lights: some sort of scene which behaves in interesting ways depending on which parts are powered on and which parts not.  similar: GROW Cube online game.

previously, 128 buttons and a cryptographic constraint instead of maze.

No comments :