Quest 14: The Game of Light
- Keep top level comments as only solutions, if you want to say something other than a solution put it in a new post. (replies to comments can be whatever)
- You can send code in code blocks by using three backticks, the code, and then three backticks or use something such as https://topaz.github.io/paste/ if you prefer sending it through a URL
Link to participate: https://everybody.codes/
4 Comments
Pyro@programming.dev · 2 pts · 268d
Python
I spent way too long optimizing this solution from ~20s to <1s
hades@programming.dev · 2 pts · 267d
Are you assuming that the cycle will always include the initial state? It does, as it turns out, but that's not really obvious (at least to me) from the problem.
Pyro@programming.dev · 2 pts · 266d
Yes, I'm not sure how to prove it but I had a hunch that was the case. So I initially wrote some code to print the grid right after the cycle is detected and lo and behold, it was the initial state.
hades@programming.dev · 2 pts · 274d
Rust
Finally caught up with the puzzles.