The “pattern-filling with tiles” puzzle

后端 未结 3 1590
天涯浪人
天涯浪人 2021-01-31 05:16

I\'ve encountered an interesting problem while programming a random level generator for a tile-based game. I\'ve implemented a brute-force solver for it but it is exponentially

3条回答
  •  南旧
    南旧 (楼主)
    2021-01-31 06:19

    As a base, take a look at an earlier answer I gave on searching. Hill-climbing search programs are a tool every programmer should have in their arsenal as they work much better than plain brute-force solvers.

    Here, even a relatively bad search algorithm has as an advantage the fact that it won't generate illegal boards, greatly reducing the expected run time.

提交回复
热议问题