Professional Documents
Culture Documents
Picobot Programming
Picobot Programming
Mon: CS +
programming
Tue: Data
Wed: Algorithms
All together?
Mon: CS +
programming
Tue: Data
Wed: Algorithms
All together?
Picobot
Picobot
Another language?
Python
Scratch
Picobot
General-purpose
language
General-purpose
language
Special-purpose
language
you might
see 5% by
the end of a
less
of its libraries!
semester
you might
see 50% by
the end of a
semester
self-contained
but not simplistic
Picobot?
An extreme close-up
of Picobot in action...
walls
Picobot
area not
covered
(yet!)
inspiration?
Goal: whole-environment coverage
only local sensing
area
already
covered
with
Picobot's
inspiration
walls
area not
covered
(yet!)
Picobot
area
already
covered
with
Surroundings
Picobot can only sense things
directly to the N, E, W, and S
N
E
W
S
Nx
N E W
Wx
S
Surroundings are
always in NEWS order
and always 4 letters
Surroundings are
always in NEWS order
and always 4 letters
N E W
S
Nx
Wx
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
xExx
xxWx
xxxS
NExx
NxWx
xEWx
xExS
xxWS
NEWx
NExS
NxWS
xEWS
NxxS
NEWS
(wont happen)
State
I am in state 0.
My surroundings
are xxWS.
Rules
I am in state 0.
My surroundings
are xxWS.
surroundings
xxWS
direction
new state
Rules
I am in state 0.
My surroundings
are xxWS.
Aha!
I should move N.
I should enter state 0.
surroundings
xxWS
If I'm in state 0
seeing xxWS,
direction
new state
Wildcards
I am in state 0.
My surroundings
are xxWS.
Aha!
This matches
the
surroundings
x***
state
0
surroundings
x***
N must be empty
direction
new state
(A) What is a program that sends Picobot to the North (top) of the
empty room ?
state
surroundings
direction
new state
(A) What is a program that sends Picobot to the North (top) of the
empty room ?
state
0
0
surroundings
x***
N***
->
->
direction
new state
N
X
0
1
1
1
***x
***S
Model
->
->
S
X
1
0
(D) And continue?
Thought experiment 1
Create a program that will initially get
picobot to the SOUTHEAST corner of the
empty room.
Thought experiment 2
Create a program that will get picobot to
the COMPLETELY COVER the empty
room.
com
!
e
t
e
pl
Thought experiment 3
Algorithm:
States:
(A)
(B)
(C) Write 1-2 rules to tell Picobot to do the right thing if it hits
a dead end.
(C)
Try it!
www.cs.hmc.edu/picobot
Seventyyearsago,in1940,apopular
sciencemagazinepublishedashort
articlethatsetinmotiononeofthe
trendiestintellectualfadsofthe20th
century.Atfirstglance,thereseemed
littleaboutthearticletoaugurits
subsequentcelebrity.Neitherthe
title,ScienceandLinguistics,nor
themagazine,M.I.T.sTechnology
Review,wasmostpeoplesideaof
glamour.Andtheauthor,achemical
engineerwhoworkedforan
insurancecompanyandmoonlighted
asananthropologylectureratYale
University,wasanunlikelycandidate
forinternationalsuperstardom.And
yetBenjaminLeeWhorfletloosean
alluringideaaboutlanguagespower
overthemind,andhisstirringprose
seducedawholegenerationinto
believingthatourmothertongue
restrictswhatweareabletothink.
and I thought my
language was
alien!
Seventyyearsago,in1940,apopular
sciencemagazinepublishedashort
articlethatsetinmotiononeofthe
trendiestintellectualfadsofthe20th
century.Atfirstglance,thereseemed
littleaboutthearticletoaugurits
subsequentcelebrity.Neitherthe
title,ScienceandLinguistics,nor
themagazine,M.I.T.sTechnology
Review,wasmostpeoplesideaof
glamour.Andtheauthor,achemical
engineerwhoworkedforan
insurancecompanyandmoonlighted
asananthropologylectureratYale
University,wasanunlikelycandidate
forinternationalsuperstardom.And
yetBenjaminLeeWhorfletloosean
alluringideaaboutlanguagespower
overthemind,andhisstirringprose
seducedawholegenerationinto
believingthatourmothertongue
restrictswhatweareabletothink.