<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Tue Apr 03 19:26:34 CDT 2001 -->
<TITLE>
: Class  GeneticAlgorithm
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="GeneticAlgorithm.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
net.openai.ai.ga</FONT>
<BR>
Class  GeneticAlgorithm</H2>
<PRE>
java.lang.Object
  |
  +--<B>net.openai.ai.ga.GeneticAlgorithm</B>
</PRE>
<HR>
<DL>
<DT>public class <B>GeneticAlgorithm</B><DT>extends java.lang.Object</DL>

<P>
GeneticAlgorithm is the top-level class for the Genetic Algorithm Java
 implementation of the Spinning Logic AI Toolkit. It provides the handling
 of multiple worlds (isolated genetic algorithm implementations) and making
 the algorithms run.
<P>
<DL>
<DT><B>Since: </B><DD>JDK1.3</DD>
</DL>
<HR>

<P>
<!-- ======== INNER CLASS SUMMARY ======== -->


<!-- =========== FIELD SUMMARY =========== -->


<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../net/openai/ai/ga/GeneticAlgorithm.html#GeneticAlgorithm()">GeneticAlgorithm</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initializes the GeneticAlgorithm with an <code>ArrayList</code></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../net/openai/ai/ga/GeneticAlgorithm.html#GeneticAlgorithm(java.util.Collection)">GeneticAlgorithm</A></B>(java.util.Collection&nbsp;initialCollection)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initializes the GeneticAlgorithm with the specified <code>
 Collection</code></TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/openai/ai/ga/GeneticAlgorithm.html#addWorld(net.openai.ai.ga.world.World)">addWorld</A></B>(<A HREF="../../../../net/openai/ai/ga/world/World.html">World</A>&nbsp;toAdd)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a given World onto the end of all the worlds in this
 Genetic Algorithm.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/openai/ai/ga/GeneticAlgorithm.html#cleanse()">cleanse</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes non-<code>World</code> objects from the <code>Collection
 </code></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/openai/ai/ga/GeneticAlgorithm.html#getDebug()">getDebug</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/openai/ai/ga/GeneticAlgorithm.html#getNumberOfWorlds()">getNumberOfWorlds</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of <code>World</code>s stored in this <code>
 GeneticAlgorithm</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../net/openai/ai/ga/world/World.html">World</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/openai/ai/ga/GeneticAlgorithm.html#getWorld(java.lang.String)">getWorld</A></B>(java.lang.String&nbsp;name)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves a World from the list with a given name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../net/openai/ai/ga/world/World.html">World</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/openai/ai/ga/GeneticAlgorithm.html#getWorldArray()">getWorldArray</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves a World[] copy of all the World's in this GeneticAlgorithm.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Iterator</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/openai/ai/ga/GeneticAlgorithm.html#getWorldIterator()">getWorldIterator</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return an <code>Iterator</code> to use to go through all the <code>
 World</code>s in this <code>GeneticAlgorithm</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/openai/ai/ga/GeneticAlgorithm.html#getWorldNames()">getWorldNames</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves a World from the list with a given name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Collection</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/openai/ai/ga/GeneticAlgorithm.html#getWorlds()">getWorlds</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves the <code>Collection</code> that holds this collection's
 <code>World</code> objects</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/openai/ai/ga/GeneticAlgorithm.html#iterateAllWorlds()">iterateAllWorlds</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tells all World's in this GeneticAlgorithm to iterate through one
 generation.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/openai/ai/ga/GeneticAlgorithm.html#iterateAllWorlds(int, boolean)">iterateAllWorlds</A></B>(int&nbsp;reps,
                 boolean&nbsp;iterateParallel)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tells all World's in this GeneticAlgorithm to iterate through multiple
 generations.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/openai/ai/ga/GeneticAlgorithm.html#iterateWorld(java.lang.String)">iterateWorld</A></B>(java.lang.String&nbsp;name)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tells a World with a given name to iterate through one generation.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/openai/ai/ga/GeneticAlgorithm.html#iterateWorld(java.lang.String, int)">iterateWorld</A></B>(java.lang.String&nbsp;name,
             int&nbsp;reps)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tells a World to iterate through multiple generations.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/openai/ai/ga/GeneticAlgorithm.html#iterateWorld(net.openai.ai.ga.world.World)">iterateWorld</A></B>(<A HREF="../../../../net/openai/ai/ga/world/World.html">World</A>&nbsp;toIterate)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tells a World to iterate through one generation.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/openai/ai/ga/GeneticAlgorithm.html#iterateWorld(net.openai.ai.ga.world.World, int)">iterateWorld</A></B>(<A HREF="../../../../net/openai/ai/ga/world/World.html">World</A>&nbsp;toIterate,
             int&nbsp;reps)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tells a World to iterate through multiple generations.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/openai/ai/ga/GeneticAlgorithm.html#removeAllWorlds(java.lang.String)">removeAllWorlds</A></B>(java.lang.String&nbsp;name)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes all World's with the given name out of this GeneticAlgorithm.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/openai/ai/ga/GeneticAlgorithm.html#removeWorld(java.lang.String)">removeWorld</A></B>(java.lang.String&nbsp;name)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes a World with the given name out of this GeneticAlgorithm.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/openai/ai/ga/GeneticAlgorithm.html#removeWorld(net.openai.ai.ga.world.World)">removeWorld</A></B>(<A HREF="../../../../net/openai/ai/ga/world/World.html">World</A>&nbsp;toRemove)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes a given World out of this GeneticAlgorithm.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/openai/ai/ga/GeneticAlgorithm.html#toString()">toString</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Calls every <code>World<code>'s <code>toString()</code> method and
 returns a concatenation of all the <code>String</code>s returned.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->


