Presentation is loading. Please wait.

Presentation is loading. Please wait.

Roomba! Goal: whole-environment coverage Problem motivation

Similar presentations


Presentation on theme: "Roomba! Goal: whole-environment coverage Problem motivation"— Presentation transcript:

1 Roomba! Goal: whole-environment coverage Problem motivation
For starters, let me ask if anyone love vacuuming? I mean, really, really, love vacuuming? Most people would probably say that they don’t enjoy vacuuming because it’s a rather mundane, boring, and repetitive task. As you would agree, robots are great things to use for tasks that humans find boring or dangerous…and since vacuuming can be thought of as boring, why not use a robot to do it? The good folks at iRobot corporation developed and sold such a robot called Roomba. Roomba is a robotic vacuum cleaner that travels around your floor and navigates around obstacles such as chairs or other furniture, and covers the entire floor. Roomba knows when it touches a wall or something else that is blocking its path, and will change directions. Roomba pretty much uses this naïve approach: move forward in a straight line until either 1) you’ve gone too long in a straight line, meaning that you might be stuck, or 2) you’ve hit something which is blocking your path. Sometimes Roombas will “follow” a wall. Challenges Is this an easy problem? The sole fact that Roomba didn’t enter consumer market until mid 2000th , although people have been trying to create an autonomous vacuum since the 1960th, suggests that there might be some issues. Let’s think what makes a problem that is rather trivial for humans to be difficult for computers. The answer may lie in difference of human and Robot in that Robot does not see a global picture, it cannot rise and see the picture from above – in contrast to humans, who can more or less see the entire room. Robot needs to make decision based only on what they’re sensing at the moment Robot has no memory, and as a result, has no idea if it covered an area or not. It may need to re-cover the area Extensions This is an example “coverage” problem from the field of Robotics. You can think of other examples where this problem might arise-moving the lawn automatically, surveying the area for landmines, exploring distant planets 

2 Roomba Goal: whole-environment coverage with only local sensing…
Challenges: Can only sense it’s immediate surroundings – doesn’t see global picture Can't tell "vacuumed" from "unvacuumed" area – no memory Problem motivation For starters, let me ask if anyone love vacuuming? I mean, really, really, love vacuuming? Most people would probably say that they don’t enjoy vacuuming because it’s a rather mundane, boring, and repetitive task. As you would agree, robots are great things to use for tasks that humans find boring or dangerous…and since vacuuming can be thought of as boring, why not use a robot to do it? The good folks at iRobot corporation developed and sold such a robot called Roomba. Roomba is a robotic vacuum cleaner that travels around your floor and navigates around obstacles such as chairs or other furniture, and covers the entire floor. Roomba knows when it touches a wall or something else that is blocking its path, and will change directions. Roomba pretty much uses this naïve approach: move forward in a straight line until either 1) you’ve gone too long in a straight line, meaning that you might be stuck, or 2) you’ve hit something which is blocking your path. Sometimes Roombas will “follow” a wall. Challenges Is this an easy problem? The sole fact that Roomba didn’t enter consumer market until mid 2000th , although people have been trying to create an autonomous vacuum since the 1960th, suggests that there might be some issues. Let’s think what makes a problem that is rather trivial for humans to be difficult for computers. The answer may lie in difference of human and Robot in that Robot does not see a global picture, it cannot rise and see the picture from above – in contrast to humans, who can more or less see the entire room. Robot needs to make decision based only on what they’re sensing at the moment Robot has no memory, and as a result, has no idea if it covered an area or not. It may need to re-cover the area Extensions This is an example “coverage” problem from the field of Robotics. You can think of other examples where this problem might arise-moving the lawn automatically, surveying the area for landmines, exploring distant planets 

3 Roomba is a computer! We will use a special programming language that can instruct a computer similar to Roomba. This programming language contains instructions with the aforementioned challenges in mind. We call this special computer “Picobot.”

