Home‎ > ‎CIS 98‎ > ‎

Lab 1: Welcome to MiddleEarth

The purpose of this lab is to program Frodo, an imaginary robotic Hobbit with a limited instruction set, to perform simple tasks.

You will need to log in to the opus.cis.cabrillo.edu server using Putty or Secure Shell (ssh). Instructions for how to login to Opus can be found on my help page here:

How to find your Username and Password:

How to login to Opus:
    http://www.lifealgorithmic.com/home/help#TOC-How-to-I-run-Linux-commands-on-Opus-

Problem Set

There are five exercises in the problem set; you will be creating a file for each program. Please name your files prog1.1
These five files should end up in a subdirectory of your home directory, called lab1.
  1. With Frodo in the initial position shown below, simulate the execution of the following program. Frodo's task is to find the ring, pick it up, and then turn himself off. Use the map below to determine the final situation and state whether an error occurs. If an execution or intent error does occur, rewrite the program to correct the problem.
    frodo -m map1.1
    # Beginning of Program
    move
    turnright
    turnright
    move
    turnright
    move
    turnright
    move
    pickring
    stop
    # End of Program

     

Turn In

When you are done with your programs, put them in a subdirectoy of your home directory, called lab1.
If you are not on the opus computer, but have an internet connection, you can secure copy your files to your home directory using scp:

scp program $LOGNAME@opus.cis.cabrillo.edu:lab1/

Grading Rubric

Each program is worth points which will be awarded if the execution of the program in the MiddleEarth simulator is successful and according to specification
  • 5 points for execution to completion
  • 5 points for desired outcome
  • 10 points for being turned in on time
Comments