<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="GeneticAlgorithm()"><!-- --></A><H3>
GeneticAlgorithm</H3>
<PRE>
public <B>GeneticAlgorithm</B>()</PRE>
<DL>
<DD>Initializes the GeneticAlgorithm with an <code>ArrayList</code></DL>
<HR>

<A NAME="GeneticAlgorithm(java.util.Collection)"><!-- --></A><H3>
GeneticAlgorithm</H3>
<PRE>
public <B>GeneticAlgorithm</B>(java.util.Collection&nbsp;initialCollection)</PRE>
<DL>
<DD>Initializes the GeneticAlgorithm with the specified <code>
 Collection</code></DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="addWorld(net.openai.ai.ga.world.World)"><!-- --></A><H3>
addWorld</H3>
<PRE>
public void <B>addWorld</B>(<A HREF="../../../../net/openai/ai/ga/world/World.html">World</A>&nbsp;toAdd)</PRE>
<DL>
<DD>Adds a given World onto the end of all the worlds in this
 Genetic Algorithm.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>toAdd</CODE> - a World to be added into this GeneticAlgorithm</DL>
</DD>
</DL>
<HR>

<A NAME="removeWorld(net.openai.ai.ga.world.World)"><!-- --></A><H3>
removeWorld</H3>
<PRE>
public boolean <B>removeWorld</B>(<A HREF="../../../../net/openai/ai/ga/world/World.html">World</A>&nbsp;toRemove)</PRE>
<DL>
<DD>Removes a given World out of this GeneticAlgorithm. Returns true
 when it can successfully remove the given World. When multiple copies
 of the given World exist, only the first instance is deleted. This
 method does not throw an IndexOutOfBoundsException.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>toRemove</CODE> - a World to be deleted from this GeneticAlgorithm<DT><B>Returns:</B><DD><code>true</code> if the World has been found and
                  deleted<br>
                  <code>false</code> otherwise</DL>
</DD>
</DL>
<HR>

<A NAME="removeWorld(java.lang.String)"><!-- --></A><H3>
removeWorld</H3>
<PRE>
public boolean <B>removeWorld</B>(java.lang.String&nbsp;name)</PRE>
<DL>
<DD>Removes a World with the given name out of this GeneticAlgorithm.
 Returns true when it can successfully remove the given World. When
 multiple copies of the given World exist, only the first instance is
 deleted. This method does not throw an IndexOutOfBoundsException. This
 method uses getWorld(String) to find the given World.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - a String specifying the name of the world to be deleted<DT><B>Returns:</B><DD><code>true</code> if the World has been found and
                  deleted<br>
                  <code>false</code> otherwise</DL>
</DD>
</DL>
<HR>

