I used a u8, one bit per level to do mine, but because not all bits correspond to a splitter, it ends up duplicating a lot of the paths. Which is why I made the lowest bit at the top, so it flip-flops a lot, giving the appearance of multiple different paths :D
If I understand correctly, your visualization shows up to to 256 unique paths then?
In this one, every time the beam passes a splitter, the other side is put on a queue, so eventually all possible paths are traced, breadth first. Initially I worked through the options recursively, but that depth-first filling out was boring to look at.
Yeah, max of 256 paths, and if there were no holes in the splitter layout, it would be the full 256. Also why i had to limit the depth to 16 layers, more than that and the brute forcing gets a bit silly.
I used a u8, one bit per level to do mine, but because not all bits correspond to a splitter, it ends up duplicating a lot of the paths. Which is why I made the lowest bit at the top, so it flip-flops a lot, giving the appearance of multiple different paths :D
If I understand correctly, your visualization shows up to to 256 unique paths then?
In this one, every time the beam passes a splitter, the other side is put on a queue, so eventually all possible paths are traced, breadth first. Initially I worked through the options recursively, but that depth-first filling out was boring to look at.
Yeah, max of 256 paths, and if there were no holes in the splitter layout, it would be the full 256. Also why i had to limit the depth to 16 layers, more than that and the brute forcing gets a bit silly.