One tutor turn#
BKT update#
p = BKTParams()p_init, p_learn, p_slip, p_guess
if correct:
num = mastery * (1 - p.p_slip)
denom = num + (1 - mastery) * p.p_guess
else:
num = mastery * p.p_slip
denom = num + (1 - mastery) * (1 - p.p_guess)
posterior = num / max(denom, 1e-6)
return posterior + (1 - posterior) * p.p_learnlearn transition
Study coach loop#
Project functions#
| Task | Code |
|---|
| Grade one typed answer | gradeAnswer(deck, cardId, response) |
|---|
| List due cards | dueCards(progress, date) |
|---|
| Order prerequisites | path_for(index, target, completed=None) |
|---|
| Rank paths in a budget | rank_paths(index, goals, budget, completed=None) |
|---|
| Suggest a next word | suggest(model: Model, prefix: string, history?: string[], limit?: number) |
|---|
| Load a saved model | importModel(value: unknown) |
|---|
| Scale materials | scale(model, participants=None) |
|---|
| Find shortages | shortages(model, participants=None) |
|---|
Rules in code#
- Answer match
- NFKC, lower case, trim, drop end punctuation. Then exact match.
- Box
- correct adds 1 up to 5. Wrong resets to 0.
- Interval
2 ** (state.box - 1) days when correct. 1 day when wrong.- Path rank
- most goals covered, then fewest minutes, then IDs.
- Suggestion score
order * 1000000 + count. A longer history wins.- Consumables
quantity*participants.- Shared equipment
quantity*ceil(participants/share).- Unknown stock
- unconvertible inventory leaves shortage unknown.
Abbreviations#
- BKT
- Bayesian knowledge tracing. Mastery probability per concept.
- FSRS
- Free Spaced Repetition Scheduler. Better than SM-2.
- DAG
- concept graph with prerequisite edges.
- COPPA
- US law that restricts data from children under 13.
- OER
- open content attached to each curriculum node.
Questions#
- What does the tutor do when asked for the answer?
- It asks a leading question.
- What proves the tutor works?
- A pre/post test delta with 10 learners over two weeks.
- Does the study coach judge essays?
- No. It uses authored questions and exact matches.
- Does a model card go into the deck?
- No. It goes to card-proposal.json for review.
- Does the planner guess glue volume?
- No. It never infers density or package size.
Tips#
- Build a curriculum graph of 50-150 concept nodes.
- Compare with a non-adaptive baseline on the same content.
- Auto-delete memory after 1 year. Scope it by learner ID.
- Pass the review date from the page to
--date. - Keep a second set of examples for evaluation.
- Reloading the practice page before download discards new attempts.