Building The Best Educational Software

info@edsoft.org

How We Built an Algorithm That Keeps Kids Learning Without Getting Discouraged

March 20, 2026 - Jamie Lake

Algorithm design on paper

When we started building EdSoft, we had a simple brief: help kids master concepts, one lesson at a time. But as we dug into the design, we kept running into the same issues that anyone who has taught children knows well.

Mastery takes time. Attention has limits. Failure feels bad.

If you tell a child they can't move on until they've got something right, and that thing is hard, you haven't created a learning system. You've created a wall. The child doesn't think "I need to try harder." They think "I'm bad at this." And once they think that, the lesson is over.

So we built something different. Here's how it works.

The Structure: Modules, Lessons, Concepts

EdSoft organises content into three nested levels.

Modules are broad subject areas, think "Mathematics" or "Physics". A module contains several lessons, and completing all of the lessons completes the module.

Lessons are the unit of daily learning. We target 30 to 60 minutes per lesson. A lesson is complete when all its core concepts have been mastered.

Core concepts are the atomic ideas inside a lesson, the individual things a learner needs to understand. They're small by design. One concept should be something a child can explain to a friend in a sentence. Mastery means the algorithm is confident the learner genuinely understands it, not just that they got lucky on one question.

The critical rule: all concepts must be mastered to complete a lesson. There are no shortcuts, no partial completions. But the algorithm has a lot of flexibility in how it gets there.

How many concepts per lesson?

To hit the 30–60 minute window reliably, we cap lessons at 3–5 core concepts. The math is straightforward: each concept takes roughly 6–12 questions across 2–4 rounds, at about 2 minutes per question. Four concepts at 10 questions each is 80 minutes in the worst case, 40 in the best. That fits the window... as long as the algorithm is managing the session intelligently, which is where it gets interesting.

The Confidence Score

Everything in the algorithm flows through a single number: the confidence score. It's a floating-point value between 0.0 and 1.0 representing how well we think a learner understands a concept right now.

We update it using an exponentially decaying weighted average over the learner's last 10 answers. Recent answers matter more than older ones, a decay factor of 0.8 means the most recent answer is roughly twice as influential as one from five questions ago.

Why not a simple average?

Because learners aren't static. A child who struggled at the start of a concept but has just got five in a row correct is in a fundamentally different place than their raw average would suggest. The weighted approach picks up on momentum, both positive and negative.

What the score means

Three thresholds drive everything:

  • Mastered Score (0.8 or more): Concept is removed from the queue
  • Struggling Score (0.45 or less): Show a worked example
  • Progressing Score (Everything else): Continue, adjust difficulty to match

The streak requirement on mastery is deliberate. Confidence alone can be inflated by a lucky run. We require three consecutive correct answers alongside a high confidence score before declaring mastery. It's a tighter bar, but it means that when a concept is marked complete, the learner has genuinely earned it.

The Park-and-Rotate Model

This is the heart of the system, and the piece we're most proud of.

A naive implementation of "master all concepts" would work through them sequentially: fully master concept A, then move to B, then C. The problem is obvious the moment you imagine a child who finds concept B genuinely difficult. They spend 40 minutes on it, never quite crack it, and the session ends with concepts C and D untouched. They feel like they failed. They probably did fail to make progress. And when they come back tomorrow, the wall is still there.

The park-and-rotate model works completely differently. Instead of blocking on one concept, the algorithm cycles across all active concepts in short rounds, 2 to 3 questions per concept per pass. After each mini-round, it evaluates and moves on regardless of outcome. No concept ever gets more than a few questions in a row.

The queue is ordered by confidence, weakest concepts first, so the hardest things get the most attention across the session. But no single concept can monopolise the learner's time.

What happens when a learner gets really stuck?

If a learner gets 3 wrong answers in a row on the same concept, the algorithm rotates immediately, it doesn't wait for the mini-round to finish. This is the single most important rule for emotional safety. Repeated failure on the same problem is what creates discouragement. By cutting the sequence short, we break the spiral before it starts.

The concept isn't abandoned. It comes back in the next round. And interestingly, learners often perform better on a concept after a break on something else. The frustration dissipates, and a fresh angle sometimes clicks.

Boy struggling at school

Keeping Kids Encouraged: Four Specific Mechanics

Beyond the rotation model, we built four explicit features to prevent discouragement.

1. Worked examples are learning, not failure

When a learner's confidence drops below 0.45, the algorithm shows a fully worked example, a complete, step-by-step solution at the easiest difficulty level.

Here's the subtle part: after the example, we apply a small confidence bonus to the next correct answer. The multiplier is capped just below the mastery threshold, so it can't shortcut genuine mastery, but it meaningfully rewards the learner for engaging with the example.

The framing matters here. The example is not "you got it wrong, so here's the answer." It's "here's another way to look at this." The bonus reinforces that.

2. Partial progress is real progress

A concept at 65% confidence will show a 65% progress bar, not an empty circle.

This sounds obvious, but a lot of educational software shows binary states: complete or incomplete. That's demoralising for a learner who has made real progress but hasn't crossed the mastery line yet. We will always show a visual state for the learners progress.

Children respond strongly to a bar that's filling up. Even if they haven't mastered something, seeing it move from 40% to 55% in a session feels like a win, because it is a win.

3. The 60-minute limit is a positive event

When a session hits 60 minutes, we save the learner's state and suggest an end to the session. But the message they see is carefully worded:

An example would be: "Great session, you've locked in 2 concepts! just 1 more to go next time and you will have mastered this lesson."

The "Locked in" wording is intentional. Completed concepts are banked achievements, not a shrinking to-do list. The remaining concept is framed as something exciting to come back to, not something they failed to reach today.

4. The push-to-close window

Between 30 and 45 minutes into a session, the algorithm shifts into what we call push-to-close mode. Instead of always prioritising the weakest concept, it starts prioritising concepts that are almost mastered, confidence above 0.65. The goal is to get the learner to a natural stopping point with as many concepts fully completed as possible, rather than having several half-finished when time runs out.

This means a learner who's close on two concepts has a good chance of finishing both before the hour, even if a third is still well below mastery. Walking away with two genuine completions feels much better than walking away with three partial ones.

The Teacher Safety Net

No algorithm is perfect, and some learners genuinely need human intervention. If a learner has submitted 20 or more answers on a concept and their confidence is still below 0.45, the system flags them for teacher review with added context.

The teacher doesn't just see a flag. They see: "Learner has made 23 attempts, current confidence 0.31, 3 worked examples shown." That's actionable information. The teacher can look at which specific questions the learner is getting wrong, what misconceptions might be present, and how to help.

Critically, the flagged concept is parked and the learner continues with other concepts while waiting. The lesson doesn't freeze.

What We Learned

Building this system taught us something that sounds obvious in retrospect: the goal isn't to get kids to the right answer. It's to get kids to believe they can get to the right answer.

A learner who finishes a lesson and thinks "that was hard but I got there" will come back tomorrow. A learner who finishes a lesson and thinks "I couldn't do it" won't. The algorithm's real job is to make the first outcome as likely as possible, for as many learners as possible, regardless of where they start.


Jamie Lake

Meet the writer - Jamie Lake

Driven by a passion for education and a personal understanding of what it means to struggle in school, Jamie combines 10+ years of software development with hands-on teaching experience to help every learner find their path.