2
$\begingroup$

I came across an interesting toggling puzzle while looking through a code repository on GitHub. I want to find out more about it and see if there is any info on how to solve it, how to ensure solvability etc., but I can't seem to find any references to it online. The closest I can find is a puzzle called "lights out" which is in a grid and always has adjacent lights toggled when toggling a particular light. Is the puzzle I found one that is already well known but which I just don't know the name for so I can search for it, or is it a one-off wonder?

The rules are simple - toggle switches so they all end up as O, but be aware that pairs of switches are connected. There is a version where the connections are hidden so you have to work the connections out yourself - this could be interesting if the goal is to minimize the number of goes.


            ┌─────────┐
          ┌─│─────┐   │
        ┌─│─│─┐   │   │
      ┌─│─│─│─│─┐ │   │
    ┌─│─│─│─│─│─│─│─┐ │
    │ │ │ │ │ ↓ ↓ ↓ ↓ ↓
    X X X X X X X X X X
    0 1 2 3 4 5 6 7 8 9
    ↑ ↑ ↑ ↑ ↑ │ │ │ │ │
    │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ │ │
    │ │ └─│─│─┘ │ │ │ │
    └─│───│─│───┘ │ │ │
      │   │ └─────┘ │ │
      │   └─────────┘ │
      └───────────────┘

Switch to toggle (0─9, or QUIT):
$\endgroup$
9
  • 1
    $\begingroup$ Can you share the GitHub repo where you found the puzzle? $\endgroup$
    – Bubbler
    Commented Oct 22, 2020 at 23:22
  • $\begingroup$ I don't think I get the full logic behind this puzzle. 0-4 are linked to 5-9, so all you have to do is toggle either 0-4 or 5-9 and all the items will be O. Like if I toggle switch 0, both 0 and it's pair (8) becomes O. Repeat for 1-4 and all 10 will be O. Or is it in both directions so if you toggle 0 it will change 6 and 8? $\endgroup$ Commented Oct 23, 2020 at 0:22
  • $\begingroup$ I think that configuration just happened to be simple to solve. The connections are generated randomly by the code. $\endgroup$ Commented Oct 23, 2020 at 6:04
  • $\begingroup$ @Bubbler github.com/asweigart/PythonStdioGames $\endgroup$ Commented Oct 23, 2020 at 8:29
  • $\begingroup$ @RobinAndrews So many games there. What is the title of this particular game? $\endgroup$
    – Bubbler
    Commented Oct 23, 2020 at 8:36

0