<A NAME="removeAllWorlds(java.lang.String)"><!-- --></A><H3>
removeAllWorlds</H3>
<PRE>
public void <B>removeAllWorlds</B>(java.lang.String&nbsp;name)</PRE>
<DL>
<DD>Removes all World's with the given name out of this GeneticAlgorithm.
 This method does not throw an IndexOutOfBoundsException. This
 method uses removeWorld(String) to delete all World's with the given
 name and keeps calling until removeWorld(String) returns false. Does
 not return a value.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - a String specifying the name of the world to be deleted</DL>
</DD>
</DL>
<HR>

<A NAME="getWorld(java.lang.String)"><!-- --></A><H3>
getWorld</H3>
<PRE>
public <A HREF="../../../../net/openai/ai/ga/world/World.html">World</A> <B>getWorld</B>(java.lang.String&nbsp;name)</PRE>
<DL>
<DD>Retrieves a World from the list with a given name. Iterates through
 all the World's in this GeneticAlgorithm until one is found that has
 the given name. Returns the World when one is found; returns null when
 the search is unsuccessful.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - a String specifying the name of the world to be returned<DT><B>Returns:</B><DD><code>Object</code> when a match is found<br>
                  <code>null</code> when no match can be found</DL>
</DD>
</DL>
<HR>

<A NAME="getWorldNames()"><!-- --></A><H3>
getWorldNames</H3>
<PRE>
public java.lang.String[] <B>getWorldNames</B>()</PRE>
<DL>
<DD>Retrieves a World from the list with a given name. Iterates through
 all the World's in this GeneticAlgorithm until one is found that has
 the given name. Returns the World when one is found; returns null when
 the search is unsuccessful.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - a String specifying the name of the world to be returned<DT><B>Returns:</B><DD><code>Object</code> when a match is found<br>
                  <code>null</code> when no match can be found</DL>
</DD>
</DL>
<HR>

<A NAME="getWorldArray()"><!-- --></A><H3>
getWorldArray</H3>
<PRE>
public <A HREF="../../../../net/openai/ai/ga/world/World.html">World</A>[] <B>getWorldArray</B>()</PRE>
<DL>
<DD>Retrieves a World[] copy of all the World's in this GeneticAlgorithm.
 The order is not guaranteed to be consistant on every call.<DD><DL>
<DT><B>Returns:</B><DD><code>World[]</code> of all the World objects</DL>
</DD>
</DL>
<HR>

<A NAME="getWorlds()"><!-- --></A><H3>
getWorlds</H3>
<PRE>
public java.util.Collection <B>getWorlds</B>()</PRE>
<DL>
<DD>Retrieves the <code>Collection</code> that holds this collection's
 <code>World</code> objects<DD><DL>
<DT><B>Returns:</B><DD><code>Collection</code> of all the World objects</DL>
</DD>
</DL>
<HR>

<A NAME="iterateWorld(java.lang.String)"><!-- --></A><H3>
iterateWorld</H3>
<PRE>
public void <B>iterateWorld</B>(java.lang.String&nbsp;name)</PRE>
<DL>
<DD>Tells a World with a given name to iterate through one generation. Uses
 getWorld(String) to find the World with the given name and calls that
 World's iterate() function.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - a String specifying the name of the world to iterate()</DL>
</DD>
</DL>
<HR>

<A NAME="iterateWorld(net.openai.ai.ga.world.World)"><!-- --></A><H3>
iterateWorld</H3>
<PRE>
public void <B>iterateWorld</B>(<A HREF="../../../../net/openai/ai/ga/world/World.html">World</A>&nbsp;toIterate)</PRE>
<DL>
<DD>Tells a World to iterate through one generation. Equilivant to calling
 the iterate() function of the given World. Throws an exception when
 the World does not belong to its collection.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>toIterate</CODE> - a World to iterate<DT><B>Throws:</B><DD><CODE>java.util.NoSuchElementException</CODE> - thrown if the specified <code>World</code>
          does not belong to this <code>GeneticAlgorithm</code></DL>
</DD>
</DL>
<HR>

<A NAME="iterateWorld(java.lang.String, int)"><!-- --></A><H3>
iterateWorld</H3>
<PRE>
public void <B>iterateWorld</B>(java.lang.String&nbsp;name,
                         int&nbsp;reps)</PRE>
<DL>
<DD>Tells a World to iterate through multiple generations. Calls
 getWorld(name) to retrieve the World from the collection and then
 calls the iterate() function on it a given number of times. Does not
 iterate when called with a non-positive number. Does no iterations
 when no world with the given name can be found.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - a String specifying a world to iterate<DD><CODE>reps</CODE> - the number of times to iterate</DL>
