|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--THSim
The main class for THSim v4.0
Copyright (c) 2004 Paul Vogt
Field Summary | |
protected static Context |
cxt
|
protected static Agent |
hearer
|
protected static java.util.List |
lAgents
|
protected static int |
lastID
|
protected static java.util.List |
lScoreFiles
|
protected static java.util.List |
lWordList
|
protected static java.util.List |
lWords
|
protected static int |
nAgents
|
protected static double |
noiseCxt
|
protected static Parameters |
parameters
|
protected static Stats |
pStats
|
protected static Agent |
speaker
|
Constructor Summary | |
THSim()
|
Method Summary | |
protected static void |
create_agents()
Initialise a list of agents |
static void |
main(java.lang.String[] pArgs)
The main function of THSim. |
protected static void |
reinitializeAgents(int lg)
Reinitialise the list of agents |
protected static void |
test()
The function test() can be used to test any function specified inside. |
protected static void |
testPopulation(int it)
testPopulation(int it) is used to test the quality of the population. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static Context cxt
protected static java.util.List lAgents
protected static int nAgents
protected static final double noiseCxt
protected static Agent speaker
protected static Agent hearer
protected static int lastID
protected static Parameters parameters
protected static Stats pStats
protected static java.util.List lScoreFiles
protected static java.util.List lWordList
protected static java.util.List lWords
Constructor Detail |
public THSim()
Method Detail |
protected static void create_agents()
protected static void reinitializeAgents(int lg)
protected static void test() throws java.io.IOException
java.io.IOException
protected static void testPopulation(int it)
In short, a fixed number of games are set up (i.e. different contexts).
In `each' game, each agent produces an utterance. In turn,
each agent tries to interpret each utterance. During this test-phase
no new knowledge is invented or learnt.
The output is in the form:
holistic agent type 0:
"TP it pCoh iCoh var pCohAdults iCohAdults pCohLearners iCohLearners"
holistic agent type 1:
"TP it pCoh iCoh pCohAdults iCohAdults pCohLearners iCohLearners"
compositional agent type 2:
"TP it pCoh iCoh comp simSyntax pCohAdults iCohAdults pCohLearners iCohLearners"
where:
TP is the identifier used to extract the test results from the standard output.
it is the iteration number
pCoh is the overal production coherence
iCoh is the interpretation accuracy
var is the average variance between meanings
comp is the compositionality measure
simSyntax is the similarity measure comparing the agents' grammars
pCohAdults is the coherence inside the adults population (i.e. the first half of the pop.)
iCohAdults is the accuracy inside the adults population
pCohLearners is the coherence inside the learners population
iCohLearners is the accuracy inside the learners population
public static void main(java.lang.String[] pArgs) throws java.io.IOException
THsim starts with initialising all kinds of things, such as setting the parameters following those given, or following the default settings. The parameters are mostly stored in the Utils.Parameters class. The interactive canvas is initialised when required.
Then, the program waits for a start-signal. This may be given as an argument, or from the user-interface.
Given the start signal, the simulation starts, possibly after (re)initialising some data structures.
During the simulation, output is written to the standard output, which I usually redirect into a file for further analysis (only for linux users though). If the user interface is active, additional output is written there. Further output can be stored in files as specified with the arguments.
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |