Lab 3 - Learning Agents & Decision Trees I
Evolution and Learning in Computational and Robotic Agents
MSE 2400 Dr. Tom Way
Introduction
- In this lab project, you’ll explore how computational agents can learn
and express that learning in the form of a
Decision Tree. You
will experiment with existing software tools that rely on decision trees to
behave in an intelligent fashion, and through observation will gain a deeper
understanding of how such decision trees are formed. In a continuation of
this exploration, in the next lab will design a
decision tree of your own, first on paper and then using a software tool
specifically designed and provided for this lab. The overall goal for this lab
(and the next one) is to
gain a deeper understanding of the Machine Learning topic of Decision Trees
and to perform
science primarily using the
3rd Paradigm, but with the recognition of other paradigms of science
that might be in use, including the
4th Paradigm.
Worth
Due
- At the end of the lab session designated for this work, or at a
time mutually agreed to by you and the instructor.
Lab Steps
Part 1 - Introduction to Decision Trees
- Watch the following videos for more background on how Decision Trees are
created and used:
- Briefly explain how you make use of decision trees in some way in your
daily life:
Part 2 - Number Game
- Download the number guessing game (guess.py).
- Open it in the Python IDLE GUI, run it, and play it until you guess the
number.
Observe how it functions.
- Try editing the "guess.py" program by changing the value assigned to "maxNumber".
Run it again and observe any differences.
- 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.
- How many guesses did you need to guess each number?
- 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.
- 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
- 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).
- 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.
- 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
- 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.
- 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?
- Comment on how this decision tree relates to the answer you gave above
for Part 2, question 7.