// now a simulator to a learner
if (logFileName.contains(Configuration.LEARNER.LEARNER_BLUEFRINGE_DEC2007.name()))
VertexID.comparisonKind = ComparisonKind.COMPARISON_LEXICOGRAPHIC_ORIG;// this is a major change in a configuration of learners, affecting the comparison between vertex IDs
final java.io.FileInputStream inputStream = new java.io.FileInputStream(logFileName);
final LearnerSimulator simulator = new LearnerSimulator(inputStream,true,null);
Configuration config = Configuration.getDefaultConfiguration().copy();
config.setLegacyXML(true);
final LearnerEvaluationConfiguration evalData = simulator.readLearnerConstructionData(config);
evalData.config.setTransitionMatrixImplType(STATETREE.STATETREE_SLOWTREE);
// Now we need to choose learner parameters based on the kind of file we are given
// (given the pace of Statechum evolution, I cannot expect all the correct options
// to be stored in log files).
evalData.config.setScoreCompatibilityScoreComputationBugEmulation(true);
if (logFileName.contains(Configuration.LEARNER.LEARNER_BLUEFRINGE_MAY2008.name()))
{
evalData.config.setUseAmber(false);evalData.config.setUseLTL(false);
evalData.config.setSpeculativeQuestionAsking(false);
evalData.config.setIgnoreDepthInTheChoiceOfRepresentatives(true);evalData.config.setIgnoreVertexAttributesInLogReplay(true);
}
else
if (logFileName.contains(Configuration.LEARNER.LEARNER_BLUEAMBER_MAY2008.name()))
{
evalData.config.setUseAmber(true);evalData.config.setUseLTL(false);
evalData.config.setSpeculativeQuestionAsking(false);
evalData.config.setIgnoreDepthInTheChoiceOfRepresentatives(true);evalData.config.setIgnoreVertexAttributesInLogReplay(true);
}
else
if (logFileName.contains(Configuration.LEARNER.LEARNER_BLUEFRINGE_DEC2007.name()))
{// we'd like to make sure that the initial configuration is loaded with the correct configuration values.
evalData.config.setInitialIDvalue(1);
VertexID.comparisonKind = ComparisonKind.COMPARISON_LEXICOGRAPHIC_ORIG;
evalData.config.setUseAmber(false);evalData.config.setUseLTL(false);
evalData.config.setSpeculativeQuestionAsking(false);
evalData.config.setDefaultInitialPTAName("Init");
evalData.config.setIgnoreDepthInTheChoiceOfRepresentatives(true);evalData.config.setIgnoreVertexAttributesInLogReplay(true);
}
else
Assert.fail("unknown type of log file");
final org.w3c.dom.Element nextElement = simulator.expectNextElement(StatechumXML.ELEM_INIT.name());
final ProgressDecorator.InitialData initial = simulator.readInitialData(nextElement);
if (evalData.labelDetails != null)
{
initial.plus.addAll(evalData.labelDetails.getSPlus());initial.minus.addAll(evalData.labelDetails.getSMinus());
}
simulator.setNextElement(nextElement);
Learner learner2 = null;
if (logFileName.contains(Configuration.LEARNER.LEARNER_BLUEFRINGE_DEC2007.name()))
{// have to patch the learner.