4 Another language? Really?
Picobot! Python General-purpose language you might see 50% by the end of the semester We are going to take another crash course in a system called Picobot, and it should hopefully be even more simple than writing your first game. Just to put it in perspective, we’ll have seen about half of Python’s functionality by the end of the semester, but we’ll learn all details of Picobot system in the first half of this class. You may wonder why we are taking this detour. Even though, as you can imagine, Picobot is a simple thing, it is a good example of computational system with many important features of a computer. So, by studying Picobot now, and a little more later in the course, we’ll get a better idea how computers perform their tasks. Secondly, Picobot system is background independent – will be equally challenging for complete beginners and people with some previous programming experience. Picobot Special-purpose language you'll see 100% by the end Of the lecture The Picobot simulator

5 Picobot! walls Picobot area not covered (yet!) area already covered
Picobot aim – 100% coverage Challenge: Local sensing – can not see an entire room at a glance like we can, only immediate surroundings It’s not very fancy, but it should be pretty easy to understand. The green square represents Picobot, the blue grid represents walls, and the white area represents areas Picobot hasn’t visited yet. As Picobot moves along, it leaves a trail of gray behind, that indicates clean areas. Goal: whole-environment coverage with only local sensing…

6 Surroundings are always in NEWS order.
Picobot can only sense things directly to the N, E, W, and S N W E S For example, here the surroundings are Recall that the Picobot has limited sensing. Picobot doesn’t know anything about the room it’s in. It knows only of what’s immediately around it to the North, East, South, and West (NEWS). Remember that acronym, since it will be useful in programming Picobot. NxWx N E W S Surroundings are always in NEWS order.

7 Surroundings are always in NEWS order.
What are these surroundings? Surroundings are always in NEWS order. N E W S NxWx xEWx NExS Now, draw surroundings for NxxS – (north and south shaded, east and west unshaded) And for xxWS – (west and south shaded)

8 Surroundings How many distinct surroundings are there? N W E S
Looking at the following diagram, how many distinct surrounding configurations are there for Picobot?

9 Surroundings How many distinct surroundings are there? N W E S 24
== 16 possible … There are 2^4=16 possible configurations. Which ones can appear in our current room (empty square) and which are the configurations that you can never be in? Now if the room has obstacles? Which configurations are possible? Which configurations you can never be in? xxxx Nxxx xExx xxWx xxxS NExx NxWx NxxS xEWx xExS xxWS NEWx NExS NxWS xEWS NEWS (won’t happen)

10 When I’m blocked like this,
Rules When I’m blocked like this, I want to move N I should move N. Picobot moves according to a set of rules: surroundings direction xxWS N If I see xxWS, Then I move North Note: X in direction means don’t move.

11 Asterisks * are wild cards. They match walls or empty space:
surroundings direction x*** N EWS may be wall or empty space N must be empty Wild stars? You should visit Alpha Centauri!

12 Rules I should move N. surroundings direction x*** N
As long as north isn’t blocked, go north I should move N. Asterisks * are wild cards. They match walls or empty space: surroundings direction x*** N If I see North is free (no matter what other walls there are) Then I move North Note: X in direction means don’t move.

13 What will this set of rules do to Picobot?
Picobot checks all of its rules. If it finds a matching rule, that rule runs. Model Only one rule is allowed per state and surroundings. What will this set of rules do to Picobot? surroundings direction x*** -> N N*** -> X "Move north until I can't" Nothing to the north? Then move north, and stay in state 0. Wall to the north? Then stop, stay in state 0 Note the wildcards How can we get back down the screen?

14 State in picobot State describes what it will do.
Picobot can have many rules (you decide!). "Moving East until I can't" Essentially, Picobot’s memory is a state—the context of the current situation that Picobot is in (i.e. I have a wall to the North but open space all around). All computers have state that represents what computation is currently occurring. All computers have state: The internal context of its computation. It represents what the computer is doing.

