Algorithm and data structure for solving the game “Globs”/flood fill/“FloodIt”

后端 未结 7 2055
感情败类
感情败类 2021-01-31 19:35

Suggest an algorithm and data structure for solving the game Globs (http://www.deadwhale.com/play.php?game=131). It\'s pretty fun in a geeky kind of way.

State t

7条回答
  •  攒了一身酷
    2021-01-31 20:25

    A brute-force recursive search will find the maximum score. You have at most 5^25 ending states to consider. Many intermediate states will be equivalent; it may be faster to recognize these and prune the search space of duplicates. Keep track of the highest score found so far as you search, along with the path (sequence of moves) that it took to get there.

提交回复
热议问题