James Madison University, Fall 2019 Semester
Lab12: Finch robot obstacle course
Background
And now, the culmination of all the programming you have learned in CS 101! The goal of today's lab is to design a production system using heuristics to guide a Finch robot through a small maze. Use this source code as a starting point for your solution:
Download: Lab12.zip Rename maze.py to username.py (replace with your e-ID) |
Bring your complete program ready to test on the robots! There will only be about 15 minutes at the beginning of the lab period to get things working. Refer to the Finch Tutorial as needed.
Objectives
Implement an algorithm that uses repetition and conditionals in a high-level language.
Collaborate with others to gain insight, interpret data, and solve problems using computation.
Part 1: Tournament
Your first task is to test out the program(s) that you and your lab partner brought with you today.
-
Throughout the lab, we will have a friendly competition. The winning robot must successfully navigate a small maze of 2x4's arranged on the floor.
-
Be sure to set the LED to a different color for each state of your program. This technique will make it a lot easier to debug your code.
-
Don't forget to program an ending sequence. For example, you may cover the light sensors by hand to instruct the Finch to terminate its control loop.
Your robot must be completely autonomous. The following rules will apply:
-
Once you start your program, you must let it run to completion.
-
You may NOT control your Finch interactively from the terminal.
-
You may NOT pick up and change the direction of your Finch.
-
You may however interact with the Finch using any of its sensors.
Part 2: Reflection
Create a plain text file named reflection.txt
and answer the
following questions.
-
What heuristics did you use in your solution? Why did you decide to use them instead of others?
-
Which strategies performed the best during the competition? What did you learn by participating?
-
Over the course of the semester, what gave you the most difficulty and how did you overcome it?
Don't forget to write your name at the top of the file!
Submission Instructions
Submit your username.py and reflection.txt files via canvas.jmu.edu by 11:59 PM today.