36
Sun., 12/6 – Interim milestones due The view from here… 11/30 12/2 12/7 computational models uncomputability "TheoComp" Fri., 12/11 – Final projects due Thu., 12/17 2pm – Exam option #1 12/9 - final CS 5 class meeting Fri., 12/18 2pm – Exam option #2 Exam #2 returned Extra-credit labs ~ circuits Sign up • Tuesday, 11/24 @ 10pm • Wednesday, 11/25 @ 1:15pm 2 labs, 25 points each Hw #11 due Tuesday Grutors available Tues. night in the LAC.

Sun., 12/6 – Interim milestones due

  • Upload
    loki

  • View
    44

  • Download
    2

Embed Size (px)

DESCRIPTION

The view from here…. Grutors available Tues. night in the LAC. Hw #11 due Tuesday. 11/30. 12/2. 12/7. "TheoComp". un computability. Exam #2 returned. computational models. Sun., 12/6 – Interim milestones due. 12/9 - final CS 5 class meeting. Extra-credit labs ~ circuits. - PowerPoint PPT Presentation

Citation preview

Page 1: Sun., 12/6 – Interim milestones  due

Sun., 12/6 – Interim milestones due

The view from here…

11/30 12/2 12/7

computational modelsuncomputability

"TheoComp"

Fri., 12/11 – Final projects due

Thu., 12/17 2pm – Exam option #1

12/9 - final CS 5 class meeting

Fri., 12/18 2pm – Exam option #2

Exam #2 returned

Extra-credit labs ~ circuits

Sign up

• Tuesday, 11/24 @ 10pm

• Wednesday, 11/25 @ 1:15pm

2 labs, 25 points each

Hw #11 due Tuesday Grutors available Tues. night in the LAC.

Page 2: Sun., 12/6 – Interim milestones  due

• All about the CS 5 Term Projects• Looking ahead to today's lab• A sneak peek at "December in CS 5"

CS 5 today…

pyRobotText Clouds

vPoolPicobot

I’ve got my eyes on some of these projects!

Eye'll bet!

if time…

Page 3: Sun., 12/6 – Interim milestones  due

Final projects

Final CS assignment

open-ended

comprehensive

Working solo or duo is OK

same projects for black/gold

Pairs need to share the work equally and together

several choices…

Eye, eye!

Page 4: Sun., 12/6 – Interim milestones  due

Hey! Watch where you're going!

The pyRobot project

Goal: get from Pt A to Pt B2d Roomba simulator

How do I control this robot !?!

Pt B

Pt A

Page 5: Sun., 12/6 – Interim milestones  due

The pyRobot project

Robot control continuously runs three things:

SENSE

[x,y,thd], bump = self.getData()

while True:

Page 6: Sun., 12/6 – Interim milestones  due

The pyRobot project

Robot control continuously runs three things:

SENSE PLAN

[x,y,thd], bump = self.getData()

if bump[0] == True or bump[1] == True: print 'BUMP!', print ' [Left bump sensor:', bump[0], '] ', print ' [Right bump sensor:', bump[1], '] ' robotTask = STOP

STOP is one of the robot's states. Every 40th of a second, the robot runs through this loop, sets the robot's state and sets the velocities accordingly. Don't sleep!

while True:

Page 7: Sun., 12/6 – Interim milestones  due

The pyRobot project

Robot control continuously runs three things:

SENSE PLAN ACT

[x,y,thd], bump = self.getData()

if bump[0] == True or bump[1] == True: print 'BUMP!', print ' [Left bump sensor:', bump[0], '] ', print ' [Right bump sensor:', bump[1], '] ' robotTask = STOP

STOP is one of the robot's states. Every 40th of a second, the robot runs through this loop, sets the robot's state and sets the velocities accordingly. Don't sleep!

if robotTask == STOP: self.setVels(0,0) robotTask = KBD

while True:

Page 8: Sun., 12/6 – Interim milestones  due

Maps are set at the very bottom of the main.py file:

Required

Extra

Page 9: Sun., 12/6 – Interim milestones  due

PicoRoomba!

The pyRobot project ~ additions

Goal: get from Pt A to Pt B

Start in an unknown location on the map…

Optional

Use only the bump sensors… (no range sensing)

