Nima Aghdaii


Mirrors and Laser Puzzle

26 Jul 2022 » puzzle, javascript, simulation

Puzzle

You are a single point in a square room and all the walls are mirrors. Someone in the room is trying to shoot you with a laser from another point in the room. No one is allowed to move but you can install single-point blockers to completely block the line and not reflect it. What is the minimum number of blockers you need to guarantee you’ll be safe? Would that even be finite?


laser


Solution

This video does a great job explaining the solution:

https://www.youtube.com/watch?v=jJ6FD59U0_E


Simulation

Here is a simulation I made with a few lines of html, js and css:

http://jsfiddle.net/nim_a101/mqypwuo3/132/