Name:

Date:

 

 

Lab 3 - Learning Agents & Decision Trees I

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

Introduction

Worth

Due

Lab Steps

Part 1 - Introduction to Decision Trees

  1. Watch the following videos for more background on how Decision Trees are created and used:
  2. Briefly explain how you make use of decision trees in some way in your daily life:
     

Part 2 - Number Game

  1. Download the number guessing game (guess.py).
  2. Open it in the Python IDLE GUI, run it, and play it until you guess the number. Observe how it functions.
  3. Try editing the "guess.py" program by changing the value assigned to "maxNumber". Run it again and observe any differences.
  4. Play the game three more times with a medium (in the 1000s), large (in the 10000s) and very large (greater than 1,000,000) value for "maxNumber". For each, keep track of all of your guesses by writing them here.





















     
  5. How many guesses did you need to guess each number?


     
  6. What are the minimum and maximum number of guesses needed to guess the correct number? For maximum number, assume that the program doesn't stop you from guessing and you guess really poorly.


     
  7. What is the optimal (or best) strategy for guessing in this game, and what are the minimum, maximum and average number of guesses needed to guess the correct number in general terms for any range? HINT: These depend on how big the range of numbers is, so try to generalize for any range (let's call it "N").

Part 3 - Machine-Taught Decision Tree

  1. Play Akinator a couple of times. Write down your original guesses and observations about how Akinator did, and what problems it encountered (and why you think it had problems).









     
  2. Explore the data that Akinator provides for a guessing session on a session is complete, and explain in terms of Decision Trees how it determines what you are thinking of.









     
  3. Play Akinator again, and purposely try to stump it. Perform a search on Google to discover what you can about how Akinator works. Explain how you think Akinator uses Machine Learning to get better at guessing. Briefly state whether you think a decision tree would work for Akinator, and why or why not.

Part 4 - Evaluating Decision Trees

  1. Play the Number Game one more time. Before beginning, change maxNumber to 16. As you play, draw a branching, binary tree to graphically show the decisions you made along the way as you played the game. Label each branch in the tree with "too high" or "too low". Create branches and nodes for all possible guesses, not just the ones you make.
  2. Once the game is done, explain what your decision tree looks like. How many nodes are there in the whole tree? How "tall" is the tree counting the number of guesses needed from beginning until you have an answer?
  3. Comment on how this decision tree relates to the answer you gave above for Part 2, question 7.