CS != programming What is computer science (CS)? Take CS 121

Preview:

Citation preview

CS != programming

What is computer science (CS)?Take CS 121

CS != programming

What is computer science (CS)?Take EECS 101

"not equal to"

3

Programming

CS

a vehicle, not a destination

programming : CS ::

machining : engineering

grammar : literature

equations : mathematics

CS != programming

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?

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"

Information

What information does Google work with?What technical problems does Google face?

Information

What information does Facebook work with?What technical problems does Facebook face?

Information

What information does the iPhone work with?What technical problems does the iPhone face?

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

Homework problem

10

Picobot

area not covered

(yet!)

Picobotwalls

area already covered

Goal: whole-environment coverage with only local sensing…

inspiration?

Picobot

11

area not covered

(yet!)

Goal: whole-environment coverage with only local sensing…

area already covered

Picobotwalls

iRobot's Roomba vacuum

inspiration!

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.

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

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.

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.

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

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.

->

->

->

->

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

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

->

->

->

->

Ideas for the maze?

the maze