![Page 1: Telling a robot how to behave Sanjeev Arora COS 116: Spring 2011](https://reader036.vdocument.in/reader036/viewer/2022062720/56649f165503460f94c2caf1/html5/thumbnails/1.jpg)
Telling a robot how to behave
Sanjeev AroraCOS 116: Spring 2011
![Page 2: Telling a robot how to behave Sanjeev Arora COS 116: Spring 2011](https://reader036.vdocument.in/reader036/viewer/2022062720/56649f165503460f94c2caf1/html5/thumbnails/2.jpg)
Today: Understanding a simple robot
Why?
• Larger goal: seek an answer to
“What is Computation?”
• Acquire insight into technology that will become pervasive within the next decade. Tangible example of “Breathing life into matter.”
• First encounter with many themes of the course.
![Page 3: Telling a robot how to behave Sanjeev Arora COS 116: Spring 2011](https://reader036.vdocument.in/reader036/viewer/2022062720/56649f165503460f94c2caf1/html5/thumbnails/3.jpg)
Robots in culture
![Page 4: Telling a robot how to behave Sanjeev Arora COS 116: Spring 2011](https://reader036.vdocument.in/reader036/viewer/2022062720/56649f165503460f94c2caf1/html5/thumbnails/4.jpg)
Real robots
![Page 5: Telling a robot how to behave Sanjeev Arora COS 116: Spring 2011](https://reader036.vdocument.in/reader036/viewer/2022062720/56649f165503460f94c2caf1/html5/thumbnails/5.jpg)
Discussion… Mars rover: what are the design principles?
![Page 6: Telling a robot how to behave Sanjeev Arora COS 116: Spring 2011](https://reader036.vdocument.in/reader036/viewer/2022062720/56649f165503460f94c2caf1/html5/thumbnails/6.jpg)
Definition of “Robot”:
A machine that can be programmed to interact with the physical environment in a desired way
Key word: programmedAs opposed to cars, televisions, which are
operated by people
![Page 7: Telling a robot how to behave Sanjeev Arora COS 116: Spring 2011](https://reader036.vdocument.in/reader036/viewer/2022062720/56649f165503460f94c2caf1/html5/thumbnails/7.jpg)
Components of a robot
Three stages:1. Sensors/Inputs: light, sound, motion...
2. Computing Hardware
3. Outputs/Actions: motors, lights, speakers…
![Page 8: Telling a robot how to behave Sanjeev Arora COS 116: Spring 2011](https://reader036.vdocument.in/reader036/viewer/2022062720/56649f165503460f94c2caf1/html5/thumbnails/8.jpg)
Our robot: Scribbler
Light outputs
Speaker
Light sensors
Obstacle sensor detector
Obstacle sensor emitter
Stall sensor
Line sensor (underneath)
Motor/wheels
Inputs Outputsbutton
![Page 9: Telling a robot how to behave Sanjeev Arora COS 116: Spring 2011](https://reader036.vdocument.in/reader036/viewer/2022062720/56649f165503460f94c2caf1/html5/thumbnails/9.jpg)
Scribbler inside
![Page 10: Telling a robot how to behave Sanjeev Arora COS 116: Spring 2011](https://reader036.vdocument.in/reader036/viewer/2022062720/56649f165503460f94c2caf1/html5/thumbnails/10.jpg)
Formal specification of actions
Fact of life in computing: hardware is “dumb”
Forces us to make nebulous concepts precise What is an obstacle? Language? Music? Intelligence?
Running themes: What is machine “intelligence”? Are there limits?
![Page 11: Telling a robot how to behave Sanjeev Arora COS 116: Spring 2011](https://reader036.vdocument.in/reader036/viewer/2022062720/56649f165503460f94c2caf1/html5/thumbnails/11.jpg)
Controlling Scribbler: Give it a “Program”
“Simple instruction”
![Page 12: Telling a robot how to behave Sanjeev Arora COS 116: Spring 2011](https://reader036.vdocument.in/reader036/viewer/2022062720/56649f165503460f94c2caf1/html5/thumbnails/12.jpg)
“Compound” instructions
If <condition> then … else …. Do for … times …;
Do while ….Do while not …
![Page 13: Telling a robot how to behave Sanjeev Arora COS 116: Spring 2011](https://reader036.vdocument.in/reader036/viewer/2022062720/56649f165503460f94c2caf1/html5/thumbnails/13.jpg)
Always remember… (esp. for Scribbler labs):
Microprocessor can do one thing at a time
Very fast -- 20 million operations per second!
Complicated idea usually requires compound instruction.
![Page 14: Telling a robot how to behave Sanjeev Arora COS 116: Spring 2011](https://reader036.vdocument.in/reader036/viewer/2022062720/56649f165503460f94c2caf1/html5/thumbnails/14.jpg)
Semantics of “Do While..”; a discussion
![Page 15: Telling a robot how to behave Sanjeev Arora COS 116: Spring 2011](https://reader036.vdocument.in/reader036/viewer/2022062720/56649f165503460f94c2caf1/html5/thumbnails/15.jpg)
Why programmable?
Benefits of a programmable device:FlexibleMulti-useUniversal
vs
![Page 16: Telling a robot how to behave Sanjeev Arora COS 116: Spring 2011](https://reader036.vdocument.in/reader036/viewer/2022062720/56649f165503460f94c2caf1/html5/thumbnails/16.jpg)
Example 1: As a burglar alarm
If beam interrupted…
Beep!
![Page 17: Telling a robot how to behave Sanjeev Arora COS 116: Spring 2011](https://reader036.vdocument.in/reader036/viewer/2022062720/56649f165503460f94c2caf1/html5/thumbnails/17.jpg)
Example 2: As an artiste
![Page 18: Telling a robot how to behave Sanjeev Arora COS 116: Spring 2011](https://reader036.vdocument.in/reader036/viewer/2022062720/56649f165503460f94c2caf1/html5/thumbnails/18.jpg)
Interesting note: Scribbler is even more “stupid” than you think
GOTO Main
SenseObs: FREQOUT ObsTxLeft, 1, 38500 IF (ObsRx = 0) THEN object_left = 1 ELSE object_left = 0 LOW ObsTxLeft FREQOUT ObsTxRight, 1, 38500 IF (ObsRx = 0) THEN object_right = 1 ELSE object_right = 0 LOW ObsTxRight RETURN
SenseLine: HIGH LineEnable line_right = LineRight line_left = LineLeft LOW LineEnable
Do forever{ Move Forward for 1s Move back for 1s}END
=
3 pages of stuff like
“Translator” written by Rajesh Poddar ‘08
![Page 19: Telling a robot how to behave Sanjeev Arora COS 116: Spring 2011](https://reader036.vdocument.in/reader036/viewer/2022062720/56649f165503460f94c2caf1/html5/thumbnails/19.jpg)
Where are things going?
“Small cleaning agents” – Brooks
![Page 20: Telling a robot how to behave Sanjeev Arora COS 116: Spring 2011](https://reader036.vdocument.in/reader036/viewer/2022062720/56649f165503460f94c2caf1/html5/thumbnails/20.jpg)
Where are things going?
DARPA Grand Challenge ($2 M prize):
132 mile race in the desert
No human control!
5 teams, Stanford won in ~7 hours
![Page 21: Telling a robot how to behave Sanjeev Arora COS 116: Spring 2011](https://reader036.vdocument.in/reader036/viewer/2022062720/56649f165503460f94c2caf1/html5/thumbnails/21.jpg)
The Princeton Entry
Undergraduate Project; reached the finals
![Page 22: Telling a robot how to behave Sanjeev Arora COS 116: Spring 2011](https://reader036.vdocument.in/reader036/viewer/2022062720/56649f165503460f94c2caf1/html5/thumbnails/22.jpg)
Where are we going?
![Page 23: Telling a robot how to behave Sanjeev Arora COS 116: Spring 2011](https://reader036.vdocument.in/reader036/viewer/2022062720/56649f165503460f94c2caf1/html5/thumbnails/23.jpg)
Where are things going?
Automated highways
Being actively researched
(From Minority Report)
![Page 24: Telling a robot how to behave Sanjeev Arora COS 116: Spring 2011](https://reader036.vdocument.in/reader036/viewer/2022062720/56649f165503460f94c2caf1/html5/thumbnails/24.jpg)
What is going inside us?
“Da Vinci” Robotic surgery system
More precise, though often still controlled by human
![Page 25: Telling a robot how to behave Sanjeev Arora COS 116: Spring 2011](https://reader036.vdocument.in/reader036/viewer/2022062720/56649f165503460f94c2caf1/html5/thumbnails/25.jpg)
Why are multi-purpose robotsso hard to build? Need precise instruments that act like:
eyes, ears, hands, fingers, … Need smart ways (“algorithms”) to use
sensor data (ex: human eyesight vs. high-res camera)
![Page 26: Telling a robot how to behave Sanjeev Arora COS 116: Spring 2011](https://reader036.vdocument.in/reader036/viewer/2022062720/56649f165503460f94c2caf1/html5/thumbnails/26.jpg)
This week’s lab: Web 2.0(Take-home lab – posted on course web page.)
This week’s reading:Brooks pp 12-21, pp 32-51.
REMINDERS