Skip to content

Commit

Permalink
minor bug fixes in new versions of critical_struggle and struggle det…
Browse files Browse the repository at this point in the history
…ectors; also: hints no longer count towards the struggle detector
  • Loading branch information
d19fe8 committed Jul 16, 2017
1 parent a288065 commit b09cc92
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ var attemptWindow;
var skillLevelsAttempts;
var intervalID;
var onboardSkills;
var stepCounter = {};

//declare and/or initialize any other custom global variables for this detector here...
var initTime;
Expand Down Expand Up @@ -263,12 +264,9 @@ function receive_transaction( e ){
var sumAskTeacherForHelp = attemptWindow.reduce(function(pv, cv) { return pv + cv; }, 0);

console.log(attemptWindow);
console.log(help_model_output);
console.log(isWheelSpinning);
console.log(skillLevelsAttempts);

updateHistory(e);

}

//set conditions under which detector should update
Expand Down
22 changes: 17 additions & 5 deletions HTML/Assets/Detectors/Lumilo/Struggle/struggle__moving_average.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ var elaborationString;
//[optional] single out TUNABLE PARAMETERS below
var windowSize = 10;
var threshold = 3;
var BKTparams = {p_transit: 0.2,
p_slip: 0.1,
p_guess: 0.2,
p_know: 0.25};
var errorThreshold = 2; //currently arbitrary
var newStepThreshold = 1; //currently arbitrary
var familiarityThreshold = 0.4;
Expand Down Expand Up @@ -439,18 +443,26 @@ function receive_transaction( e ){
help_model_output = "preferred"; //first action in whole tutor is set to "preferred" by default
}

attemptCorrect = (e.data.tutor_data.action_evaluation.toLowerCase() == "correct") ? 1 : 0;
attemptWindow.shift();
attemptWindow.push(attemptCorrect);
if(e.data.tutor_data.action_evaluation.toLowerCase() != "hint"){
attemptCorrect = (e.data.tutor_data.action_evaluation.toLowerCase() == "correct") ? 1 : 0;
attemptWindow.shift();
attemptWindow.push(attemptCorrect);
}
else{
console.log("is hint request: no direct/immediate effect on struggle detector");
}

if (help_model_output == "ask teacher for help/try step"){
for(var i=0; i<(windowSize-threshold); i++){
a.shift();
a.push(0)};
attemptWindow.shift();
attemptWindow.push(0)};
}

var sumCorrect = attemptWindow.reduce(function(pv, cv) { return pv + cv; }, 0);
console.log(attemptWindow);

updateHistory(e);
console.log(help_model_output);

}

Expand Down

0 comments on commit b09cc92

Please sign in to comment.