Picobot Challenge walls Picobot area not covered yet
Picobot Challenge! walls Picobot area not covered (yet!) Picobot inspiration? Goal: whole-environment coverage with only local sensing… area already covered
Picobot… walls Picobot area not covered (yet!) i. Robot's Roomba vacuum inspiration! Goal: whole-environment coverage with only local sensing… area already covered
Surroundings Picobot can only sense things directly to the N, E, W, and S N E W S For example, here its surroundings are Nx. Wx N E W S Surroundings are always in NEWS order.
Surroundings How many distinct surroundings are there? N E W S
Surroundings How many distinct surroundings are there? N E W S 24 == 16 possible … xxxx Nxxx x. Exx xx. Wx xxx. S NExx Nx. Wx x. Ex. S xx. WS NEWx NEx. S Nx. WS x. EWS Nxx. S NEWS (won’t happen)
State I am in state 0. My surroundings are xx. WS. Picobot's memory is a single number, called its state. State is the internal context of computation. Picobot always starts in state 0. State and surroundings represent everything the robot knows about the world
Rules I am in state 0. My surroundings are xx. WS. Aha! I should move N. I should enter state 0. Picobot moves according to a set of rules: state 0 surroundings xx. WS If I'm in state 0 seeing xx. WS, direction new state N 0 Then I move North, and change to state 0.
Wildcards I am in state 0. My surroundings are xx. WS. Aha! This matches x*** Asterisks * are wild cards. They match walls or empty space: state 0 surroundings x*** direction new state N 0 and EWS may be wall or empty space N must be empty
What will this set of rules do to Picobot? state surroundings 0 0 x*** N*** direction new state N X 0 0 -> -> how can we get back down the screen? Picobot checks its rules from the top each time. When it finds a matching rule, that rule runs. Only one rule is allowed per state and surroundings.
What will this set of rules do to Picobot? state surroundings 0 0 x*** N*** direction new state N X 0 0 -> -> how can we get back down the screen? Picobot checks its rules from the top each time. When it finds a matching rule, that rule runs. Only one rule is allowed per state and surroundings.
What will this set of rules do to Picobot? state surroundings 0 0 x*** N*** 1 1 ***x ***S direction new state -> -> N X 0 1 -> -> S X 1 0 Picobot checks its rules from the top each time. When it finds a matching rule, that rule runs. Only one rule is allowed per state and surroundings.
To do Write rules that will always cover these two rooms. (separate sets of rules are encouraged…) Challenge #1 Challenge #2 but your rules should work regardless of Picobot's starting location
Alter these "up & down" rules so that Picobot will traverse the empty room… Hints: add E or W somewhere… watch out for dead ends! the empty room
Ideas for the maze? the maze Hint: use the "right-hand-rule" !
Maze strategies? Right Hand Rule r u o " y p d e n e K t ha l, l h a g i r " the w ! t o n o cob Pi Why might this be difficult for Picobot?
Maze strategies? r u o " y p d e n e K t ha l, l h a g i r " the w ! t o n o cob Pi Right Hand Rule facing State 0 State 1 State 2 State 3 We'll need to use state to represent the direction Picobot is facing.
Suppose Picobot wants to traverse a maze with its right hand always on the wall. We use state 0 to represent that “Picobot is facing North” (A) Here is a single rule that tells Picobot: If you're facing N with a wall at right and space ahead then go forward” 0 x. E** -> N 0 0 (A) (B) Let's write a single rule that tells Picobot: “If you're facing North and lose the wall, then get over to the wall now!” 0 0 -> (B) (C) (for HW) Write 1 or 2 rules to tell Picobot to do the right thing if it hits a dead end. Repeat this IDEA for all four states, representing all four facing directions. 0 (C)
Suppose Picobot wants to traverse a maze with its right hand always on the wall. We use state 0 to represent that “Picobot is facing North” (A) Here is a single rule that tells Picobot: If you're facing N with a wall at right and space ahead then go forward” 0 x. E** -> N 0 0 (A) (B) Let's write a single rule that tells Picobot: “If you're facing North and lose the wall, then get over to the wall now!” 0 0 -> (B) (C) Write 1 or 2 rules to tell Picobot to do the right thing if it hits a dead end. Repeat this IDEA for all four states, representing all four facing directions. 0 (C)
Happy Picobotting!
- Slides: 21