Sample shell script

#!/bin/bash
#
# This script is to run SimStudent Interactive Learning in a batch-mode while
# getting tutored by the Carnegie Learning Algebra I Tutor (CL Tutor)
#
# The CL Tutor must have been running prior to this script.
# See How to use InquirySolverTutor to learn more about how to tutor SimStudent
# with the CL Tutor.
#
# (c) Noboru Matsuda, 2008
# Carnegie Mellon University

echo ${OS}

#
# Class path
#

if [ "${CVSDIR}" = "" ]; then
    if [ "${OS}" = "Windows_NT" ]; then
        CVSDIR="f:/Project/CTAT/CVS-TREE"
    fi
    if [ "${OS}" != "Windows_NT" ]; then
        CVSDIR="${HOME}/mazda-on-Mac/Project/CTAT/CVS-TREE"
    fi
fi

if [ "${OS}" = "Windows_NT" ]; then
    CPS=";"
fi
if [ "${OS}" != "Windows_NT" ]; then
    CPS=":"
fi

DorminJar="${CVSDIR}/AuthoringTools/java/lib/DorminWidgets.jar"
CPATH="${DorminJar}${CPS}..${CPS}."

# VM options
#
VmOption="-cp ${CPATH} -Xmx1024m -DnoCtatWindow"

# CTAT options
#

COND=$1
TRAININGS=$2

LOGDIR=$3
if [ ! -e ${LOGDIR} ]; then
    mkdir ${LOGDIR}
fi

FOILDIR="${LOGDIR}/foil-data"
if [ -e ${FOILDIR} ]; then
    echo rm ${FOILDIR}/*.*
fi
if [ ! -e ${FOILDIR} ]; then
    mkdir ${FOILDIR}
fi

PRDIR="${LOGDIR}/pr-age"
if [ -e ${PRDIR} ]; then
    echo rm ${PRDIR}/*.pr-*
    echo rm ${LOGDIR}/*.*
fi
if [ ! -e ${PRDIR} ]; then
    mkdir ${PRDIR}
fi

# A log file for a validation
TESTLOG="${LOGDIR}/test-log.txt"
if [ -e ${TESTLOG} ]; then
    echo rm $TESTLOG
fi

SHLOG="${LOGDIR}/sh-log.txt"

TutorArg="-traceLevel 5"
TutorArg="${TutorArg} -debugCodes miss"
TutorArg="${TutorArg} -ssAnalysisOfFitnessWilkinsburg"
TutorArg="${TutorArg} -ssInteractiveLearning"

TutorArg="${TutorArg} -ssCondition ${COND}"
TutorArg="${TutorArg} -ssTestOnLastTrainingOnly"
TutorArg="${TutorArg} -ssSetMaxNumTest 0"
TutorArg="${TutorArg} -ssSetMaxNumTraining 20"
TutorArg="${TutorArg} -ssSearchTimeOutDuration 30000"
# TutorArg="${TutorArg} -ssLearnBuggyActions true"
# TutorArg="${TutorArg} -ssLogPriorRuleActivationsOnTraining"
# TutorArg="${TutorArg} -ssOperatorFile operators-bug.txt"

TutorArg="${TutorArg} -ssProblemSet $TRAININGS"
TutorArg="${TutorArg} -ssCheckWilkinsburgBadBrd"

TutorArg="${TutorArg} -ssFoilLogDir ${FOILDIR} -ssPrAgeDir ${PRDIR}"
TutorArg="${TutorArg} -ssFOAgetterClass SimStAlgebraI.AlgebraOneAdhocFoaGetter"
TutorArg="${TutorArg} -ssInputMatcher edu.cmu.pact.miss.userDef.algebra.IsEquivalent"
TutorArg="${TutorArg} -ssTestOutput $TESTLOG"

# TutorArg="${TutorArg} -ssCacheOracleInquiry false"
TutorArg="${TutorArg} -ssRuleActivationTestMethod ClTutorSolver"
TutorArg="${TutorArg} -ssHintMethod ClTutorSolver"
TutorArg="${TutorArg} -ssClSolverTutorHost localhost"

echo java ${VmOption} SimStAlgebraI/ThreeStepEq ${TutorArg}
java ${VmOption} SimStAlgebraI/ThreeStepEq ${TutorArg} >& $SHLOG

for bload in *.bload
do
rm ./"$bload"
done
 

Subpages (1): InquirySolverTutor
Comments