I know that we can brute force it by placing an obstacle at every valid position in the path, but is there a more elegant / efficient solution?
I know that we can brute force it by placing an obstacle at every valid position in the path, but is there a more elegant / efficient solution?
Rectangles don’t account for all loops though, right? Couldn’t you have a loop with, say, 6 points in an L shape?
Yeah you’re right. I keep focusing on the smaller example where everything is just rectangle loops, but the big map is way more complex. I do wonder though if an L shaped loop is just multiple rectangle loops combined though? Like if you can find all the rectangles, then find ones where combined they make bigger loops?
I mean, sure you can combine rectangles to make any path, but since there is no upper limit I don’t think that will help much. You may be on to something and I just can’t see it, though! Good luck!