Here’s something to play around with.
Numbers are ordered in a circle. Each number can go be ON or OFF at any given time. All numbers are OFF in the beginning.
The goal is to turn all of the numbers ON.
There is only one possible action that you can do at each turn:
- Choose a number. That number turns ON.
- The two numbers opposite to it turn ON as well.
- If a number is already ON and is turned, it turns OFF.
For example if you turn on 1 - 5 and 4 with turn on as well, 7 - turns 7, 3 and 4 and so on.
Try it out. It’s fun.
Here’s my semi brute force solution:
|
|
^Note for code: numbers are indexed from 0 to 6 since it’s more convenient.
A future TODO here is get to some sort of more formulaic solution,
e.g. without using random
.