I'm looking at playing with some basic robotics, I'm looking at building a simple bot that navigates around a room. The idea is that it would find edges and as it goes it would build up a map of the area.

Once that's done I'd like it to be able to walk methodically over the entire area to find any obstacles inside the area.

Does anyone know of algorithms that do this kind of thing?