15110 SUMMER SESSION ONE - 2013

Programming Assignment 1 - due Tuesday, May 21 at 10:30AM via ELECTRONIC HANDIN

We recommend that you either use the machines in the Gates-Hillman Cluster or remotely access unix.andrew.cmu.edu to do your assignments for this semester. If, however, you use programs installed on your own machine to do the assignments, please, be aware that the default text editor of your operating system may not do the "right thing". In particular, the TextEdit utility on MacOS does not produce plain text files by default. You will probably find it easiest to produce valid text files if you install the gedit program that we use in lab instead. It is available for Windows, Mac OS X, and Linux .

Light-Bot

For this assignment, you will play the Light-bot 2 game in order to solve five puzzles. In the Light-Bot game, puzzles are solved by programming the robot "Lightbot" so that when Lightbot is run, he lights up all of the pulsating blue tiles, turning them to yellow.

Light-Bot 2 contains a set of standard levels (puzzles) divided into four categories: basic, recursion, conditionals, and expert. If you have not already, you should go and play the first few levels in the basic, recursion, and conditionals categories of Light-Bot 2 before proceeding.

The Puzzles

Create a folder in your private workspace on andrew for pa1 (that's the lowercase letters p and a, followed by the number 1):

cd private
mkdir pa1

Solve each of the following puzzles and write your solution in the specified format. Make sure each file is stored as a plain text file with a ".txt" extension and placed in your pa1 folder.

  1. Play the first puzzle and write the solution in lb1.txt.

  2. Play the second puzzle and write the solution in lb2.txt.

  3. Play the third puzzle and write the solution in lb3.txt

  4. Play the fourth puzzle and write the solution in lb4.txt

  5. Play the fifth puzzle and write the solution in lb5.txt

Submit Your Assignment

Create a zip file called pa1.zip that contains the the text files with your solutions: lb1.txt, lb2.txt, lb3.txt, lb4.txt, and lb5.txt.

A simple way to do this in the terminal window on the Linux machines is to enter the following commands:

cd $HOME/private
zip -r pa1.zip pa1

(You will learn what the -r means in computations soon!)

Submit the zip file for grading using the handin instructions.