🧠 Adaptive Learning Engine — Knowledge Tracing Live
Watch a knowledge-tracing model update its estimate of a simulated student's mastery after every answered question, and see how the next question it picks adapts in real time.
About the Adaptive Learning Engine
Adaptive learning platforms like Khan Academy, Duolingo, and ALEKS all face the same underlying problem: a student's true understanding of a skill is never directly observable, only inferred from a noisy trickle of right and wrong answers. Bayesian Knowledge Tracing (BKT), the algorithm behind decades of intelligent tutoring systems, solves this by treating each skill's mastery as a hidden probability P(L) and updating it with Bayes' rule after every attempt, using two nuisance parameters — guess and slip — that separate genuine understanding from lucky guesses and careless mistakes. This simulation implements exactly that model, in full, for a simulated student working through five independent maths skills, each with its own hidden true-mastery state and its own live Bayesian estimate that you can watch evolve question by question.
Every simulated answer runs the real four-step BKT cycle: a question is selected by an adaptive policy, the answer is drawn stochastically from the student's true hidden state via the guess/slip parameters, the hidden state itself may transition toward mastery, and the model's belief is updated with the Bayesian posterior formula before a learning-rate transition is folded in. The mastery bar chart, selection-reasoning panel, and rolling accuracy/mastery-growth trend all update live from these calculations — nothing here is scripted or pre-animated.
What it shows
A live bar chart of per-skill mastery probability updated by real Bayes' rule after every simulated answer, a selection panel showing exactly which skill was picked and why, and a running chart of rolling accuracy and mean mastery growth across the session.
How to use it
Step through questions one at a time or switch on auto-run, adjust the guess/slip/learning-rate parameters to see how forgiving or strict the model is, and swap the selection policy to compare weakest-skill-first adaptive practice against a random baseline.
Did you know?
Real adaptive platforms such as Khan Academy and ALEKS trace their mastery-tracking logic back to the same 1995 Corbett & Anderson Bayesian Knowledge Tracing algorithm this simulation implements directly.
Frequently Asked Questions
What is Bayesian Knowledge Tracing, and what does it assume about a learner?
Bayesian Knowledge Tracing (BKT), introduced by Corbett and Anderson in 1995, models a learner's knowledge of a specific skill as a single hidden binary variable: either mastered or not-yet-mastered. It never observes this state directly — it only sees whether each answer was correct or incorrect — and maintains a probability P(L) that the skill is currently mastered, updating that probability with Bayes' rule after every attempt. This simulation runs exactly that model across five independent skills for one simulated student: each skill has its own true hidden mastery state (which the model can never see) and its own live P(L) estimate (which you can watch move after every question), so you can directly compare the model's belief against the ground truth it is trying to infer.
What do the guess and slip parameters mean, and why can't raw percent-correct measure mastery?
Guess (g) is the probability a student who has NOT mastered a skill still answers correctly anyway — for example by spotting a pattern in multiple-choice options. Slip (s) is the probability a student who HAS mastered a skill still answers incorrectly — a careless error. Because of these two effects, a single correct answer is not proof of mastery and a single wrong answer is not proof of ignorance: percent-correct alone conflates skill with luck. BKT explicitly separates the two by keeping guess and slip as fixed nuisance parameters and inferring the hidden mastery probability that best explains the entire sequence of right and wrong answers, not just the latest one.
How exactly does the Bayesian update work after each answer?
Before a question, the model has a prior P(L) that the skill is mastered. If the answer is correct, the posterior is P(L|correct) = [P(L)·(1−s)] / [P(L)·(1−s) + (1−P(L))·g] — the probability of getting a correct answer via true mastery, divided by the total probability of any correct answer (through mastery or through a lucky guess). If the answer is incorrect, the posterior is P(L|incorrect) = [P(L)·s] / [P(L)·s + (1−P(L))·(1−g)] — the probability of a slip, divided by the total probability of any incorrect answer. This simulation computes exactly these two formulas after every simulated question and displays the before-and-after mastery numbers in the "Last question" panel.
Why is a learning-rate transition applied after every question, not just correct ones?
BKT assumes a student can learn from the act of attempting a question regardless of whether they got it right — from feedback, from working through the problem, or simply from repeated exposure. After computing the Bayesian posterior from the observed correctness, the model applies one more step: P(Lnext) = P(Lpost) + (1−P(Lpost))·T, where T is the learning-rate (transition) probability that an unmastered student crosses into mastery on this attempt. Critically, BKT assumes learning is one-directional — mastery is never assumed to be forgotten — so T only ever pushes the estimate upward. This is exactly what the learning-rate slider in this simulation controls, and you can watch higher settings pull mastery estimates toward 100% much faster.
How does the adaptive selection policy decide which skill to test next?
The "Weakest skill first" policy simply asks a question from whichever skill currently has the lowest P(L) estimate, concentrating practice where the model believes the student needs it most — this is the core idea behind mastery-based adaptive systems like Khan Academy's practice engine and ALEKS. "Weighted by uncertainty" does the same thing probabilistically, sampling skills with a chance proportional to (1 − P(L)), so weak skills are favoured but not deterministically forced. "Round robin" cycles through skills in a fixed order regardless of mastery, and "Random" picks uniformly at random as a baseline. Switching between these policies while watching the mastery bar chart makes the efficiency gain from adaptivity directly visible: weakest-first reaches full mastery across all five skills in noticeably fewer questions than the random baseline.
Why can a student answer correctly without having mastered a skill, and vice versa?
This is exactly what the guess and slip parameters model, and it is why BKT tracks a probability rather than a single observed fact. A student with true mastery state "not mastered" can still answer correctly with probability g (a lucky guess, or partial knowledge that happens to work this time) — the simulation actually flips this coin every time an unmastered simulated student is asked a question. Symmetrically, a truly mastered student answers incorrectly with probability s (a momentary slip, misreading the question, or a typo). Because both of these are simulated as genuine random draws — not scripted outcomes — you will see occasional lucky correct answers on weak skills and occasional unlucky misses on skills the model already estimates as highly mastered, exactly as would happen with a real student.
What are the known limitations of BKT compared to newer knowledge-tracing models?
BKT's assumptions are strong simplifications: it treats each skill's mastery as fully binary and independent of every other skill, ignores partial credit and response time, and assumes a fixed guess/slip rate rather than one that varies by question difficulty or student. Modern research systems such as Deep Knowledge Tracing (DKT, using recurrent neural networks) and Bayesian extensions with per-item difficulty parameters (closer to Item Response Theory) relax these assumptions and often fit real student data more accurately, at the cost of being far less interpretable — you cannot read off a single transparent probability that the student has mastered fractions from a neural network's hidden state the way you can from BKT. That interpretability is precisely why BKT, despite being three decades old, remains widely deployed in real production tutoring systems today.
Five skills each carry a hidden true-mastery state and a live Bayesian Knowledge Tracing estimate P(L); every simulated answer runs a genuine guess/slip Bayes-rule update followed by a learning-rate transition, and the adaptive selection policy re-ranks all five skills by their live estimates to choose the next question — rendered as two offscreen-canvas charts (mastery bars and a rolling accuracy/mastery trend) uploaded as CanvasTexture planes under an orthographic Three.js camera.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install