Implement a niftier interface…

Use noisy (realistic) data

Main

vPython Roomba?

ASCII Roomba?

Page 10: Sun., 12/6 – Interim milestones  due

PicoRoomba!

The pyRobot project ~ additions

Goal: get from Pt A to Pt B

Start in an unknown location on the map…

vPython Roomba?

ASCII Roomba?Use only the bump sensors… (no range sensing)

Implement a niftier interface…

Try it out on a Roomba…

Use noisy (realistic) data

Optional

Main

Page 11: Sun., 12/6 – Interim milestones  due

Let’s play!

I’ll take your cue.

3d simulator, VPython

The vPool project

Page 12: Sun., 12/6 – Interim milestones  due

The vPool project

VPython?Easily installable for windows…

Also installable on the Mac…- it is on the Macs in the CS lab…

A simple example:

from visual import *

c = cylinder()What's visual?What's c?

at least it's not Visual C…

www.vpython.org

- Not really installable under Linux

Page 13: Sun., 12/6 – Interim milestones  due

The vPool project

from visual import *

floor = box( pos=(0,0,0), length=4, height=0.5, width=4, color=color.blue)

ball = sphere( pos=(0,4,0), radius=1, color=color.red)

ball.velocity = vector(0,-1,0)dt = 0.01

while True: rate(100) ball.pos = ball.pos + ball.velocity*dt

if ball.y < ball.radius: ball.velocity.y = -ball.velocity.y else: ball.velocity.y = ball.velocity.y - 9.8*dt

How many classes?How many objects?

data members?

What's the if/else

doing?

Page 14: Sun., 12/6 – Interim milestones  due

The vPool project

Phunky Fisicks is welcome!

Collisions with walls?

Collisions with other pool balls?

Pockets?

A few examples to get you thinking…

Linux users are welcome! But they should use another OS…

Page 15: Sun., 12/6 – Interim milestones  due

Picobot returns!

Page 16: Sun., 12/6 – Interim milestones  due

Picobot is a finite-state machine!

Basic idea: implement Picobot (the homework problem from Week 1)

Requirements:

The Picobot project

Text and graphical outputRead Picobot program from a fileRead maze description from a fileTrack visited/unvisited squaresProhibit illegal moves

Page 17: Sun., 12/6 – Interim milestones  due

Current State: 1Current Rule: 1 N*W* -> X 2

+++++++++++o++o+o++++oooooo ++++++o++ ++oooo+++++++++o ++oooo+++ +++++o++++++Rooo +++++++++++

The Picobot project

First, prototype it as ASCII-bot

Picobot started here…

and is now here…

Page 18: Sun., 12/6 – Interim milestones  due

• Text and graphical output• Read Picobot program from a file• Read maze description from a file• Track visited/unvisited squares• Prohibit illegal moves• Stop when maze completely visited

The Picobot project

Required capabilities:

Page 19: Sun., 12/6 – Interim milestones  due

The Picobot project

• Choice of graphical packages • vpython• turtle• csplot/csgrid (Game-of-Life)

• Start/stop/step feature• Maze editing• Pebble dropping• Be inventive!

csplot or csgrid version…Graphical picobot:

Lots of options…

Page 20: Sun., 12/6 – Interim milestones  due

Hey! Picobot in 3d…

Mine's going to be in 5d!

The Picobot project

Page 21: Sun., 12/6 – Interim milestones  due

Text Clouds project

tag cloud

Page 22: Sun., 12/6 – Interim milestones  due

Text Clouds project

text cloud

Summary of the words in a body of text, sized and painted according to their frequency.

this doesn't look nearly colorful enough…

Page 23: Sun., 12/6 – Interim milestones  due

Text Clouds project

From text…

… to cloud

1. Start with entered webpage (URL)

2. Read in text

3. Create list of words out of text

4. "Clean" the words

5. "Stem" the words

6. Count the words

7. Return a string with frequencies

8. Add advanced features…

Huh?

Page 24: Sun., 12/6 – Interim milestones  due

Text Clouds project

http://www.cs.hmc.edu/~cs5grad/cs5/textcloud/page1.html

Spamming spammers spammed spam. Spam spam spam! I love spam!

