Class LearningAlgorithm

java.lang.Object
  extended by LearningAlgorithm

public class LearningAlgorithm
extends java.lang.Object

TTT project file that represents the data and process of a launched learning algorithm CCP module

Author:
James Barr

Field Summary
private  java.lang.String ccpID
          CCP module ID for the LA
private  java.lang.String fullName
          display name on the GUI menu for the LA
private  boolean isAlert
          TRUE if the module has sent the alert connected message, FALSE if no message was sent
private  int numID
          integer for identification, not necessarily equal to its index in the array
private  java.lang.String pathName
          relative pathname to the LA's executable file
private  java.lang.Process process
          process created from running the LA's executable file
private static int tempID
          static integer used to set numID
 
Constructor Summary
LearningAlgorithm(java.lang.String opponentData)
          Parse the opponent data and store it correctly and start the output reader object
 
Method Summary
 void exit()
          Closes the executable opponent module
 java.lang.String getCCPID()
          Return the CCP Module ID
 java.lang.String getFullName()
          Return the opponent's display name
 int getNumIndex()
          Gets the LA's static num index
 java.lang.String getPathName()
          Return the relative path to the executable
 java.lang.Process getProcess()
          Returns the process for the executable module
 boolean isAlert()
          Returns the opponent module's alertness
 void launch()
          Launches the executable opponent module in a new console window
 void setAlert(boolean flag)
          Sets the LA's alertness
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ccpID

private java.lang.String ccpID
CCP module ID for the LA


fullName

private java.lang.String fullName
display name on the GUI menu for the LA


pathName

private java.lang.String pathName
relative pathname to the LA's executable file


process

private java.lang.Process process
process created from running the LA's executable file


isAlert

private boolean isAlert
TRUE if the module has sent the alert connected message, FALSE if no message was sent


numID

private int numID
integer for identification, not necessarily equal to its index in the array


tempID

private static int tempID
static integer used to set numID

Constructor Detail

LearningAlgorithm

public LearningAlgorithm(java.lang.String opponentData)
Parse the opponent data and store it correctly and start the output reader object

Parameters:
opponentData - - Line of data from the opponent text file
Method Detail

getCCPID

public java.lang.String getCCPID()
Return the CCP Module ID

Returns:
- the CCP Module ID

getFullName

public java.lang.String getFullName()
Return the opponent's display name

Returns:
- the opponent's display name

getPathName

public java.lang.String getPathName()
Return the relative path to the executable

Returns:
- the relative path to the executable

getNumIndex

public int getNumIndex()
Gets the LA's static num index

Returns:
- the LA's statically generated integer

launch

public void launch()
Launches the executable opponent module in a new console window


exit

public void exit()
Closes the executable opponent module


setAlert

public void setAlert(boolean flag)
Sets the LA's alertness

Parameters:
flag - - TRUE if alert, FALSE if not alert

isAlert

public boolean isAlert()
Returns the opponent module's alertness

Returns:
- TRUE if alert, FALSE if not alert

getProcess

public java.lang.Process getProcess()
Returns the process for the executable module

Returns:
- the opponent's executable process