cs != programming what is computer science (cs)? take cs 121
TRANSCRIPT
![Page 1: CS != programming What is computer science (CS)? Take CS 121](https://reader031.vdocuments.net/reader031/viewer/2022032205/56649ea15503460f94ba53f1/html5/thumbnails/1.jpg)
CS != programming
What is computer science (CS)?Take CS 121
![Page 2: CS != programming What is computer science (CS)? Take CS 121](https://reader031.vdocuments.net/reader031/viewer/2022032205/56649ea15503460f94ba53f1/html5/thumbnails/2.jpg)
CS != programming
What is computer science (CS)?Take EECS 101
"not equal to"
![Page 3: CS != programming What is computer science (CS)? Take CS 121](https://reader031.vdocuments.net/reader031/viewer/2022032205/56649ea15503460f94ba53f1/html5/thumbnails/3.jpg)
3
Programming
CS
a vehicle, not a destination
programming : CS ::
machining : engineering
grammar : literature
equations : mathematics
CS != programming
![Page 4: CS != programming What is computer science (CS)? Take CS 121](https://reader031.vdocuments.net/reader031/viewer/2022032205/56649ea15503460f94ba53f1/html5/thumbnails/4.jpg)
CS == computing science
Study of complexity (or complex things?)
How can it be done?
How well can it be done?
Can it be done at all?
![Page 5: CS != programming What is computer science (CS)? Take CS 121](https://reader031.vdocuments.net/reader031/viewer/2022032205/56649ea15503460f94ba53f1/html5/thumbnails/5.jpg)
CS == computing science
Study of complexity (or complex things?)
How can it be done?
How well can it be done?
Can it be done at all?"equal to"
![Page 6: CS != programming What is computer science (CS)? Take CS 121](https://reader031.vdocuments.net/reader031/viewer/2022032205/56649ea15503460f94ba53f1/html5/thumbnails/6.jpg)
Information
What information does Google work with?What technical problems does Google face?
![Page 7: CS != programming What is computer science (CS)? Take CS 121](https://reader031.vdocuments.net/reader031/viewer/2022032205/56649ea15503460f94ba53f1/html5/thumbnails/7.jpg)
Information
What information does Facebook work with?What technical problems does Facebook face?
![Page 8: CS != programming What is computer science (CS)? Take CS 121](https://reader031.vdocuments.net/reader031/viewer/2022032205/56649ea15503460f94ba53f1/html5/thumbnails/8.jpg)
Information
What information does the iPhone work with?What technical problems does the iPhone face?
![Page 9: CS != programming What is computer science (CS)? Take CS 121](https://reader031.vdocuments.net/reader031/viewer/2022032205/56649ea15503460f94ba53f1/html5/thumbnails/9.jpg)
Computer Science and Information
Information is life’s fundamental building block
CS is a set of fundamental techniques for understanding and leveraging this information
9
![Page 10: CS != programming What is computer science (CS)? Take CS 121](https://reader031.vdocuments.net/reader031/viewer/2022032205/56649ea15503460f94ba53f1/html5/thumbnails/10.jpg)
Homework problem
10
Picobot
area not covered
(yet!)
Picobotwalls
area already covered
Goal: whole-environment coverage with only local sensing…
inspiration?
![Page 11: CS != programming What is computer science (CS)? Take CS 121](https://reader031.vdocuments.net/reader031/viewer/2022032205/56649ea15503460f94ba53f1/html5/thumbnails/11.jpg)
Picobot
11
area not covered
(yet!)
Goal: whole-environment coverage with only local sensing…
area already covered
Picobotwalls
iRobot's Roomba vacuum
inspiration!
![Page 12: CS != programming What is computer science (CS)? Take CS 121](https://reader031.vdocuments.net/reader031/viewer/2022032205/56649ea15503460f94ba53f1/html5/thumbnails/12.jpg)
Surroundings
12
N
W E
S
Picobot can only sense things directly to the N, E, W, and S
For example, here its surroundings are
NeWsN E W S
Surroundings are always in NEWS order.
![Page 13: CS != programming What is computer science (CS)? Take CS 121](https://reader031.vdocuments.net/reader031/viewer/2022032205/56649ea15503460f94ba53f1/html5/thumbnails/13.jpg)
How many distinct surroundings are there?
N
EW
S
news News nEws neWs newS NEws NeWs NewS
nEWs nEwS neWS NEWs NEwS NeWS nEWS NEWS(won’t happen)
== 16 possible …24
Surroundings
![Page 14: CS != programming What is computer science (CS)? Take CS 121](https://reader031.vdocuments.net/reader031/viewer/2022032205/56649ea15503460f94ba53f1/html5/thumbnails/14.jpg)
State
Picobot's memory is a single number, called its state.
State is the internal context of computation.
State and surroundings represent everything the robot knows about the world
Picobot always starts in state 0.
I am in state 0. My surroundings
Are neWS.
![Page 15: CS != programming What is computer science (CS)? Take CS 121](https://reader031.vdocuments.net/reader031/viewer/2022032205/56649ea15503460f94ba53f1/html5/thumbnails/15.jpg)
Rules
Picobot moves according to a set of rules:
state
I am in state 0. My surroundings
Are neWS.
surroundings
0 neWS 0N
direction new state
If I'm in state 0 seeing neWS,
Then I move North, and change to state 0.
Aha!I should move N.
I should enter state 0.
![Page 16: CS != programming What is computer science (CS)? Take CS 121](https://reader031.vdocuments.net/reader031/viewer/2022032205/56649ea15503460f94ba53f1/html5/thumbnails/16.jpg)
Wildcards
For a “wild card”, omit the letter and it will match walls or empty
space:
0 nW 0N
state surroundings direction new state
E/e and S/s omitted here, so those directions may be wall or empty space
I am in state 0. My surroundings
Are neWS.Aha! This matches nW
![Page 17: CS != programming What is computer science (CS)? Take CS 121](https://reader031.vdocuments.net/reader031/viewer/2022032205/56649ea15503460f94ba53f1/html5/thumbnails/17.jpg)
What will this set of rules do to Picobot?
0 n 0N
0 N 1X
1 s 1S
1 S 0X
state surroundings direction new state
Picobot checks its rules from the top each time.
Only one rule is allowed per state and surroundings.
When it finds a matching rule, that rule runs.
->
->
->
->
![Page 18: CS != programming What is computer science (CS)? Take CS 121](https://reader031.vdocuments.net/reader031/viewer/2022032205/56649ea15503460f94ba53f1/html5/thumbnails/18.jpg)
To do Write rules that will always cover these two rooms.(separate sets of rules are encouraged…)
but your rules should work regardless of Picobot's starting location
hw0, Map 0 hw0, Map 2
![Page 19: CS != programming What is computer science (CS)? Take CS 121](https://reader031.vdocuments.net/reader031/viewer/2022032205/56649ea15503460f94ba53f1/html5/thumbnails/19.jpg)
Alter these "up & down" rules so that Picobot will traverse the empty room…
the empty room
0 n 0N
0 N 1X
1 s 1S
1 S 0X
state surroundings direction new state
->
->
->
->
![Page 20: CS != programming What is computer science (CS)? Take CS 121](https://reader031.vdocuments.net/reader031/viewer/2022032205/56649ea15503460f94ba53f1/html5/thumbnails/20.jpg)
Ideas for the maze?
the maze