CPSCI 307-01: Evolutionary Computation

Homework 11

due: April 26, 2007


In-Class: Tuesday, April 24

For this assignment, you'll compile some software to further explore Learning Classifier Systems. The system you'll be using today is XCS+TS 1.2, written by Martin Butz when he was at the Illinois Genetic Algorithms Laboratory at the University of Illinois.

  1. Connect to holland and create a new directory in your home directory by issuing the command
         mkdir XCS
  2. Make XCS your working directory by issuing the command
         cd XCS
  3. Get the software by issuing the command
         tar -xvf /faculty/download/XCS1.2.tar
  4. The source code will be in the directory XCS1.2. Make it your working directory and compile the code by issuing the command
         make
  5. Here's the XCS+TS 1.2 documentation.

Homework

Apply XCS to the Woods1 multi-step environment, using Martin Butz's XCS+TS 1.2 software.

Before conducting your experiments, you'll need to modify the source code a bit.

  1. In the file xcs.c, find the function startExperiments. About two-thirds of the way through the function (line 155) you'll find a comment
        /* print sorted population */
    followed by three commented-out lines of code. Remove the comments from around the code. (This will make the system write out the final classifier population so you can inspect it.)
  2. In the file woodsEnv.h, the first #define entry (line 19) is for WOODS_LENGTH_OF_ONE_ATTRIBUTE. Modify the line so that it reads
        #define WOODS_LENGTH_OF_ONE_ATTRIBUTE 2
  3. Before recompiling the system, check the Makefile to be sure that the line setting the ENVIRONMENT variable reads
        ENVIRONMENT = woodsEnv
    If necessary, modify the line so that it reads as above.
  4. Recompile XCS by issuing the following commands at the bash prompt:
        make clean
        make

The Woods1 environment is located in a file in the Envs subdirectory of the directory containing the XCS system. To execute XCS on the environment, you need to pass it to the program when you invoke it:
    xcs1.2 Envs/Woods1.txt

(Note: if the working directory isn't in your PATH, don't forget to preface the name of the program with ‘./’ (without the quotes) so that bash knows to look for it in your working directory.)

The classifiers will be written to the bottom of the XCS_TEST.txt file at the end of the run. The condition of each classifier should be a 16-bit string representing eight attributes of the input space, ordered and coded as we discussed in class on Tuesday. The action is represented as an integer in the range 0..7, where 0 represents a move North, 1 Northeast, 2 East, ..., 6 West, 7 Northwest.

The top part of the XCS_TEST.txt file contains statistics generated during the run. To help you read it, take a look at this annotated XCS output file. (Note: the file has been abbreviated—your file will contain more lines of statistics, plus the classifiers.)

For this assignment, make the changes described above and run XCS on the Woods1 problem. Then take a look at your XCS_TEST.txt file and examine the classifiers you evolved. Pick 3-5 of them and describe in English the domain knowledge they encode. (That's what you'll hand in.)


[ Return to the CPSCI 307-01 homepage ]

Brian J. Rosmaita <contact me>
This page was last modified Tuesday, 24 April 2007 at 03:26 UTC.
Valid XHTML 1.0 ! Valid Cascading Style Sheets! This page is in AAA Conformance with the Web Content Accessibility Guidelines