['spamming', 'spammers', spammed', 'spam.', 'spam', 'spam', 'spam!','I', 'love', 'spam!', 'page', '2']

Page 2

Page 25: Sun., 12/6 – Interim milestones  due

Text Clouds project

http://www.cs.hmc.edu/~cs5grad/cs5/textcloud/page1.html

Spamming spammers spammed spam. Spam spam spam! I love spam!

['spamming', 'spammers', spammed', 'spam', 'spam', 'spam', 'spam','love', 'spam', 'page', '2']

['spamming', 'spammers', spammed', 'spam.', 'spam', 'spam', 'spam!','I', 'love', 'spam!', 'page', '2']

Page 2

What changed here?

Page 26: Sun., 12/6 – Interim milestones  due

Text Clouds project

http://www.cs.hmc.edu/~cs5grad/cs5/textcloud/page1.html

Spamming spammers spammed spam. Spam spam spam! I love spam!

['spamming', 'spammers', spammed', 'spam', 'spam', 'spam', 'spam','love', 'spam', 'page', '2']

['spamming', 'spammers', spammed', 'spam.', 'spam', 'spam', 'spam!','I', 'love', 'spam!', 'page', '2']

['spam', 'spam', spam', 'spam', 'spam', 'spam', 'spam','love', 'spam', 'page', '2']

Page 2

What changed here?

What next?

Page 27: Sun., 12/6 – Interim milestones  due

Text Clouds project

Suggested Approach: Develop the basic application the usual way, using IDLE.

• Once you have everything working, transfer your files to your webspace. set up the HTML wrapper files & go…

Hypertext Markup Language

• Use the provided code to read HTML

• Personalize - There are lots of ways to do this!

• Once you have things working, move on to writing HTMLfollowing links beyond depth 1avoiding repeated links!

• Make sure that you can process the files appropriately into ordered lists of words…

Page 28: Sun., 12/6 – Interim milestones  due

Text-cloud historyhttp://chir.ag/phernalia/preztags/

Page 29: Sun., 12/6 – Interim milestones  due

What’s due?

Sun., 12/6 – Interim milestones due (11:59 pm)

milestone.txt milestone.py

Nice milestone!

It’s actually a kilometer stone.

– Name(s)– Project chosen– Your project description:What is your plan.What is your approach.A start at an implementation.

– Classes and functions– Docstrings– 60-80+ lines of working,

tested code

Page 30: Sun., 12/6 – Interim milestones  due

What’s due?

A final milestone?

Fri., 12/11 – Final deliverables due (by 5:00 pm)

final.txt final.py– Name(s)– Project chosen– Description of user interface:How do we run / play your project.What features did you implement.What was your approach & plan.

– Classes and functions with documentation/docstrings

– Working, tested code

Page 31: Sun., 12/6 – Interim milestones  due

CS 5 currency…

Final project: 1 Euro for each deadline

BOTH partners must have a Euro left.

Ask Prof. Kuenning about his Euro "buy-back" plan!

Page 32: Sun., 12/6 – Interim milestones  due

Later Labs…

December's labs are final-project based:

• optional, but helpful!

• a natural opportunity to work in a pair

• work on your laptop or the CS machines

• easy access to help

• unspeakably fun!

and some of the CS machines do need

work!

• HTML set up for the TextClouds project

Don't say it!

Page 33: Sun., 12/6 – Interim milestones  due

Lab today: User interfaces

No undo?

% ls

file1.txt file2.txt

file3.txt !

% rm *!

(long pause…)

The command-line

Page 34: Sun., 12/6 – Interim milestones  due

Command-line commands

Hey - that's me!

pwd

ls

cd

nano

cp

chmod

wc

prints the current directory

lists the current directory

changes directory

edits files

copies files

changes file permissions

counts the words, lines, and characters

Page 35: Sun., 12/6 – Interim milestones  due

Design for software and beyond

0. Conceptual models

1. Mapping

2. Visibility

3. Feedback

4. Affordances

Don Norman's key principles:

Page 36: Sun., 12/6 – Interim milestones  due

Where do these go wrong?Mapping

How to open this gas cap?

Visibility Feedback Affordances

This handle unfastens the seat from the floor. How to turn on this stove?

Set to 5 minutes?

Win NT Dialog