</DD>
</DL>
<HR>

<A NAME="iterateWorld(net.openai.ai.ga.world.World, int)"><!-- --></A><H3>
iterateWorld</H3>
<PRE>
public void <B>iterateWorld</B>(<A HREF="../../../../net/openai/ai/ga/world/World.html">World</A>&nbsp;toIterate,
                         int&nbsp;reps)</PRE>
<DL>
<DD>Tells a World to iterate through multiple generations. Calls
 getWorld(name) to retrieve the World from the collection and then
 calls the iterate() function on it a given number of times. Does not
 iterate when called with a non-positive number. Throws an exception
 when the World does not belong to its collection.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>toIterate</CODE> - the <code>World</code> to iterate<DD><CODE>reps</CODE> - the number of times to iterate<DT><B>Throws:</B><DD><CODE>java.util.NoSuchElementException</CODE> - thrown if the specified <code>World</code>
          does not belong to this <code>GeneticAlgorithm</code></DL>
</DD>
</DL>
<HR>

<A NAME="iterateAllWorlds()"><!-- --></A><H3>
iterateAllWorlds</H3>
<PRE>
public void <B>iterateAllWorlds</B>()</PRE>
<DL>
<DD>Tells all World's in this GeneticAlgorithm to iterate through one
 generation. Uses getWorldIterator() to iterate through each call,
 and therefore does not guarantee any order of execution.</DL>
<HR>

<A NAME="iterateAllWorlds(int, boolean)"><!-- --></A><H3>
iterateAllWorlds</H3>
<PRE>
public void <B>iterateAllWorlds</B>(int&nbsp;reps,
                             boolean&nbsp;iterateParallel)</PRE>
<DL>
<DD>Tells all World's in this GeneticAlgorithm to iterate through multiple
 generations. There are two methods of iteration:
 <ul>
   <li>Serially - Each world is iterated the complete number of times
          before the next world is iterated even once.
   <li>Parallelly - Each world is iterated once before any other world
          gets to iterate again.
 </ul><DD><DL>
<DT><B>Parameters:</B><DD><CODE>reps</CODE> - the number of times to iterate each world<DD><CODE>iterateParallel</CODE> - <code>false</code> specifies serial iteration
                          (all iterations on each world)<br>
                         <code>true</code> specifies parallel iteration
                          (each iteration simultaneously on all worlds)</DL>
</DD>
</DL>
<HR>

<A NAME="getNumberOfWorlds()"><!-- --></A><H3>
getNumberOfWorlds</H3>
<PRE>
public int <B>getNumberOfWorlds</B>()</PRE>
<DL>
<DD>Returns the number of <code>World</code>s stored in this <code>
 GeneticAlgorithm</code>.<DD><DL>
<DT><B>Returns:</B><DD>the number of <code>World</code>s</DL>
</DD>
</DL>
<HR>

<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public java.lang.String <B>toString</B>()</PRE>
<DL>
<DD>Calls every <code>World<code>'s <code>toString()</code> method and
 returns a concatenation of all the <code>String</code>s returned.<DD><DL>
<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a concatenated <code>String</code> of all the <code>World</code>s'
           <code>toString()</code> methods</DL>
</DD>
</DL>
<HR>

<A NAME="cleanse()"><!-- --></A><H3>
cleanse</H3>
<PRE>
public void <B>cleanse</B>()</PRE>
<DL>
<DD>Removes non-<code>World</code> objects from the <code>Collection
 </code></DL>
<HR>

<A NAME="getWorldIterator()"><!-- --></A><H3>
getWorldIterator</H3>
<PRE>
public java.util.Iterator <B>getWorldIterator</B>()</PRE>
<DL>
<DD>Return an <code>Iterator</code> to use to go through all the <code>
 World</code>s in this <code>GeneticAlgorithm</code>.<DD><DL>
<DT><B>Returns:</B><DD>an <code>Iterator</code> for the collection of <code>World</code>s</DL>
</DD>
</DL>
<HR>

<A NAME="getDebug()"><!-- --></A><H3>
getDebug</H3>
<PRE>
public static boolean <B>getDebug</B>()</PRE>
<DL>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="GeneticAlgorithm.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>

</BODY>
</HTML>
