Name:

Date:

 

 

Lab 4 - Learning Agents & Decision Trees II

Evolution and Learning in Computational and Robotic Agents
MSE 2400   Dr. Tom Way

Introduction

Worth

Due

Lab Steps

Part 1 - Engineering a Decision Tree

  1. Refresh your memory of the game "Guess Who" (YouTube).

     
     

  2. Play the online version of Guess Who for a couple rounds to familiarize yourself with the game. Next, complete a decision table for the game. Using your game play experience and the decision table you completed, draw a diagram of a decision tree for playing the game. Then participate in a class discussion of decision tree design for Guess Who, and collect mental notes on general approaches that may help you in the next two steps. Think about whether or not you think "Guess Who" uses Machine Learning.

Part 2 - Playing with a Machine Learning Decision Tree

  1. Download and run the Animals Game program (animals-game.py). As you try the game, see if you can understand how to help it learn more animals. See what happens if you answer incorrectly or add bad information to it. How does it do?

  2. Jot down a few notes about how well you think the Animals Game does at learning, and also make a note of where you think it falls short of learning.









     

Part 3 - Creating a Decision Tree using Machine Learning

  1. Download the files for Guessing Brain (GuessingBrain.zip) and unzip them to a place where you can find them easily.
  2. Run "GuessingBrain.py" by loading and running it from IDLE or simply double-clicking on it.
  3. Explore the program by playing it, observing how it learns. Try loading and playing one or more of the existing "brain" files (guessing-teeth.brainguessing-fingers.brain, etc.). The program is pretty self-explanatory but feel free to ask Prof. Way if you have specific questions.
  4. As you play the game, you will be creating and using a decision tree. If you do not like the decision tree you have created, you can easily start over by finding the file "guessing-username.brain" and deleting it or renaming it.
  5. Once you have played the game for a little while and have something interesting to show, let one other student try it. Then, demonstrate your results to Prof. Way or the TA, and obtain his or her initials here: ____________

     
  6. Save your newly created "brain" by renaming the brain file from "guessing-username.brain" to something else that ends with ".brain", such as "guessing-celebrities.brain" or "what-color-are-my-eyes.brain" or something else indicative of the topic of your game.
  7. Troubleshooting tips for Mac: If the program has errors when you try to run it, try reinstalling Python. It is possible due to slight variations in versions of Python that it may have trouble loading the "brain" file, and reinstalling might fix the problem.

Part 4 - Building a Bigger Decision Tree

  1. Draw a decision tree (below) with at least 15 distinct answers. This step is important because it will make input of your tree into the brain program much easier.

  2. There is a working example of how to create the "Fingers Game" that includes all the steps needed and some tips for creating a decision tree "Guessing Brain" in a file called "Create Fingers Game.txt" that is in the Guessing Brain zip file.

  3. Implement the decision tree by running the program and carefully putting your decision tree into it. This may take a few attempts to get it just right.

  4. Demonstrate your results to at least one other student, and to the professor or TA.

  5. Email your resulting "brain" file to Prof. Way, leaving it with the default name of "guessing-username.brain".