diff --git a/HTML/Assets/Detectors/Lumilo/Critical_Struggle/critical_struggle.js b/HTML/Assets/Detectors/Lumilo/Critical_Struggle/critical_struggle.js index 92259f7..bce414a 100644 --- a/HTML/Assets/Detectors/Lumilo/Critical_Struggle/critical_struggle.js +++ b/HTML/Assets/Detectors/Lumilo/Critical_Struggle/critical_struggle.js @@ -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; @@ -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 diff --git a/HTML/Assets/Detectors/Lumilo/Struggle/struggle__moving_average.js b/HTML/Assets/Detectors/Lumilo/Struggle/struggle__moving_average.js index e075a56..e514abc 100644 --- a/HTML/Assets/Detectors/Lumilo/Struggle/struggle__moving_average.js +++ b/HTML/Assets/Detectors/Lumilo/Struggle/struggle__moving_average.js @@ -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; @@ -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); }