skip to Main Content

I remember when I was in college we went over some problem where there was a smart agent that was on a grid of squares and it had to clean the squares. It was awarded points for cleaning. It also was deducted points for moving. It had to refuel every now and then and at the end it got a final score based on how many squares on the grid were dirty or clean.

I’m trying to study that problem since it was very interesting when I saw it in college, however I cannot find anything on wikipedia or anywhere online. Is there a specific name for that problem that you know about? Or maybe it was just something my teacher came up with for the class.

I’m searching for AI cleaning agent and similar things, but I don’t find anything. I don’t know, I’m thinking maybe it has some other name.

If you know where I can find more information about this problem I would appreciate it. Thanks.



  1. This problem reminds me of this. A similar problem is briefly mentioned in the book Complexity as an example of a genetic algorithm. These versions are simplified though, they don’t take into account fuel consumption.

    Login or Signup to reply.
  2. Perhaps a “stigmergy” approach is closely related to your problem. There is a starting point here, and you can find something by searching for “dead ants” and “robots” on google scholar.

    Basically: instead of modelling a precise strategy you work toward a probabilistic approach. Ants (probably) collect their deads by piling up according to a simple rule such as “if there is a pile of dead ants there, I bring this corpse hither; otherwise, I’ll make a new pile”. You can start by simplifying your ‘cleaning’ situation with that, and see where you go.

    Also, I think (another?) suitable approach could be modelled with a Genetic Algorithm using a carefully chosen combination of fitness functions such as:

    • the end number of ‘clean’ tiles
    • the number of steps made by the robot

    of course if the robots ‘dies’ out of starvation it automatically removes itself from the gene pool, a-la darwin awards 🙂

    You could start by modelling a very, very simple genotype that will be ‘computed’ into a behaviour. Consider using a simple GA such as this one by Inman Harvey, then to each gene assign either a part of the strategy, or a complete behaviour. E.g.: if gene A is turned to 1 then the robot will try to wander randomly; if gene B is also turned to 1, then it will give priority to self-charging unless there are dirty tiles at distance X. Or use floats and model probability. Your mileage may vary but I can assure it will be fun 🙂

    Login or Signup to reply.
  3. The problem is reminiscent of Shakey, although there’s cleaning involved (which is like the Roomba — a device that can also be programmed to perform these very tasks).

    If the “problem space” (or room) is small enough, you can solve for an optimal solution using a simple A*-based search, but likely it won’t be, since that won’t leave for very interesting problems.

    The machine learning approach suggested here using genetic algorithms is an interesting approach. Given the problem domain you would only have one “rule” (a move-to action, since clean could be eliminated by implicitly cleaning any square you move to that is dirty) so your learner would essentially be learning how to move around an environment. The problem there would be to build a learner that would be adaptable to any given floor plan, instead of just becoming proficient at cleaning a very specific space.

    Whatever approach you have, I’d also consider doing a further meta-reasoning step if the problem sets are big enough, and use a partition approach to divide the floor up into separate areas and then conquering them one at a time.

    Can you use techniques to create data to use “offline”? In that case, I’d even consider creating a “database” of optimal routes to take to clean certain floor spaces (1×1 up to, say, 5×5) that include all possible start and end squares. This is similar to “endgame databases” that game AIs use to effectively “solve” games once they reach a certain depth (c.f. Chinook).

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top