stimulusdelayrewardanalyzer
Class Tools

java.lang.Object
  |
  +--stimulusdelayrewardanalyzer.Tools

public class Tools
extends java.lang.Object

Set of tools for the environment and simulations data.


Field Summary
static java.lang.String ACTORS
           
static java.lang.String ACTORS_WEIGHTS
           
static java.lang.String ACTORS_WEIGHTS_CHANGE
           
static java.lang.String CRITICS
           
static java.lang.String CRITICS_WEIGHTS
           
static java.lang.String CRITICS_WEIGHTS_CHANGE
           
static java.lang.String CURRENT_DELAY
           
static java.lang.String CURRENT_STEP
           
static java.lang.String CURRENT_TRIAL
           
static java.lang.String CURRENT_TRIALTYPE
           
static java.lang.String DOPAMINE
           
static java.lang.String IS_IN_TRIAL
           
static java.lang.String PREDICTION
           
static java.lang.String REWARD
           
static java.lang.String STEP
           
static java.lang.String STIMULUS
           
 
Constructor Summary
Tools()
           
 
Method Summary
static void dumpBlock(DataSetCollection state, DataSetCollection monkey, java.io.PrintStream out)
           
static java.lang.String getDelay(java.lang.String fileName)
          Extract the network retrained delay from a "delay_TrainedAgentid.dsc76" filename string.
static java.lang.String getID(java.lang.String fileName)
          Extract the network ID from a "Resultid.dsc76" filename string or from a "xxxTrainedAgentid.dsc76" filename string.
static java.io.File[] listDataSetCollections(java.lang.String path)
          Lists all the data set collection (builx x76, .dsc76 files) in a directory.
static DataSetCollection loadDataSetColl(java.io.File fileName)
          Loads a data set (saved using #saveDataSet) from a file.
static DataSetCollection loadDataSetColl(java.lang.String fileName)
          Loads a data set (saved using #saveDataSet) from a file.
static java.sql.Connection openConnection(java.lang.String dbName)
          Establsihed a connection and close it.
static java.lang.String testConnection(java.lang.String dbName)
          Try to establshed a connection and close it.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTORS

public static final java.lang.String ACTORS
See Also:
Constant Field Values

ACTORS_WEIGHTS

public static final java.lang.String ACTORS_WEIGHTS
See Also:
Constant Field Values

ACTORS_WEIGHTS_CHANGE

public static final java.lang.String ACTORS_WEIGHTS_CHANGE
See Also:
Constant Field Values

CRITICS

public static final java.lang.String CRITICS
See Also:
Constant Field Values

CRITICS_WEIGHTS

public static final java.lang.String CRITICS_WEIGHTS
See Also:
Constant Field Values

CRITICS_WEIGHTS_CHANGE

public static final java.lang.String CRITICS_WEIGHTS_CHANGE
See Also:
Constant Field Values

CURRENT_DELAY

public static final java.lang.String CURRENT_DELAY
See Also:
Constant Field Values

CURRENT_STEP

public static final java.lang.String CURRENT_STEP
See Also:
Constant Field Values

CURRENT_TRIAL

public static final java.lang.String CURRENT_TRIAL
See Also:
Constant Field Values

CURRENT_TRIALTYPE

public static final java.lang.String CURRENT_TRIALTYPE
See Also:
Constant Field Values

DOPAMINE

public static final java.lang.String DOPAMINE
See Also:
Constant Field Values

IS_IN_TRIAL

public static final java.lang.String IS_IN_TRIAL
See Also:
Constant Field Values

PREDICTION

public static final java.lang.String PREDICTION
See Also:
Constant Field Values

REWARD

public static final java.lang.String REWARD
See Also:
Constant Field Values

STEP

public static final java.lang.String STEP
See Also:
Constant Field Values

STIMULUS

public static final java.lang.String STIMULUS
See Also:
Constant Field Values
Constructor Detail

Tools

public Tools()
Method Detail

dumpBlock

public static void dumpBlock(DataSetCollection state,
                             DataSetCollection monkey,
                             java.io.PrintStream out)

getDelay

public static java.lang.String getDelay(java.lang.String fileName)
Extract the network retrained delay from a "delay_TrainedAgentid.dsc76" filename string.

Parameters:
fileName - A .dsc76 file name of the form delay_TrainedAgentid.dsc76

getID

public static java.lang.String getID(java.lang.String fileName)
Extract the network ID from a "Resultid.dsc76" filename string or from a "xxxTrainedAgentid.dsc76" filename string.

Parameters:
fileName - A .dsc76 file name of the form ...tid.dsc76

listDataSetCollections

public static java.io.File[] listDataSetCollections(java.lang.String path)
Lists all the data set collection (builx x76, .dsc76 files) in a directory.

Parameters:
path - Path of the directory to open
Returns:
An array of .dsc76 Files.

loadDataSetColl

public static DataSetCollection loadDataSetColl(java.io.File fileName)
                                         throws java.io.IOException,
                                                java.lang.ClassNotFoundException
Loads a data set (saved using #saveDataSet) from a file.

Parameters:
fileName - The name of the file.
Returns:
The data set read.
java.io.IOException
java.lang.ClassNotFoundException

loadDataSetColl

public static DataSetCollection loadDataSetColl(java.lang.String fileName)
                                         throws java.io.IOException,
                                                java.lang.ClassNotFoundException
Loads a data set (saved using #saveDataSet) from a file.

Parameters:
fileName - The name of the file.
Returns:
The data set read.
java.io.IOException
java.lang.ClassNotFoundException

openConnection

public static java.sql.Connection openConnection(java.lang.String dbName)
Establsihed a connection and close it.

Parameters:
dbName - ODBC connection name
Returns:
Connection or null if it does not work.

testConnection

public static java.lang.String testConnection(java.lang.String dbName)
Try to establshed a connection and close it.

Parameters:
dbName - ODBC connection name
Returns:
Error message string or null on success.