Robot Floor Cleaner Challenge free Lego NXT Mindstorms tutorial Challenge 50

 

 

Challenge 50 - A Robot Cleaner For All floors…

We found in Challenge 16 that a Robot can help us clean a floor - if the floor is the same shape as our test floor! However all floors are not the same shape. Can a robot help clean a floor when the robot does not know the shape of the floor beforehand?

One of the most successful applications of artificial intelligence in the home is the Roomba Robot cleaner shown below. You just switch on this robot, and walk away – it does the rest! It goes around the room cleaning as it goes, and when it reaches a wall or chair leg, it changes direction and continues cleaning. Can we teach our robot to behave like this?

Building Our Robot Cleaner.

You can use the Robot that you used for Challenge 16 as a start for building your Challenge 50 Robot. The test floor used in this challenge has a silver border around the edge of the floor, so you may need to attach a light sensor to your Robot so it can find the edge of the floor.

Our Robot Cleaner Challenge

The floor our robot has to clean can look something like this, which is the same as the test floor used for Challenge 16. However for Challenge 50, we will add an extra piece of floor like the smaller one shown below - this will be added to the edge of the bigger square, and we will not be told beforehand which side it will be added, so we will not know the shape of floor to be cleaned before we start our Robot cleaning.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

plus

 

 

 

 

Cleaning the Floor.

To completely clean the floor, your robot has to enter each of the 16 original squares plus the extra 4 squares, all in a forwards direction. The edge of the floor is marked by a tape that a light sensor can distinguish from the rest of the floor. Your robot starts from the lower right-hand corner of the floor.

Teaching your Robot Floor Cleaner.

It may be useful to have a think before you program your Robot Floor Cleaner. What is the easiest way to instruct your robot to clean? Is the easiest way the most efficient? Unlike Challenge 16, speed is interesting, but  getting some way to teach your robot to cover all the floor is the most important thing. Hint: Use of a "random" block like could be useful...

Competing?

If you wanted to have a competition, you could score a point for each square cleaned, with the quickest time being best if the cleaning scores are equal. When your robot is cleaning, it can be easy to forget which squares your robot has cleaned and which are still dirty; to help you remember which are which, you can get a score card that you can print from your web browser by clicking here.