Final Projects vPool from here TextID E11 finale! IST 338 in - - PowerPoint PPT Presentation

final projects
SMART_READER_LITE
LIVE PREVIEW

Final Projects vPool from here TextID E11 finale! IST 338 in - - PowerPoint PPT Presentation

IST 338 in April big picture I've got all my CS Practice eyes on this view! Picobot The view Final Projects vPool from here TextID E11 finale! IST 338 in April big picture I've got all my CS in practice eyes on this view!


slide-1
SLIDE 1

I've got all my eyes on this view!

IST 338 in April – big picture

Final Projects

Picobot vPool TextID

CS Practice E11 finale!

The view from here…

slide-2
SLIDE 2

CS Foundations

robots and

  • ther fun

stuff (today…)

feature-based modeling + classification

  • graphics /

media / games ... is over here:

  • population

analysis + algorithms

I've got all my eyes on this view!

What can be computed... ... and how efficiently?

CS Applications CS 5 CS Theory

Final Projects

Picobot vPool TextID

CS in practice

The view from here…

IST 338 in April – big picture

slide-3
SLIDE 3

CS Foundations

robots and computer vision search and the web

  • graphics

media games ...

  • biological

analysis + algorithms

What can be computed... ... and how efficiently?

CS Applications CS 5 CS Theory

Final Projects

Picobot vPool TextClouds

CS5 in Dec. ~ Big picture

CS Foundations

slide-4
SLIDE 4

The next two weeks in IST338…

CS Foundations

(1) define "computer" precisely (2) define "compute" precisely (3) see what computers provably can't compute (4) go to step (1) and define things better… (5) … or, time will run out.

slide-5
SLIDE 5

Unifying idea: State

0 NEWx -> S 1

previous state next state next step external input

The state of a computation is all the internal information needed to take the next step

and for Picobot, next step is taken literally!

slide-6
SLIDE 6

states as subtasks

0 x*** -> N 0 0 N*** -> X 1 1 ***x -> S 1 1 ***S -> X 0

state pattern -> move new state

N*** x***

transitions move from state to state each circle represents a different robot state

starting funnel

state 0 state 1

the "go North" state the "go South" state

***S ***x

slide-7
SLIDE 7

Computation is a deliberate sequence of state-changes

01101101010 11010010001 01101101010 00000001110 bits before bits after

slide-8
SLIDE 8

A model of computation: FSM

Finite State Machine

s0 s1

start state accepting states transitions

  • “input funnel”

“where to go” double circled Example FSM

labeled by input !

Example input

100101

input sequence

read left-to-right

slide-9
SLIDE 9

FSM: Finite state machine

State 0

  • 0010111

another input sequence

What does each state MEAN ?

State 1

What does this FSM do overall?

  • always left-to-right
slide-10
SLIDE 10

JFLAP !

graphical state-machine builder for hw12

slide-11
SLIDE 11

Try it!

List three different inputs that this FSM accepts:

s0 s1

  • s2
  • List three different inputs that this FSM rejects:

In general, what English phrase describes the accepted inputs? What does each state say about the current state of the input?!?

s0 means… s1 means… s2 means…

This machine accepts strings that…

  • s3

s3 means…

Could you get the same behavior with fewer states? What's the minimum # possible? How do you know?

Hint: find a string that has to be in each state! Extra!

slide-12
SLIDE 12

Quiz!

List three different inputs that this FSM accepts:

s0 s1

  • s2
  • List three different inputs that this FSM rejects:

In general, what English phrase describes the accepted inputs? What does each state say about the current state of the input?!?

s0 means… s1 means… s2 means…

This machine accepts strings that…

  • s3

s3 means…

Could you get the same behavior with fewer states? What's the minimum # possible? How do you know?

Hint: find a string that has to be in each state! Extra!

  • Try this on the back page first…
slide-13
SLIDE 13

s0 s1

  • s2
  • s3
  • State ~ fate

Strings with different possible fates must be in different states. Can we find three strings – all with different possible fates? (4?) If so, then three states (or 4) are necessary! If not, fewer will be OK.

slide-14
SLIDE 14

Build-your-own FSMs

Minimum possible # of states?

Draw a FSM that accepts strings that don't contain the pattern 110 anywhere. Draw a FSM accepting strings in which the number of zeros (0s) is a multiple of 3, so there are 0, 3, 6, … zeros. 1s don't matter. Draw a FSM accepting strings in which the third digit (from the left) is a 1. Draw a FSM accepting strings whose third-to-last digit (from the right) is a 1.

