Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,39 +136,39 @@ impl Default for Benchmark {
exercises_per_session: 25,
initial_performance: [0.3, 0.2, 0.25, 0.15, 0.1],
trials_before_stable: 5,
stable_performance: [0.02, 0.05, 0.1, 0.33, 0.5],
lapse_rate: 0.07,
stable_performance: [0.02, 0.03, 0.1, 0.2, 0.65],
lapse_rate: 0.1,
},
below_median_profile: StudentProfile {
session_frequency: 3,
exercises_per_session: 25,
initial_performance: [0.2, 0.25, 0.3, 0.15, 0.1],
trials_before_stable: 5,
stable_performance: [0.02, 0.03, 0.1, 0.3, 0.55],
lapse_rate: 0.07,
stable_performance: [0.02, 0.03, 0.1, 0.2, 0.65],
lapse_rate: 0.08,
},
median_profile: StudentProfile {
session_frequency: 2,
exercises_per_session: 30,
initial_performance: [0.15, 0.25, 0.3, 0.18, 0.12],
trials_before_stable: 4,
stable_performance: [0.02, 0.03, 0.1, 0.25, 0.6],
stable_performance: [0.02, 0.03, 0.1, 0.15, 0.7],
lapse_rate: 0.07,
},
above_median_profile: StudentProfile {
session_frequency: 1,
exercises_per_session: 40,
initial_performance: [0.1, 0.15, 0.4, 0.2, 0.15],
trials_before_stable: 4,
stable_performance: [0.01, 0.02, 0.07, 0.25, 0.65],
stable_performance: [0.01, 0.03, 0.06, 0.15, 0.75],
lapse_rate: 0.06,
},
excellent_profile: StudentProfile {
session_frequency: 1,
exercises_per_session: 50,
initial_performance: [0.08, 0.12, 0.4, 0.2, 0.2],
trials_before_stable: 3,
stable_performance: [0.01, 0.02, 0.07, 0.2, 0.7],
stable_performance: [0.0, 0.02, 0.03, 0.15, 0.8],
lapse_rate: 0.05,
},
advanced_course: Ustr::from("placeholder_advanced_course"),
Expand Down
12 changes: 12 additions & 0 deletions src/scheduler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,14 @@ struct Candidate {

/// The sum of the number of dependents of the lesson and course of this exercise.
num_dependents: usize,

/// The weight of the units that the lesson and course of this exercise encompass. Higher values
/// mean that practicing this exercise provides more coverage of the graph.
encompasses_weight: f32,

/// The weight with which this exercise is encompassed by other exercises in the initial batch.
/// Higher values mean that more exercises in the batch implicitly review this exercise.
encompassed_weight: f32,
}

/// An implementation of [`ExerciseScheduler`] based on depth-first search.
Expand Down Expand Up @@ -394,6 +402,8 @@ impl DepthFirstScheduler {
frequency: self.data.get_exercise_frequency(exercise_id),
dead_end: false,
num_dependents: self.data.get_num_dependents(item.unit_id, course_id),
encompasses_weight: 0.0,
encompassed_weight: 0.0,
})
})
.collect::<Result<Vec<Candidate>>>()?;
Expand Down Expand Up @@ -983,6 +993,8 @@ impl DepthFirstScheduler {
frequency: *frequency_map.get(&unit_id).unwrap_or(&0),
dead_end: false,
num_dependents: self.data.get_num_dependents(lesson_id, course_id),
encompasses_weight: 0.0,
encompassed_weight: 0.0,
});
}
}
Expand Down
Loading
Loading