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?

  • bamboo@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    2
    ·
    7 days ago

    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?

    • lwhjp@lemmy.sdf.org
      link
      fedilink
      arrow-up
      2
      ·
      7 days ago

      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!