Accepted: 110101110, 11, 0000010 Rejected: 101, 0000, 111011101111 Accepted: 1010001 Rejected: 11000100 and 11 Accepted: 0100 and 01101 Rejected: 101001 and 11

Hint: modify this starter FSM: Hint: modify the first FSM we considered!

Accepted: 1010001 Rejected: 101001100

Requires at least 4 states Minimum possible # of states? Minimum possible # of states?

slide-15
SLIDE 15

No occurrences of 110

Minimum number of states?

Draw a FSM accepting strings that do NOT anywhere contain the pattern 110

  • start

end w/1 end w/11 fail!

slide-16
SLIDE 16

No occurrences of 110?

Why doesn't this machine work?

  • Could we prove 4 states are required?
slide-17
SLIDE 17

Number of 0s is div. by 3

Draw a FSM accepting strings in which the number of zeros (0s) is a multiple of 3, so there are 0, 3, 6, … zeros. 1s don't matter. Accepted: 110101110, 11, 0000010 Rejected: 101, 0000, 111011101111

Minimum number of states?

slide-18
SLIDE 18

Third character is a 1

Minimum number of states?

Draw a FSM accepting strings in which the third digit (from the left) is a 1. Accepted: 1010001 Rejected: 11000100 and 11

slide-19
SLIDE 19

Third-to-last character is a 1?

Draw a FSM accepting strings whose third-to-last digit (from the right) is a 1.

Accepted: 0100 and 01101 Rejected: 101001 and 11

Minimum number of states?

slide-20
SLIDE 20

Third-to-last character is a 1?

Draw a FSM accepting strings whose third-to-last digit (from the right) is a 1.

Accepted: 0100 and 01101 Rejected: 101001 and 11

Minimum number of states?

slide-21
SLIDE 21

Third-to-last character is a 1

Proof that we need 15 states?

s∅ s0 s1 s11 s111 s10 s01 s00 s000 s001 s010 s011 s100 s101 s110

  • Something seems

missing here…

slide-22
SLIDE 22

Third-to-last character is a 1

The minimum possible number of states?

Draw a FSM accepting strings whose third-to-last digit (from the right) is a 1.

s∅ s0 s1 s11 s111 s10 s01 s00 s000 s001 s010 s011 s100 s101 s110

slide-23
SLIDE 23

Third-to-last character is a 1

s111 s000 s001 s010 s011 s100 s101 s110

8 states?

How could we prove that 8 states are required?

slide-24
SLIDE 24

FSMs are everywhere!

qstart q1 q2 q3 q4 q5 q12 q13 q14 q15 q23 q12,3 q12,4 q12,5 q12,5,34 Locks 12 5 34

slide-25
SLIDE 25

qstart q5 cents q10 cents q25 cents

penny, fifty cent piece, silver dollar, Canadian currency, Euro, ….

quarter dime nickel nickel

q15 cents q20 cents

nickel dime nickel

(some transitions not shown)

FSMs are everywhere!

mechanical vending machine nickel

slide-26
SLIDE 26

FSM ~ Game AI

The state-machine that controls Quake's Shambler monsters…

I'm Quaking in my AstroBoots

slide-27
SLIDE 27

Towel-folding states!

slide-28
SLIDE 28

All robots use FSM control

50x

slide-29
SLIDE 29

Towel- folding?

singled out as a questionable use of dollars...

slide-30
SLIDE 30

All robots use FSM control

… send me your FSM so that I can show it off in 2015!

slide-31
SLIDE 31

An autonomous vehicle's FSM

slide-32
SLIDE 32

FSMs driving robots...

MIT's car, Talos

slide-33
SLIDE 33

FSMs driving robots...

MIT's car, Talos - and its sensor suite

slide-34
SLIDE 34

State-machine limits?

Are there limits to what FSMs can do?

But are there any binary-string problems that FSMs can't solve?

they can't necessarily drive safely...

slide-35
SLIDE 35

State-machine limits?

Let's build a FSM that accepts bit strings with the SAME NUMBER of 0s as 1s

011001 01100 0110 01110

accepted rejected

10 0100 λ 000

this last string is empty

slide-36
SLIDE 36

State-machines are limited.

We need a more powerful model than FSMs...

FSMs can't count

at least not arbitrarily high...

What do we need to add?

slide-37
SLIDE 37

Next time: Turing Machines

state machines + memory!