Evaluator::Evaluator Class Reference
List of all members.
Detailed Description
This class compares the performance of the two agents,
running various trials, saving the results of the trials
to files, and then parsing the data in the files so that
it may be interpreted.
Member Function Documentation
| def Evaluator::Evaluator::__init__ |
( |
|
self |
) |
|
Sets up a new Evaluator, you may change the three "Trials"
numbers to run more or fewer trials on the functions that
use those variables.
| def Evaluator::Evaluator::evaluateEdgeCosts |
( |
|
self |
) |
|
This function sets up a learner and calls the
function in it to calibrate the edge costs. This function
eventually prints out a number representing the edge cost
which will balance aggregate money spent with aggregate
social wealth gained from the execution of the game.
| def Evaluator::Evaluator::evaluateParams |
( |
|
self |
) |
|
This function sets up a clean learning agent and calibrates the
degree of the parameters. Each parameter can have degree 0.5, 1,
or 2, and since I had no indication of which one of these was best
for each parameter I simply ran tests to figure it out. The best
degree for each parameter is saved in a text file and read in
once the learner starts.
| def Evaluator::Evaluator::evaluateLearner |
( |
|
self |
) |
|
This is a simple function to help evaluate the speed of the learning
agent by running it for a set number of trials and seeing
how long it took the agent to run.
Additionally, earlier on in the debugging stage it was used
for developing the evaluation function (which was accomplished
simply by calling developEvalFn), it also printed out
information about how the agent was performing.
| def Evaluator::Evaluator::evaluateSearcher |
( |
|
self |
) |
|
This is a simple function to help evaluate the speed of the search
agent by running it for a set number of trials and seeing
how long it took the agent to run.
| def Evaluator::Evaluator::evaluateHeuristic |
( |
|
self |
) |
|
This is a simple function to help evaluate the speed of the heuristic
agent by running it for a set number of trials and seeing
how long it took the agent to run.
| def Evaluator::Evaluator::compare |
( |
|
self |
) |
|
This runs a comparison trial between the learning agent and the heuristic
agent, collecting statistics from the running of trials by each agent and
writing the statistics to files once the simulation is complete
| def Evaluator::Evaluator::parseCompareStats |
( |
|
self |
) |
|
This reads in stats from the trials which compared
the learning agent and the heuristic agent and prints
out various results which are then turned into
histograms off-program.
| def Evaluator::Evaluator::bucketStats |
( |
|
self |
) |
|
Takes the raw stats file, gameStats, and puts it into buckets
based on the bucket helper functions at the beginning of MW.py
These buckets are then used to help determine the heuristic
agent's decisions.
| def Evaluator::Evaluator::graphStats |
( |
|
self |
) |
|
This function takes in previously collected stats
from a game, using the stats file. It chops
up the data using various subroutines and then
graph them using hippodraw.
The documentation for this class was generated from the following file:
- C:/Documents and Settings/Tony/Desktop/workspace/MW/src/Evaluator.py