15 State I am in state 0. My surroundings are xxWS. We use a number to represent the state of picobot. (i.e., picobot has memory to store a single number) Picobot always starts in state 0. So, how do we use states? Well, we need a starting state, which we’ll call the initialization state, or State 0. Picobot always starts in state 0. We can set it to whatever we want. Here’s the trick: it doesn’t mean anything and until we give it meaning. We can make the following claim about Picobot: State and surroundings represents everything our little robot knows about its world Picobot state is extremely simple – a single number (0-99) Refrigerator story. By the way… I tell stories because it helps you REMEMBER. State and surroundings represent everything Picobot knows about the world

16 Rules Aha! I should move N. I should enter state 0.
I am in state 0. My surroundings are xxWS. Aha! I should move N. I should enter state 0. Picobot moves according to a set of rules: state surroundings direction new state xxWS N If I'm in state 0 seeing xxWS, Then I move North, and "change" to state 0. Note: X in direction means don’t move.

17 What will this set of rules do to Picobot?
Picobot checks all of its rules. If it finds a matching rule, that rule runs. Model Only one rule is allowed per state and surroundings. What will this set of rules do to Picobot? state surroundings direction new state x*** -> N N*** -> X "Move north until I can't" Nothing to the north? Then move north, and stay in state 0. Wall to the north? Then stop, stay in state 0 Note the wildcards How can we get back down the screen?

18 Ping-Pong Picobot Rules
Picobot checks all of its rules. If it finds a matching rule, that rule runs. Model Only one rule is allowed per state and surroundings. Ping-Pong Picobot Rules state surroundings direction new state x*** -> N N*** -> X 1 1 ***x -> S 1 1 ***S -> X

19 To do hw0, Problem #3 Write rules that will always cover this room.
For p3, move to one wall, and then just modify previous example to go back and forth, but moving one square For p4, think!!! You need a state that represents moving in all four directions. How? Or, what if you wrote a left-hand rule type of robot? your rules should work regardless of Picobot's starting location

20 To do hw0, Problem #4 Write rules that will always cover this room.
For p3, move to one wall, and then just modify previous example to go back and forth, but moving one square For p4, think!!! You need a state that represents moving in all four directions. How? Or, what if you wrote a left-hand rule type of robot? your rules should work regardless of Picobot's starting location

21 Tips for Picobot problems
Thinking about the CS questions before diving into the programming will help! Imagine you’re blindfolded in the room. How would you solve it? Solve it FIRST in English, then try to figure out the algorithm (don’t worry about code!). For each sentence in English, that might be a different state. If you find that rules conflict with each other, you might need a different state. How does Picobot know when to stop? i.e. how does in know that the whole area was covered?

22 CS ~ complexity science
Information is intrinsic to every system… How can we benefit from this information? “construct with” Representing it … Transforming it … Measuring it efficiently? effectively? possibly? How might we measure these rooms' complexity? CS as the study of complexity: the number of Picobot rules and the number of Picobot states are quantitative measures of complexity that students with no CS background at all intuitively grasp. CS as the study of computability: there are environments that Picobot provably cannot cover. We note this and point out how the computational model can be increased to handle such environments.

23 CS ~ complexity science
Information is intrinsic to every system… How can we benefit from this information? “construct with” Representing it … Transforming it … Measuring it efficiently? effectively? possibly? How might we measure these rooms' complexity? Am I doing this efficiently, or am I going over the same space more than once? - Is my solution effective? Am I really covering all the spaces? - Is it even possible to solve this using a list of rules? How many states and rules are necessary ? How much information does each room contain ? our best: 3 states, 6 rules our best: 4 states, 8 rules

24 CS ~ complexity science
Information is intrinsic to every system… How can we benefit from this information? “construct with” Representing it … Transforming it … Measuring it efficiently? effectively? possibly? How might we measure these rooms' complexity? How many states and rules are necessary ? How much information does each room contain ? As a file: ~5000 bytes As a file: ~20,000 bytes!


Download ppt "Roomba! Goal: whole-environment coverage Problem motivation"

Similar presentations


Ads by Google