This is a matrix of random numbers between 0 and 1. Assigned by a color representing each part of the matrix
When the browser is refreshed the array is updated, you can also modify a commented array within the code so that this function is done automatically.
Just clone it and deploy it to some local server to be viewed in the browser. This is an example:
The 0's represent zones without doors, the 1's with doors, the red zones where there are light bulbs, taking into account that they can vary (the logic is; a light bulb is in a wall and lights up a specific zone depending on the point of view where you take it, just like this happens here).
I chose the M shape to reach all parts of the matrix.
In short, where there are walls there can also be bulbs, it depends on your imagination how you perceive it would light the place you want.