COMP 5013X1/4923A1 Problem #4

crazymeasleAI and Robotics

Oct 15, 2013 (3 years and 8 months ago)

98 views

COMP 5013X1/4923A1


Problem #
4


Machine Learning with IDTs
-

Chapter 18, Slides and Handouts


The following challenge will test your knowledge of Chapter 1
8

and your ability to
collect training data using your LEGO Mindstorms Robot sensors and then
use
it

to
develop a Inductive Decision Tree machine learning algorithm to classify an object as
hostile or friendly.


The Challenge:

You must
:

(1)
collect data



develop a robot and autonomous software
system
that
captur
es object examples of
light sensor and ult
rasonic sensor data given a
hostile or friendly object, (2) learn


use the object examples
to develop an IDT model
that can accurately classi
fy such objects and (3) perform


develop

autonomous software
that uses the IDT model
to signal the classification

of an observed object
and fire a
projectile at a hostile object.


The Environment:


Objects will be placed
on a
dot on a table
that is
6 inches

from
your
robot
located
behind a
2

foot long
perimeter line
.

Each
object will remain stationary
during colle
ction of data.

Your robot
is allowed to
move

but it cannot come closer than
the perimeter line
. The perimeter line must always be between the object and your robot
.
You will be provided with
six
common
objects


3 friendly and 3 hostile.

The
environment a
nd the objects will be setup in the CAR 211 laboratory which will be left
open during regular Carnegie hours for the rest of the term.
You are to collect the
example data on you own (we will provide a brief demo)

between now and the testing
date.
Te
sting

will take place in the CAR 211 laboratory

so it would be best to collect
your data there as well.


The Performance:

Your robot and software will be tested in CAR 211. Each of the six
objects will be presented once
t
o the robot (in random order) as per t
he description in the
E
nvironment

section above
. The robot must signal the classification of the observed
object and fire a projectile if the object is considered hostile. The performance of your
robot will be based upon the overall accuracy of classifica
tion of the objects output at the
NXT display. Bonus points will be awarded for firing the projectile at a hostile object.


Hints on How to Proceed:


(1)

Data collection. You will have to design a robot and write a program that uses light
and ultrasonic se
nsors to collect data for several examples of each object. It is
important to capture several examples of each object as no two placements of the
object will be exactly the same. To signal that the object is hostile or friendly you
should use your touch

sensor. You will have to prepare your software such that it is
capable of collecting as many examples as you desire. In general, more examples

are

always better.

It
would be
wisest to
process you
record raw
sensor
data
into
examples before downloading

the values to
your laptop.

This will make it easier to
convert your robot software into a classification system in set (3).

(2)

Model Learning. You will have to download the example data to your laptop. Then
you will need a piec
e of software that can read t
his

data file and transform
it
into
input and classification values that are ready for the C4.5 IDT. To test your IDT you
should divide the data into a training set and a test set with a proportional number of
examples of each object in each set. Using C
4.5 on euler, use the training and test
sets to develop the best decision tree model that you can


best means how
accurately
it classifies
the test set

of examples
.
To build the best possible model, s
et up a matrix
of possible

c and

m parameters and de
termine the best values for each (see the C4.5
handout for details). We suggest

m range between 1 and 3 and

c range between 10
and 50, but feel free to try other values. Select what you feel is the best IDT

and print
it out.

(3)

P
erform
ance. The final st
ep is
to place your IDT model logic on the robot such that it
can classify a series of test objects. You should
modify your data collection software
such that
,

when requested (via button on the Brick or a touch sensor)
, it will collect
light and ultra
-
so
nic sensor data for an object and generate an object example. The
software should then push the example through the IDT model
embedded in the
software
and make the classification.


Marking Scheme:

Performance in Competition
-

25%

Report
-

75%

-

probl
em statement (5%)

-

requirements definition (10%)

-

system design description (35%)

-

implementation notes (5%)

-

testing method and the results of testing (20%)

Bonus points:

5% for correctly firing the projectile at a hostile object

10% for correctly fi
ring the projectile at a hostile object and hitting it