COSC_4P82_Assignment_1/lib/lilgp/lilgpMonitor/docs/Manual.htm

428 lines
16 KiB
HTML

<HTML>
<HEAD>
<TITLE>lilgpMonitor User's Manual</TITLE>
</HEAD>
<BODY bgcolor="#dfdfdf">
<P>
<h1><I>lilgpMonitor</I> User's Manual</h1>
<P>
<h2>1.1 Introduction</h2>
<font size=3>
<I>lilgpMonitor</I> is a companion utility for <I>lil-gp</I> that
allows you to monitor the run-time progress of <I>lil-gp</I>
experiments. It provides you with a mechanism to easily plot various
genetic programming metrics such as mean standardized fitness, mean
tree size, etc. After selecting a <I>lil-gp</I> statistics file, you
may plot up to two curves on the same monitor using a variety of
scaling techniques and line styles. You also have the ability to plot
statistics for either the entire population or specific
sub-populations. Several monitors can be used to simultaneously
observe the trends of several genetic programming metrics. At the end
of the experiment, the graphs can be saved in a GIF format, allowing
them to be easily imported into word-processing documents.<BR>
<P>
If you are unfamiliar with genetic algorithms, genetic programming, or
<I>lil-gp</I>, then you should begin by reading the <I>lil-gp User's
Manual</I>.
<P>
</font>
<h3>1.1.1 Features</h3>
<font size=3>
<I>lilgpMonitor</I> features
include:
<UL>
<LI>Comparative Analysis: able to have several monitors open
simultaneously, each plotting up to two GP metrics
<LI>Useful: graphs can be exported as GIF files for easy import into
word processors
<LI>Timed updates: automatically re-reads statistics file and updates
graphs at regular intervals
<LI>Manual updates: can manually control graph updates
<LI>Intelligent scaling function: automatically calculates 'nice' tick
placements on the y-axis
<LI>User specified scales: accepts maximum y-axis values from user
<LI>Independent scale selection: plot metrics using independent scales
<LI>Dependent scale selection: plot metrics using the same scale
<LI>Sub-population support: Point and click selection of
sub-population statistics
<LI>Line styles: different line styles available
<LI>Help: linked to on-line help system
</UL>
<P>
</font>
<h3>1.1.2 Limitations</h3>
<font size=3>
<I>lilgpMonitor</I> is capable of plotting all of the statistics
generated by <I>lil-gp</I>, including the ability to plot statistics
for specific sub-populations. In that regard, there are no
limitations. However, there are limitations with respect to Java.
Unfortunately, Java is slow, executing at about 1/20<SUP>th</SUP> the
speed of compiled C code [Fla96]. This is especially evident when
reading large statistics files. For example, loading a file
containing statistics for a 50 generation experiment with 5
sub-populations takes approximately 15 seconds on a Sparc20 with 64Mb
RAM. There is hope; Sun claims that the performance of Java
byte-codes converted to machine code is nearly as fast as native C or
C++[Fla96].<BR>
<P>
The current version of <I>lilgpMonitor</I> does not perform any data
manipulation such as smoothing. As a result, data sets containing
localized spikes that are several orders of magnitude larger than the
average trend cause curves to appear 'flat' when plotted. However,
since the user has control over the maximum value for the y-axis,
there is some mechanism for producing useful information in these
cases. This may or may not be considered a limitation.
<P>
</font>
<h3>1.1.3 Author</h3>
<font size=3>
This software was written by Ryan Shoemaker under the direction of
Dr. William Punch. Other companion utilities for <I>lil-gp</I> have
been developed by Ryan Shoemaker and Dave Guyette as part of a joint
project. <BR>
<P>
Comments and suggestions may be sent to:
<P>
<blockquote>
<FONT SIZE=3 FACE="Courier New">
<a href="mailto:shoema16@cps.msu.edu">shoema16@cps.msu.edu</a><br>
<a href="mailto:punch@cps.msu.edu">punch@cps.msu.edu</a><BR>
<P>
Department of Computer Science<br>
3115 Engineering Building<br>
Michigan State University<br>
East Lansing, MI 48824<br>
USA<br>
</font>
</blockquote>
<P>
</font>
<h2>1.2 Getting Started </h2>
<font size=3>
When you unpack the distribution, you should get
this directory tree:
<P>
<pre>
<FONT SIZE=3 FACE="Courier New">
lilgpMonitor/
classes/ (byte-code files)
docs/ (documentation files)
images/ (image files used in documentation)
javadocs/ (source-code documentation files)
images/ (image files used in source-code documentation)
src/ (source-code files)
<BR>
</FONT>
</pre>
<P>
Before using <I>lilgpMonitor</I>, you must have Java JDK 1.02
installed on your system. To generate the <FONT SIZE=3 FACE="Courier
New">.class</FONT> files, change into the <FONT SIZE=3 FACE="Courier
New">lilgpMonitor/src</FONT> directory and type:
<P>
<FONT SIZE=3 FACE="Courier New">javac -d ../classes *.java</FONT>
<P>
To run <I>lilgpMonitor</I>, simply change into the <FONT SIZE=3
FACE="Courier New">lilgpMonitor/classes</FONT> directory and type:
<P>
<FONT SIZE=3 FACE="Courier New">java lilgpMonitor</FONT>
<P>
If you are running the utilities under Windows95/NT, you will have to
modify the paths in the above commands and also add the <FONT SIZE=3
FACE="Courier New">lilgpMonitor/classes</FONT> directory to your <FONT
SIZE=3 FACE="Courier New">CLASSPATH</FONT> <I>in place of</I> the dot
directory &quot;.&quot;.<BR>
<P>
This is version 1.0 of <I>lilgpMonitor</I>. Updates and information
related to <I>lilgpMonitor</I> can be found on the World Wide Web at
<FONT SIZE=3 FACE="Courier New"><a href="http://isl.cps.msu.edu">
http://isl.cps.msu.edu</a></FONT>.
<P>
</font>
<h2>1.3 The Main Window</h2>
<font size=3>
The only window in <I>lilgpMonitor</I> is shown in Figure 1. This
section will give a brief overview of the options available and the
next section will give detailed explanations of each feature.<BR>
<P>
<CENTER>
<img src="images/twoplot-ind.jpg"><p>
<strong>Figure 1 - The Main Window</strong><p>
</CENTER>
<P>
As you can see, there are four menus available in the menubar at the
top of the window. From the <I>File</I> menu, you may open a
statistics file, save your graph as a GIF file, create a new monitor,
close the current monitor, or close all monitors. From the
<I>Graph</I> menu, you may select a line style for the curves. The
<I>Update</I> menu has options for selecting either manual updates or
automatic timed updates. Finally, the <I>Help</I> menu provides
access to the on-line help system and also information about the
author and version of <I>lilgpMonitor</I> that you are using.<BR>
<P>
The actual graph sits in the middle of the window, with all of its
controls along the bottom. In Figure 1, there are two curves on the
graph, each with its own scale. The red scale appears on the left
axis, while the blue scale appears on the right axis. The various
controls on the bottom of the widow allow you to select a scale, the
maximum scale values, and the GP metrics and sub-populations you want
to plot.
<P>
</font>
<h2>1.4 Feature Descriptions</h2>
<font size=3>
The features listed in this section apply only to the monitor in which
you make the selection. For example, changing the automatic update
interval to five minutes in one monitor will have no impact on the
settings in any other monitors that are currently open or any monitors
that are opened at a later time.
<P>
</font>
<h3>1.4.1 The File Menu</h3>
<font size=3>
The <I>File</I> menu lets you perform file operations and
create/destroy monitors.<BR>
<UL>
<LI>Selecting <I>Open</I> causes a file dialog to appear. Simply
select the statistics file that you are interested in and it will be
opened.
<LI>Selecting <I>Save As</I> also causes a file dialog to appear.
Simply supply a file name and the graph will be converted into GIF
format and saved.
<LI>Selecting <I>New Viewer</I> will create a new statistics monitor
that contains all of the same features as the original monitor that
you opened.
<LI>Selecting <I>Close Viewer</I> will destroy the current monitor.
Any other monitors that are currently open will remain open.
<LI>Selecting <I>Exit All</I> will destroy all of the monitors that
are currently open.
</UL>
<P>
</font>
<h3>1.4.2 The Graph Menu</h3>
<font size=3>
The <I>Graph</I> menu lets you select the line style
you would like to apply to the curves.
<UL>
<LI>Selecting <I>Lines</I> will cause the curves to be plotted using
line segments to connect the data points, as shown in Figure 2.
<LI>Selecting <I>Lines + Points</I> will cause the curves to plotted
using line segments to connect the data points, but will also draw a
small diamond indicating the actual positions of the data points on
the curve, as shown in Figure 3.
</UL>
<P>
<CENTER>
<img src="images/lines.gif"><p>
<strong>Figure 2 - Lines</strong><p>
</CENTER>
<P>
<CENTER>
<img src="images/linespoints.gif"><p>
<strong>Figure 3 - Lines + Points</strong><p>
</CENTER>
<P>
</font>
<h3>1.4.3 The Update Menu</h3>
<font size=3>
The <I>Update</I> menu lets you select the timing of graph updates.
<UL>
<LI>Selecting <I>Manual Updates/Update Now</I> does two things.
First, is stops the automatic update timer if it is currently set.
Second, it reads the contents of the statistics file and refreshes the
graph immediately.
<LI>Selecting any of the update intervals sets the timer to update the
graph automatically. For example, selecting <I>5 Minutes</I> will
cause the monitor to re-read the statistics file and refresh the graph
every five minutes.
</UL>
<P>
</font>
<h3>1.4.4 The Help Menu</h3>
<font size=3>
<UL>
<LI>Selecting <I>Help</I> provides access to the on-line help system.
<LI>Selecting <I>About</I> provides information about the version of
lilgpMonitor that you are using.
</UL>
<P>
</font>
<h3>1.4.5 Selecting a Scale</h3>
<font size=3>
Below the graph, there are three boxes labeled '<I>Red Scale</I>',
'<I>Independent Scales</I>', and '<I>Blue Scale</I>.' These controls
allow you to choose which scales to use and specify maximum scale
values. <BR>
<P>
The default setting for the scale is <I>Independent</I>
A<I>utomatic</I> scaling. This means that <I>lilgpMonitor</I> will
examine the data set and determine the best scales to use when
plotting the curves. Figure 4 shows the result of using this
combination of settings. In this case, the red curve is plotted using
the scale on the left axis, while the blue curve is plotted using the
scale on the right axis. These curves are plotted using
<I>independent</I> scales. Since there are no values supplied in the
<I>y-max</I> fields, <I>lilgpMonitor</I> automatically selects values
that will allow the entire data set to be visible within the graph -
this is <I>automatic</I> scaling. These settings are useful when you
would like to view two GP metrics that are unrelated
(i.e. standardized fitness versus tree size).
<P>
<CENTER>
<img src="images/twoplot-ind.jpg"><p>
<strong>Figure 4 - Independent Autoscaling</strong><P>
</CENTER>
<P>
By clicking on either the '<I>red</I>' or '<I>blue</I>' checkboxes,
you will be selecting a <I>dependent</I> scaling mechanism with
<I>automatic</I> scaling. This means that <I>lilgpMonitor</I> will
apply the selected scale to both curves. Figure 5 shows the red scale
being applied to both curves, while Figure 6 shows the blue scale
being applied to both curves. These settings are useful when you
would like to compare two GP metrics that are related
(i.e. standardized fitness of sub-population 1 versus standardized
fitness of sub-population 2). Looking back at Figure 4, you can see
how it can be difficult to determine the relationship between two GP
metrics when using <I>Independent Autoscaling</I>. It isn't until you
examine Figure 5 where <I>Dependent Autoscaling</I> is used that you
can clearly see the relationship between the two curves. Since the
blue curve falls below the red curve in every generation, the red
curve is not visible when <I>Dependent Autoscaling</I> is set on the
blue curve in Figure 6.
<P>
<CENTER>
<img src="images/twoplot-red.jpg"><p>
<strong>Figure 5 - Red Dependent Autoscaling</strong><p>
</CENTER>
<P>
<CENTER>
<img src="images/twoplot-blue.jpg"><p>
<strong>Figure 6 - Blue Dependent Autoscaling</strong><p>
</CENTER>
<P>
By changing the values in the <I>y-max</I> fields, you are selecting
<I>manual</I> scaling. It is possible to have <I>manual</I> scaling
active for one curve and <I>automatic</I> scaling active for the other
curve by supplying a value for <I>y-max</I> in only one of the
textfields. It is important to understand that when you select
<I>manual</I> scaling, you are not actually specifying the scale of
the curve, <I>per se</I>, but rather the maximum value that will be
used to in determining the scale. For example, specifying a
<I>y-max</I> value of 0.5 for the red curve will cause it to truncate
the top of the tallest spikes as shown in Figure 7.
<P>
<CENTER>
<img src="images/twoplottrunc.jpg"><p>
<strong>Figure 7 - Independent Manual Scaling</strong><p>
</CENTER>
<P>
</font>
<h3>1.4.6 Selecting the GP Metrics</h3>
<font size=3>
Below the scale selection boxes, there are two pull-down list menus
that allow you to choose the GP metrics to display. The default
setting is <I>Gen Fitness - Mean</I> for the red curve and <I>None</I>
for the blue curve. Figure 8 outlines all of the available metrics
and their abbreviations. <BR>
<BR>
<center>
<TABLE BORDER=1>
<TR bgcolor="#aaaaff"><TD><CENTER>GP Metric</CENTER>
</TD><TD><CENTER>Abbreviation Used in <I>lilgpMonitor</I></CENTER>
</TD></TR>
<TR><TD>mean standardized fitness of generation</TD>
<TD>Gen Fitness - Mean</TD></TR>
<TR><TD>standardized fitness of best-of-generation individual
</TD><TD>Gen Fitness - Best</TD></TR>
<TR><TD>standardized fitness of worst-of-generation individual
</TD><TD>Gen Fitness - Worst</TD></TR>
<TR><TD>mean tree size of generation</TD><TD>Gen Tree Size - Mean
</TD></TR>
<TR><TD>mean tree depth of generation</TD><TD>Gen Tree Depth - Mean
</TD></TR>
<TR><TD>tree size of best-of-generation individual</TD>
<TD>Gen Tree Size - Best</TD></TR>
<TR><TD>tree depth of best-of-generation individual
</TD><TD>Gen Tree Depth - Best</TD></TR>
<TR><TD>tree size of worst-of-generation individual
</TD><TD>Gen Tree Size - Worst</TD></TR>
<TR><TD>tree depth of worst-of-generation individual
</TD><TD>Gen Tree Depth - Worst</TD></TR>
<TR><TD>mean standardized fitness of run</TD><TD>Fitness - Mean
</TD></TR>
<TR><TD>standardized fitness of best-of-run individual
</TD><TD>Fitness - Best</TD></TR>
<TR><TD>standardized fitness of worst-of-run individual
</TD><TD>Fitness - Worst</TD></TR>
<TR><TD>mean tree size of run</TD><TD>Tree Size - Mean
</TD></TR>
<TR><TD>mean tree depth of run</TD><TD>Tree Depth - Mean
</TD></TR>
<TR><TD>tree size of best-of-run individual</TD><TD>Tree Size - Best
</TD></TR>
<TR><TD>tree depth of best-of-run individual</TD><TD>Tree Depth - Best
</TD></TR>
<TR><TD>tree size of worst-of-run individual</TD><TD>Tree Size - Worst
</TD></TR>
<TR><TD>tree depth of worst-of-run individual</TD><TD>Tree Depth - Worst
</TD></TR>
</TABLE>
<p>
<strong>Figure 8 - Available GP Metrics</strong>
</CENTER>
</font>
<P>
<h3>1.4.7 Selecting the Sub-Populations</h3>
<font size=3>
Below the GP metric selection components, there are two list boxes
that allow you to select which sub-population you would like to
monitor. The default setting is to view the overall statistics.
Using these list boxes is more clumsy than it should be due to
bugs in Java's AWT event model. Unfortunately, on the x86 port
of Java, list selection events only occur if you double-click
on the list item. Even though selecting a list item with a single-click
<I>appears</I> to change the list selection, it does not generate
a list selection event, at least not on x86 machines. Therefore,
in an effort to remain consistent on every platform, you must
double-click the list items to select the sup-population. The
currently selected sub-population is preceded by an asterisk -
the sub-population that is obviously highlighted may not be the
sub-population that is actually being displayed in the graph.
Be careful!<BR>
</font>
</BODY>
</HTML>