To learn computer science, first-year students program robots

Visitors entering the computer lab where Ramin Zabih teaches Computer Science 100R often must dodge little saucerlike robots wandering around the floor. These iRobots -- a modified version of the famous Roomba robot vacuum cleaner -- are controlled by radio signals from desktop computers programmed by first-year students who learn computer programming by dabbling in robotics and computer vision.

Robot programming and computer vision are not usually first-year material.

"We've scaled down the problems from Ph.D. level to freshman level for this course," Zabih explains. "Programs that interact with the world are much more appealing. Computer science is about much more than programming, and so is CS100R."

Every freshman in engineering and computer science is required to take a basic course in computer programming. The choices have been CS100J, which teaches the Java programming language, or CS100M, which teaches the Matlab language, widely used in engineering. Unfortunately, Zabih says, too many students think programming is boring, and therefore so is computer science.

CS100R, an honors version of CS100M open to all Cornell students, also uses the Matlab language. "It satisfies the College of Engineering requirement that students learn Matlab," Zabih says, "and beyond that we use it for some rather compelling applications."

Through most of the course, students work with the iRobots, which have been upgraded with cameras and additional processing power. Students must complete four exercises:

• Teach the robot to figure out the position of a bright red lightstick (a flashlight with a plastic extension, like the ones used to guide airliners around a field) and use the lightstick to guide the robot around the floor.

• Build a robot speedometer/accelerometer.

• Teach the robot to distinguish a red object from a blue one, by identifying Coke and Pepsi cans.

• Track a robot from an overhead camera and guide it through a maze.

The semester ends with an independent project Zabih assigns simply as "do something cool," usually using either the iRobots or Sony AIBO robot dogs. (The dogs are expensive and no longer manufactured, so they're kept on the shelf until needed.)

One student programmed three dogs to dance in unison. Another taught an iRobot to follow a "road" defined by white tape on the floor and respond to a traffic light: If the light was red, stop; green, go ahead; yellow, speed up. Others have taught robots to spell out words on the floor, chase each other around and play baseball. Some students have delved into computer vision without robots, programming desktop computers to change the screen display in response to a wave of the hand or to read Braille.

"The primary goal," Zabih says, "is to increase their skill in computer science by exposing students to a wide variety of problems where you have to interact with the physical world."

Creation of the course was supported by a grant from the Faculty Innovation in Teaching Program funded by the Office of the Provost, and by grants from Intel and Microsoft.

Media Contact

Media Relations Office