i want to use a* in finding the minimum steps to make the puzzle unary in color. but i don't know how. I don't even know if it is feasible. A* searches from a starting point to a destination. In this case, the flood-it game, there's no specific destination because the goal of the game is to make the color unary.
If im to code it, the input would be a graph, then i will convert it to a tree wherein it is all the possible paths, then check what node has the smallest value of level, then that would be the min step. Its just that i think its too slow. And its brute force. Im just thinking maybe there are other ways not brute force or maybe theres something with a*
if you have some thoughts please share it.
please help me. thanks.