Bryn Mawr College
CS 110: Introduction to Computing
Spring 2009
Course Materials
Prof. Deepak Kumar
General Information
Instructor: Deepak Kumar, 246 Park Hall, 526-7485
E-Mail: dkumar at cs brynmawr dot edu
WWW: http://cs.brynmawr.edu/~dkumar
Lecture Hours: Mondaya & Wednesdays, 1:00 p.m. to 2:30 p.m.
Room: Park 338
Lab: Fridays 10a to 12 noon |
|
Results of lottery: Click Here to see the final class list.
Laboratories:
- Computer Science Lab Room 231 (Science Building)
- You will also be able to use your own computer to do the labs for this course.
Lab Assistants: The following Lab assitants will be available during the week (names and schedules will be posted by the end of this week) for assistance on lab assignments.
- Emily Bushway: Tuesdays & Thursdays 10a to 12 noon
- Marissa Mocenigo: Tuesdays 8a to 10a and Sundays 8p to 10p (starting from the week of February 2)
- Rebecca Rebhuhn-Glanz: Mondays and Wednesdays 3p to 5p
- Melanie Shafer: Wednesdays 4p to 6p and Sundays 2p to 4p
- Leila Zilles: Mondays 11a to 1p and Thursdays 4p to 6p
These are the hours when the Lab will not be available: Mondays and Wednesdays 1-2:30p
CS110 Lab Schedule (RED means Lab is unavailable)
HOURS |
MONDAY |
TUESDAY |
WEDNESDAY |
THURSDAY |
FRIDAY |
SATURDAY |
SUNDAY |
8a |
|
MM (8-10) |
|
|
|
|
|
9a |
|
MM (8-10) |
|
|
|
|
|
10a |
|
EB (10-12) |
|
EB (10-12) |
DK (10-12) |
|
|
11a |
LZ (11-1) |
EB (10-12) |
|
EB (10-12) |
DK (10-12) |
|
|
12 |
LZ (11-1) |
|
|
|
|
|
|
1p |
|
|
|
|
|
|
|
2p |
|
|
|
|
|
|
MS (2-4) |
3p |
RRG (3-5) |
|
RRG (3-5) |
|
|
|
MS (2-4) |
4p |
RRG (3-5) |
|
RRg (3-5) MS (4-6) |
LZ, DX(4-6) |
|
|
|
5p |
|
|
MS (4-6) |
LZ, DX(4-6) |
|
|
|
6p |
|
|
|
|
|
|
|
7p |
|
|
|
|
|
|
|
8p |
|
|
|
|
|
|
MM (8-10) |
9p |
|
|
|
|
|
|
MM (8-10) |
EB (Emily Bushway), DK (Deepak Kumar), MM (Marissa Mocenigo),
RRG (Rebecca Rebhuhn-Glanz), MS (Melanie Shafer), DX (Dianna Xu), LZ (Leila Zilles)
For a printable version of this schedule click here.
Texts & Software
Learning Computing With Robots: by
Deepak Kumar, Institute for Personal Robots in Education (Fall 2008 Edition). Available at the Campus Bookstore.
Python Software + IDLE + Myro (This software is already installed in the Computer Science Lab). The software is also available for your own computer from the CD included in your text.
Scribbler Robot Kit: These will be handed out to you in Week#2.
|
|
Important Dates
January 21: First lecture
March 4: Exam 1
April 27: Last Lecture
April 29: Exam 2
Assignments+Robot Videos
- Assignment#1: (Due on Wednesday, february 4): Do the following exercises:
Chapter 1: Exercise 9 (Hand in the drawing)
Chapter 2: Exercise 2 (Hand in the written answer)
Chapter 2: Exercise 3 (Hand in the program as well as the drawing)
Chapter 2: Exercise 7 (Hand in the program). If possible, post a video of your robot's performance on YouTube (send link to me). You can use any music from an external source as background fo rthe dance. When posting on YouTube make sure you enter the tags "Bryn Mawr". "Scribbler robot", "CS110" to enable easy searches.
Videos: Lets Dance (Melanie & Rose), Kathleen's, Just Dance (Daniel) , Isabel's Scribbler Dance, Gabby's Shuffle, Be My Lover (Jason), Andrew's Dance,
- Extra Credit Assignment E1: (Due of Monday, February 9): Attend Prof. Bernard Chazelle's talk and write a short (3-4 page) essay/critique of it.
Prof. Bernard Chazelle (Princeton University) will be giving a talk this Friday, February 6, 4:00-6:00p
(Tea at 3:30p) in Room 338, Park Science Building. His talk should be of interest to all in this course and is titled, "What an iPod, a Flock of Birds, and Your DNA have in Common". This is part of the Fantastic lectures in Computer Science (see here for more details).
- Assignment#2 (Due on Monday, February 16): Write a program for your Scribbler to draw the bluetooth logo. Your program should include a function called, drawBTLogo(height), so that you can use it over and over again to draw logos of different sizes. Write a main program to use drawBTLogo to draw at least 3 logos (use a loop) of different sizes (say 5, 10 and 12 inches tall) on the same sheet of paper. In the spirit of Valentine's Day, can you write a program for your Scribbler to draw a heart? Alternately, write a program for your Scribbler to create some abstract art. Hand in the two programs, and sheets that show your robot's drawings. For the second program, try and be creative, include repetition, use different colors etc. HINT: For how to write general scribbler commands for turning a specific amount and traveling a specific distance, you may want to read the first 5 pages of Chapter 4.
- Assignment#3: (Due on Monday, February 23): Write Python programs to make the following population projections: (1) What will the US population be in the year 2050? (2) In which year will the US Population exceed 1/2 billion? (3) In which year will the US population double?
Write a separate program to answer each of the questions posed above. You may use the example program in Chapter 4 (page 90) as your starting template.
Your program should input the Current population, growth rate, and the current year (if needed), and any other input required to answer the questions. You can use the figure: 305,529,237 as the population of the United States on January 1, 2009. Use a growth rate of 0.9%. Additionally, show the outputs of all three programs if the growth rate changed to: 0.8% and 1.0%.
Hand in: A print out of the three programs, along with a print out showing the inputs and outputs from each program. Write a short (less than 1 page) essay on your experiences with this program describing what you learned, how you feel about the concepts you learned, and any known issue sthat you may have encountered along the way.
- Assignment#4: (Due on Wednesday, March 4): Implement Braitenberg vehicles 1, 2a, and 2b as discussed in Chapter 6 of your text. Additionally, implement any one of the suggested vehicles/robot applications from Chapter 6 (Choose from: Refrigerator detective, burglar alarm, Hallway cruiser, follower, Timid, Indecisive, Paranoid). Hand in all the programs you wrote. Also, write a short (1-page) essay on designing insect-like behaviors based on the robots you designed. Extra Credit: Make a video of your robot's behaviors and either send it to Deepak and/or post it on You Tube.
Videos: Jason,
Richard's Burglar Alarm, Kathleen, Gabby's Burglar Alarm,
- Extra Credit Assignment E2: (Due of Monday, March 23): Attend Prof. Jennifer Golbeck's talk and write a short (3-4 page) essay/critique of it. See below for details.
SPECIAL EVENT ON WED. March 18:
Fantastic Lectures in Computer Science presents
Prof. Jennifer Golbeck, University of Maryland
Computing with Social trust: Web Algorithms, Social networks, and Recommender Systems
Talk at 4:30p, Tea at 4:00p in KINSC H109 (Haverford College)
- Assignment#5: (Due on Monday, March 30): Click here for details.
- Assignment#6: (Due on Wednesday, April 8): Click here for details.
- Assignment#7: (Due on Wednesday, April 22): Click here for details.
How to Install Myro on your onw computer?
For MACOS users: Click Here.
For Windows XP users: Click Here.
For Windows Vista users: Click Here. Also, see the handout (click here) for establishing a Bluetooth connection.
Robot Videos and other demos from out there!
- SONY Robots dancing
- Another humanoid robot dance
- SONY Rolly Dance
- Dancing Penguin robots
- A Penguin robot (sort of dancing)
- Sync. Dance: Sarcoman Robot
- Keepon Dance
- A kid dancing with a robot
- A Robot Ballet (Nutcracker)
- Dabcing Vacuum Cleaner Robots
- Dancing Hexapod robots
- Robot Artist (3:21)
- Hektor: The graffitti drawing robot: Several videos
- AARON The Cybernetic Artist (visit the web page and even download a version for your computer)
- An interactive Scribbler
Lectures
- Week 1 (January 21)
January 21: First class meeting. Overview of the course. Introduction to computing and robots. Do the class questionnaire.
Read: Chapter 1 from your text.
Lecture Material: Click here for today's slides.
- Week 2 (January 26. 28)
January 26: Introduction to the Scribbler robot. How the computer talks to and controls the robot: Bluetooth wireless, computer, Python, Myro. Making the connection. Basic Scribbler commands: naming the robot, movements, etc.
Results of lottery: Click Here to see the final class list.
January 28: Today we will meet in the Lab (231). You will get your robot kits.
Assignment#1: (Due on Wednesday, february 4): Do the following exercises:
Chapter 1: Exercise 9 (Hand in the drawing)
Chapter 2: Exercise 2 (Hand in the written answer)
Chapter 2: Exercise 3 (Hand in the program as well as the drawing)
Chapter 2: Exercise 7 (Hand in the program). If possible, post a video of your robot's performance on YouTube (send link to me). You can use any music from an external source as background fo rthe dance. When posting on YouTube make sure you enter the tags "Bryn Mawr". "Scribbler robot", "CS110" to enable easy searches.
- Week 3 (February 2, 4)
February 2: Defining new commands. Saving your work in modules/files. Configuring your Python environment. Making your commands more general using parameters. Abstraction as a key idea in computing.
Read: Chapter 2 from your text.
Extra Credit Assignment E1: (Due of Monday, February 9): Attend Prof. Bernard Chazelle's talk and write a short (3-4 page) essay/critique of it.
Prof. Bernard Chazelle (Princeton University) will be giving a talk this Friday, February 6, 4:00-6:00p (Tea at 3:30p) in Room 338, Park Science Building. His talk should be of interest to all in this course and is titled, "What an iPod, a Flock of Birds, and Your DNA have in Common". This is part of the Fantastic lectures in Computer Science (see here for more details).
February 4: Robot dances. Doing simple computations: numbers (integers and floating point numbers), strings, expressions, operations, assignment, names and variables, computer precision and limits, print and speak commands.
Assignment#2 (Due on Monday, February 16): Write a program for your Scribbler to draw the bluetooth logo. Your program should include a function called, drawBTLogo(height), so that you can use it over and over again to draw logos of different sizes. Write a main program to use drawBTLogo to draw at least 3 logos (use a loop) of different sizes (say 5, 10 and 12 inches tall) on the same sheet of paper. In the spirit of Valentine's Day, can you write a program for your Scribbler to draw a heart? Alternately, write a program for your Scribbler to create some abstract art. Hand in the two programs, and sheets that show your robot's drawings. For the second program, try and be creative, include repetition, use different colors etc. HINT: For how to write general scribbler commands for turning a specific amount and traveling a specific distance, you may want to read the first 5 pages of Chapter 4.
- Week 4 (February 9, 11)
February 9: Structure of robot brains. A slightly formal introduction to Python syntax with an overview. World population projections: doing simple computations. Input in Python. Doing repetition.
Read: Chapter 3.
February 11: Repetition in Python: counting loops using range; repeating over a given amount of time. Sequences: first look. Doing population projections and drawing polygons with the Scribbler.
- Week 5 (February 16, 18)
February 16: Drawing Robots. Drawing polygons, random sized ones. Doing Repetition using while-loops; writing conditions. Sensing: propirioception and exteroception. Scribbler's internal senses: battery level, stall, and time.
Read: Chapter 4.
February 18 : Sensing: proprioception and extreoception; Scribbler sensors: time, stall, battery (proprioception); camera, light, proximity (exteroception). Commands for obtaining sensor values. Pictures: pixels, grayscale images, RGB images, saving pictures. Using sensor values to defined simple behaviors. Lists and list operations. Creating and saving animated gifs.
Read: Chapter 5.
Assignment#3: (Due on Monday, February 23): Write Python programs to make the following population projections: (1) What will the US population be in the year 2050? (2) In which year will the US Population exceed 1/2 billion? (3) In which year will the US population double?
Write a separate program to answer each of the questions posed above. You may use the example program in Chapter 4 (page 90) as your starting template.
Your program should input the Current population, growth rate, and the current year (if needed), and any other input required to answer the questions. You can use the figure: 305,529,237 as the population of the United States on January 1, 2009. Use a growth rate of 0.9%. Additionally, show the outputs of all three programs if the growth rate changed to: 0.8% and 1.0%.
Hand in: A print out of the three programs, along with a print out showing the inputs and outputs from each program. Write a short (less than 1 page) essay on your experiences with this program describing what you learned, how you feel about the concepts you learned, and any known issues that you may have encountered along the way.
- Week 6 (February 23, 25)
February 23: Review of Scribbler's sensing commands (takePicture, getIR, getLight). Making decisions using if-statements. Normalizing sensor values. Fundtionas that return values.
Read: Chapter 5.
- February 25: Braitenberg Vehicles. Designing robot behaviors. reactive Control of robots.
- Read: Chapter 6. Code for Alive (others are similar, use the text or your class notes)
Assignment#4: (Due on Wednesday, March 4): Implement Braitenberg vehicles 1, 2a, and 2b as discussed in Chapter 6 of your text. Additionally, implement any one of the suggested vehicles/robot applications from Chapter 6 (Choose from: Refrigerator detective, burglar alarm, Hallway cruiser, follower, Timid, Indecisive, Paranoid). Hand in all the programs you wrote. Also, write a short (1-page) essay on designing insect-like behaviors based on the robots you designed. Extra Credit: Make a video of your robot's behaviors and either send it to Deepak and/or post it on You Tube.
- Week 7 (March2, 4)
March 2: Today has been declared a Bad Weather Day due to the snowstorm. Campus bus services have been halted. Given that more than 1/3rd of our class is Haverford students and buses are not running the class is cancelled today. I will try and be in my office during class time in case any one wants to come and see me. The TA hours for today will be held as scheduled. The exam scheduled for wednesday is still ON. Also, there is no change in the deadline for Assignment#4 which is due on wed. Your graded Assignment#3 will be returned on Wed. Later this afternoon, I will also post a solution to that assignment. Look for a link here (below) this evening.
Sample solution to Assignment#3: Click Here
March 4: Exam 1 is today.
- Week 8 (March 11, 13)
No classes. Spring Break!
- Week 9 (March 16, 18)
March 16: Welcome back! Exam#1 Review. Review of Python and concepts covered so far. The Python math library. Using the math library.
Videos: Jason, Richard's Burglar Alarm, Kathleen, Gabby's Burglar Alarm,
Read: Chapter 7.
March 18: Computing car loan financing. Playing simple probabilistic games: Paper Scissors Rock.
Extra Credit Assignment E2: (Due of Monday, March 23): Attend Prof. Jennifer Golbeck's talk and write a short (3-4 page) essay/critique of it. See below for details.
SPECIAL EVENT ON WED. March 18:
Fantastic Lectures in Computer Science presents
Prof. Jennifer Golbeck, University of Maryland
Computing with Social trust: Web Algorithms, Social networks, and Recommender Systems
Talk at 4:30p, Tea at 4:00p in KINSC H109 (Haverford College)
Assignment#5: (Due on Monday, March 30): Click here for details.
- Week 10 (March 23, 25)
March 23: Paper, Scissors, Rock. Strategies for writing simple game playing programs. Doing Graphics: drawing simple shapes: points, line, circles, images, text, etc. Doing RGB colors.
Read: Chapter 8.
Program from class: psr.py
March 25: Drawing shapes (points, lines, circles, rectangles, ovals, polygons, text, images) and animating them.
- Week 11 (March 30, April 1 )
March 30: A slight diversion to discover the "logarithm"...and binary search. Image processing basics: creating, displaying, modifying, shrinking, enlarging, etc.
Read: Chapter 9
Assignment#6: (Due on Wednesday, April 8): Click here for details.
Assignment#7: (Due on Wednesday, April 22): Click here for details.
April 1 : Image Processing, contd.
- Week 12 (April 6, 8)
April 6 : Examples of image processing and animations. "Seeing" things: How to recognize and track a ball. The basics of sound (and music), quickly.
Here are some useful text functions you can use. Example:
t = Text(Point(200, 200), "Hello")
t.setFace("times roman")
t.setStyle("bold italic")
t.setSize(36)
...etc...
Text Methods
- Text(anchorPoint, string)
- Constructs a text object that displays the given string centered at anchorPoint. The text is displayed horizontally.
- setText(string)
- Sets the text of the object to string.
- getText()
- Returns the current string.
- getAnchor()
- Returns a clone of the anchor point.
- setFace(family)
- Changes the font face to the given family. Possible values are: 'helvetica', 'courier', 'times roman', and 'arial'.
- setSize(point)
- Changes the font size to the given point size. Sizes from 5 to 36 points are legal.
- setStyle(style)
- Changes font to the given style. Possible values are 'normal', 'bold', 'italic', and 'bold italic'.
- setTextColor(color)
- Sets the color of the text to color. Note: setFill has the same effect.
April 8 : Introduction to Artificial Intelligence. Writing game playing programs for two-person, zero-sum games: Tic-Tac-Toe.
Read: Chapter 10.
- Week 13 (April 13, 15)
April 13: Tic-Tac-Toe contd. Making the game smarter...first with simple state evaluations, then with lookahead. Complete implementation. A smarter Paper-Scissors-Rock using probalistic sampling.
Programs: ttt.py (the basic Tic-Tac-Toe game with random moves), tttEval.py (with evaluation), tttMiniMax.py (with lookahead)
Read: Chapter 10
April 15: Analysis of game playing programs. Designing algorithms in general.
Read: Chapter 11
- Week 14 (April 20, 22)
April 20: Algorithms, date computations, problem hierarchies.
April 22:
Demos of Assignment#7.
- Week 15 (April 27, April 29)
April 27: Course wrap up. Evaluations etc.
Read: Chapter 12
April 29: Exam 2 is today.
Grading
All graded work will receive a grade, 4.0, 3.7, 3.3, 3.0, 2.7, 2.3, 2.0, 1.7,
1.3, 1.0, or 0.0. At the end of the semester, final grades will be calculated
as a weighted average of all grades according to the following weights:
Exam 1: 20%
Exam 2: 25%
Labs & Written Work: 55%
Total: 100%
Links
Created on
January 14, 2009.