James Madison University, Fall 2022 Semester
Lab01: Lightbot puzzle solving
Background
Lightbot is a puzzle game designed by Danny Yaroslavski while he was a CS major at the University of Waterloo. The goal of the game is to program a robot to walk around and light up all the blue tiles.
The latest version (see lightbot.com) has been redesigned for iOS and Android. It features a number of enhancements to the artwork and gameplay that make it more education oriented, easier to learn, and really fun to play.
Objectives
- Apply computing tools and techniques to solve problems at multiple levels of abstraction.
- Log onto a lab machine, answer questions using a plain text editor, and submit via Canvas.
Key Terms
- Procedure
- An established way of doing something. In Lightbot, the series of commands for P1 / P2 are defined in Proc1 / Proc2.
- Loop
- A sequence of commands that are specified once but carried out multiple times. In Lightbot, loops are designed with recursion.
- Recursion
- The process of repeating items in a self-similar way. In Lightbot, a procedure may refer to itself to repeat commands indefinitely.
Instructions
Click here to play Lightbot HoC (If the website is down, try the app instead: Android / iOS) |
Complete the Lightbot Code Hour, a free version consisting of 8 basic levels, 6 procedure levels, and 6 loop levels.
Download Lab01-Worksheet.txt and open/edit the file using a text editor (e.g., gedit, Code, Notepad++). Make sure you save this file as plain text; if you use Word, you'll need to "Save as" and change the type to "Plain Text". When you save your file, remember to append your name to the existing file name, e.g., simmonsjLab01-Worksheet.txt or shorten to simmonsjLab01.txt
Submit your completed worksheet via canvas.jmu.edu by Friday at 5pm.
As a final step for today's lab, take a few minutes and double check your Canvas account and notification preferences.
In Canvas, click the "Account" icon on the upper left, then click "Settings".
If you haven't done so already, please set up a profile picture of your choice.
If you'd like to receive text messages from Canvas, click "+ Contact Method" on the right.
Click "Notifications" on the left sidebar and verify what emails/texts you want to receive.