memoza

The Memoza AcademyResearch

BFS and DFS as a way to think about learning

Depth first and breadth first as study policies: what the graph analogy buys, where it breaks, and how to turn it into a testable rule.

By Lucas Hsu · · 5 min read


Suppose you have a week to revise a course containing probability, statistical inference, and regression. You could spend the first two days working through probability until it feels secure. You could also sample all three areas on the first day, identify weaknesses, and return to each over the week.

Both approaches have a logic. They also spend your time differently. At Memoza, we use an analogy from computer science to make that choice explicit: depth-first and breadth-first learning.

The analogy is a way of describing study policies. It is not an established psychological theory called “BFS learning,” and evidence for interleaving does not automatically validate it.

What the graph represents

Imagine a course represented by concepts and relationships. Conditional probability supports Bayes' rule. Differentiation supports many optimisation procedures. Some relationships indicate prerequisites; others indicate that two methods are easily confused or useful to compare.

A depth-first policy spends consecutive effort within one branch before moving elsewhere. A breadth-first policy distributes attention across several eligible branches. “Eligible” matters: broad coverage should respect the knowledge needed to attempt an activity meaningfully.

The computer-science correspondence has limits. Literal breadth-first search visits nodes by graph distance; simply rotating through topics is not necessarily BFS. Literal depth-first search follows branches and backtracks; studying one chapter for an afternoon is only loosely similar. Human learning also requires repeated visits, whereas ordinary graph search often marks a node as visited and moves on.

Our intended meaning is therefore operational: how much consecutive effort should stay within a skill, and when should the next activity come from elsewhere? The three-pass ordering in breadth first, depth first is one answer to that question, written for a student with a syllabus and a date.

Breadth and depth contain several separate choices

Learning science already supplies more precise terms for parts of this problem. Blocking concerns the grouping of practice. Interleaving concerns the ordering of different categories or methods. Spacing concerns time. Retrieval concerns what the learner must produce. Prerequisite support concerns whether an activity is currently accessible.

A breadth-oriented schedule can still be badly spaced. A depth-oriented session can still contain retrieval and comparison. Neither label specifies feedback quality, difficulty, or the amount of practice.

This distinction matters when interpreting the evidence. Brunmair and Richter's meta-analysis found that the benefits of interleaving varied with the material and learning conditions (Brunmair and Richter, 2019). That is a reason to investigate when mixing helps, rather than assume that more switching always produces more learning.

The broad allocation problem is also older than contemporary AI. Metcalfe and Kornell's model of study-time allocation examines how learners select material and decide when further study is no longer worthwhile (Metcalfe and Kornell, 2005). It provides a research precedent for asking about the value of the next period of effort. It does not establish a universal rule about breadth and depth.

The same student can need both

Consider a student learning hypothesis tests. If they cannot form a null hypothesis from a verbal claim, a focused sequence on that step may be useful. Mixing in difficult regression questions would leave the obstacle unresolved.

Later, the student can carry out several tests but confuses their assumptions. At that point, a comparison task may be more valuable: here are three research designs; choose a method for each and explain your choice.

A week later, the relevant question changes again. Can the student still do this without notes? A delayed attempt supplies evidence that neither the earlier explanation nor the immediate success provided.

These examples are design illustrations. They describe plausible reasons to deepen, broaden, or review. Whether a particular system reliably makes those decisions better than a simple schedule is an empirical question.

From metaphor to a testable policy

To become useful engineering, the analogy needs explicit rules. How many attempts count as a focused block? Which prerequisites restrict eligibility? What ends a block? Does a review take priority over a new topic? What happens when the student asks to work on something else?

A candidate adaptive policy could use evidence of current performance, uncertainty, time since practice, and the demands of the course. Its available actions could include another attempt on the same skill, a prerequisite repair, a contrasting problem, a delayed review, or ending the session.

Those are proposed decision variables, not a claim that each has already been validated in Memoza. A model can make a policy explicit without making it correct.

The contribution of the breadth and depth framing is modest but useful: it makes staying on a topic a decision that can be examined. Continuing is sometimes right. Switching is sometimes right. Both should have a reason tied to what the student is trying to learn.

A model can make a policy explicit without making it correct.

How Memoza fits

A seam for exactly this decision is built, and today it is deliberately inert. A pure stage in the recommender restricts which of the eligible candidates the scorer is allowed to choose between, under one of four named policies: balanced, depth first, breadth first, and adaptive. Balanced is the identity. It restricts nothing, and it is what a session resolves to unless a running study has enrolled that student in an arm, which none has, so nobody's practice is ordered differently because of it. What the product does carry is the record the comparison would need: each step the practice loop recommends stores which policy governed it and how many candidates it was choosing between, balanced steps included.

References

Brunmair, M., & Richter, T. (2019). Similarity matters: A meta-analysis of interleaved learning and its moderators. Psychological Bulletin, 145(11), 1029–1052. https://doi.org/10.1037/bul0000209 Meta-analysis.

Metcalfe, J., & Kornell, N. (2005). A region of proximal learning model of study time allocation. Journal of Memory and Language, 52(4), 463–477. Model and empirical research.

Put it into practice. Memoza marks your answers against a pre-validated solution and shows where the marks went.

See how a course orders your practice

Put the ideas to work.

Explore course practice in Memoza.

Try the demo, up to 3 questions

Explore course practice