I am coding an artificial intelligence program to solve the following problem:
There are k robots in different cells of an m*n grid. some of the cells of this grid are poisonous (and the robots know which cells are poisonous). In every step, each of these robots can move to one of 4 directions(if the target cell is not poisonous) or stay in its place. I want to find the minimum number of steps needed to gather all robots in one cell (it doesn't matter which cell).
I want to use a search algorithm to solve this problem(like A*), but I really do not know how to model my states and more important than that, how to find the children of each node. I mean I want to consider all of the possible grids that can be reached by one step as the children of some current state s, but I do not know what is a good way to model this in python and I hope I can get ideas in here...