Lights Out: my 2D Rubik's Cube-like Game
"Lights Out" is a mathematical puzzle that lives on an grid where each cell of the grid is one of two colors: either red or white. The goal is to eventually get all the cells in the grid to be red. What's the catch? Clicking a cell will not only flip its color, but also that of all cells sharing the same row or column as it. To me, this game feels like playing with a Rubik's cube --- every time you think you are fixing one cell, you mess up its neighbors! There are many ways to arrive at a solution... some mathematical (linear algebra, or combinatorics), others more logical,... and yet…
In plain words
Lights Out is a 2D puzzle game where players flip cells on a grid between red and white, with the goal of making all cells red. Clicking a cell flips not only that cell but also all others in the same row and column, creating a Rubik's Cube-like challenge where fixing one area disrupts others. The game offers multiple solution approaches, from mathematical methods using linear algebra to logical or trial-and-error strategies. It's designed for puzzle enthusiasts who enjoy grid-based brain teasers.
written from the facts on this page · September 2026
From the sources
In the maker’s words, at launch
"Lights Out" is a mathematical puzzle that lives on an grid where each cell of the grid is one of two colors: either red or white. The goal is to eventually get all the cells in the grid to be red. What's the catch? Clicking a cell will not only flip its color, but also that of all cells sharing the same row or column as it. To me, this game feels like playing with a Rubik's cube --- every time you think you are fixing one cell, you mess up its neighbors! There are many ways to arrive at a solution... some mathematical (linear algebra, or combinatorics), others more logical,... and yet others which are brute force. The title “Lights Out” comes from a classic handheld game from 1997. The “rule” they follow for which-cells-get-flipped-on-click is what I call “Adjacent.” Additionally, my mathematics teacher showed me this game following another variant which I call “Same Row & Column,” but on a bigger board. He had worked out an algorithm for his version. I found the same strategy before he revealed the answer, and I feel that the process of discovering a solution is quite rewarding—it’s fundamentally related to computing on restrictive computer architectures. I implemented this app with pretty basic TypeScript. It’s been used for some experiments to discover more general of strategies for different click variants, board sizes, and even board dimensions! It has also been the basis for the corresponding video produced using the Python library manim. Try it out and let me know how you do!
More life & fun this month
the category →- TL
Life & fun · 10d ago · louisabraham.github.io

Photosynthesis fires two of your iPhone
Life & fun · 28d ago · photosynthesis.camera
SoloUno▲310Take control of hair pulling, nail biting & skin picking
Life & fun · 28d ago · solouno.io

Scroll through all 43,252,003,274,489,856,000 reachable Rubik's Cube permutations.
Life & fun · 26d ago · everycube.alen.is


Hi HN, I built Eigendrum, a web tool that solves the 2D wave equation for arbitrary shapes so you can hear what they sound like as drums. How it works: * Solves -∇²u = λu using finite element analysis (Kφ = λMφ) on a triangle mesh. * Validated to <0.1% error against closed-form solutions for circles (Bessel zeros) and rectangles. * Sound model factors in strike location, Rayleigh damping, and mallet width. * Includes Kac drums I & II to demonstrate identical sound spectra from different geometries. * No frameworks, build steps, or dependencies. Repo and tests:…
Life & fun · 27d ago · baselashraf81.github.io
Launched alongside, October 2025
the whole month →

- SA
I went down the rabbit hole on a side project and ended up building this: Strange Attractors(https://blog.shashanktomar.com/posts/strange-attractors). It’s built with three.js. Working on it reminded me of the little "maths for fun" exercises I used to do while learning programming in early days. Just trying things out, getting fascinated and geeky, and being surprised by the results. I spent way too much time on this, but it was extreme fun. My favorite part: someone pointed me to the Simone Attractor on Threads. It is a 2D attractor and I asked GPT to extrapolate it to…
AI · Oct 2025 · blog.shashanktomar.com

- ASAutism Simulator▲779
Hey all, I built this. It’s not trying to capture every autistic experience (that’d be impossible). It’s based on my own lived experience as well as that of friends on the spectrum. I'm trying to give people a feel for what masking, decision fatigue, and burnout can look like day-to-day. That’s hard to explain in words, but easier to show through choices and stats. I'm not trying to "define autism". I’ve gotten good feedback here about resilience, meds, and difficulty tuning. I’ll keep tweaking it. If even a few people walk away thinking, "ah, maybe that’s why my coworker struggles in those…
Life & fun · Oct 2025 · autism-simulator.vercel.app
