## The Game Design of Math Academy [Math Academy](https://mathacademy.com/) is a very good website for learning math. It's essentially a package manager for mathematical knowledge. But what makes it so fascinating to me is its excellent game design. I've never seen a better example of gamification in learning. My major in college was game design and it's been a lifelong passion of mine, so I couldn't resist the opportunity to write about it and brainstorm ways to make it even better. **Note**: gamification can make Math Academy more fun, but it wouldn't matter if Math Academy were not effective for learning math. Luckily, it is extremely effective. They have a very long white paper called ["The Math Academy Way"](https://docs.google.com/document/d/1LLZK_34Oer9LwuqAv-pqxfXlR8n7V8zJ_MO323R7egI/edit?tab=t.0) which explains how they use modern pedagogical science to effectively teach math. **Note 2**: I am not financially affiliated with Math Academy in any way, beyond being a satisfied customer. ## Basic site mechanics Before I can explain Math Academy's game design, I should explain the basic mechanics of how the site functions. First, they created a dependency graph for math. Certain math concepts require others to be understood - they have a graph node for each concept, and edges connect concepts with their prerequisites: ![[math-academy-graph.png]] [image source](https://www.mathacademy.com/how-our-ai-works) That was just a snippet. Their graphs are very big. Here is the graph for one course: ![[math-academy-big-graph.png]] [image source](https://www.mathacademy.com/how-our-ai-works) And here is a graph that connects concepts between multiple courses: ![[math-academy-graph-bigger.png]] [image source](https://www.mathacademy.com/how-our-ai-works) This information is used when personalizing the site's educational flow. When you make an account, you select what subject you want to learn. You then take a placement test, which is used to determine which concepts you already know. Then it performs a topological sort on the concepts you don't yet know, and introduces them to you in that order. Pretty genius in my book. I wish I had this for every subject! ## Game design Anyway, you don't need to know any of that to actually use Math Academy. The UI of the site looks like this: ![[math-academy-homepage.png]] On the top right are lessons. You can select any one of these and study it. This is the first aspect of game design that Math Academy gets right: autonomy. ## Autonomy Many games don't offer the player much autonomy. If you play Tetris, you pretty much are just going to be playing Tetris in the same way you always would. But it's a staple of modern games that you have choices in what to do. In RPGs, you often have a main quest and many options for side quests, that you can decide to pick up or not to pick up. Or you can decide what areas to explore in which order. For example, look at the quest log in The Legend of Zelda: Tears of the Kingdom: ![[totk-quest-log.png]] [image source](https://www.polygon.com/zelda-tears-of-the-kingdom-guide/23725447/the-beast-and-the-princess-quest-steps) You notice it has a list of quests and you can pick which one to do next. Math Academy works in a similar way. It shows you 5 lessons, and you pick whichever one you feel like studying: ![[math-academy-quest-log.png]] This reminds me of the classic technique to gets kids to eat their vegetables. Instead of buying vegetables you like and trying to convince your kids to eat them, you take them to the store and ask them to pick out some vegetables they want to eat. Adults are generally just grown-up kids, and so everyone inherently enjoys things more when they have some choice in the matter. ## Progress tracking It is a universally understood truth that humans like watching numbers go up. I'm not totally sure why, since it doesn't seem likely that this came up very often in the ancestral environment. Then again, maybe that's why we like it so much: it's superstimulus for our sense of progress. Math Academy tracks your progress by giving you points after each lesson, called XP. Whenever you complete a lesson, you get "XP" in proportion to how many of the questions you got right. If you get all the questions right, you get an additional 2 XP bonus. 1 XP corresponds to about 1 minute of work. ![[math-academy-xp-bonus.png]] When you complete the placement test, you get an email telling you how long it'll take you to complete the course based on various rates of acquiring XP: ![[math-academy-xp-estimates.png]] So with this information, you are able to set an XP goal in the Math Academy UI in an informed way. Your progress towards your goal for that day is also indicated in the Math Academy UI: ![[math-academy-xp-progress.png]] This creates that classic number-go-up superstimulus effect. *You* chose your daily goal, so it inherently has relevance to you. You then can see your progress towards your goal listed prominently, and you can watch it go up every time you do something. Also, next to each lesson is an indication of how much XP you'll earn from the lesson. This motivates you to do the lessons by creating a direct mental connection between each lesson gaining XP from it. It also gives you more autonomy - do you feel like doing a quick 7 XP lesson right now, or a longer 13 XP lesson? **How it could be better**: When you complete a lesson, show the progress bar towards completing your XP goal for the day. Ideally, animate it growing from its old value to its new value. ## Popcorn effect I heard this term from a game design forum a long time ago. In Super Mario Bros Wii, each level is pretty short, usually taking just a couple minutes to complete. The theory was that this created a "popcorn effect", where the game is easy to pick up because you can say "I'll just play one quick level then be done". And then it's easy to continue playing because you can always say "well... I have time for just one more level". If levels took 45 minutes to complete, it would be a different story. Each Math Academy lesson takes only a few minutes. (~7 minutes for the 7 XP lessons.) This makes the mental energy required to start using the site very low. That low mental-energy requirement enables what the Stanford philosopher John Perry calls "Structured Procrastination". In his essay by the same name, he describes "Structured Procrastination" like this: > I have been intending to write this essay for months. Why am I finally doing it? Because I finally found some uncommitted time? Wrong. I have papers to grade, textbook orders to fill out, an NSF proposal to referee, dissertation drafts to read. I am working on this essay as a way of not doing all of those things. This is the essence of what I call structured procrastination, an amazing strategy I have discovered that converts procrastinators into effective human beings, respected and admired for all that they can accomplish and the good use they make of time. All procrastinators put off things they have to do. Structured procrastination is the art of making this bad trait work for you. The key idea is that procrastinating does not mean doing absolutely nothing. Procrastinators seldom do absolutely nothing; they do marginally useful things, like gardening or sharpening pencils or making a diagram of how they will reorganize their files when they get around to it. Why does the procrastinator do these things? Because they are a way of not doing something more important. If all the procrastinator had left to do was to sharpen some pencils, no force on earth could get him do it. However, the procrastinator can be motivated to do difficult, timely and important tasks, as long as these tasks are a way of not doing something more important. The fact that Math Academy lessons are so short makes them very attractive to Structured Procrastinators. Any time I don't feel like working on a ticket at work, I've been trying to train myself to open Math Academy instead of opening social media. (Similar to John Perry, right now I'm writing this essay because I don't feel like doing either.) The reason Math Academy lessons are able to be so short is because they use spaced repetition. Each lesson is short, but you'll soon review what you learned so you don't forget it. (Reviews either happen naturally as you use the material in future lessons, or are done explicitly through special "review" segments.) **How it could be better**: Math Academy would probably be even more fun if it made its lessons slightly shorter. I think 3-4 minutes is probably around the sweet spot. But the current lesson length is already very good. ## Inter-level variety The fact that Math Academy lessons are short means you do many different lessons in a given study session. Since each level is a different concept, that means you study many different concepts in a given study session. The fact that you keep jumping around makes it very engaging. **How it could be better**: Although it's already very engaging, it could be fun to have the occasional non-math subject interspersed for students who are also interested in other things. For example, it would be cool to have a geography course, where it would show the user a picture like this one and they would be asked to say what country it was: ![[brazil-on-map.png]] Notice that this is also not really how school is structured. You do have a variety of classes, but within each class is a massive block of time where you generally focus on just one aspect of that subject. ## Intra-level variety and flow state In math class in high school or college you normally spend 45 minutes listening to a lecture on one topic, then later do 45 minutes of homework where you work on the problems yourself. As many people have noticed, math class is not very fun. I think this is part of why. First of all, listening to someone talk for 45 minutes is often pretty boring. (Anyone who's been in a 45 minute meeting where they had to pay attention but couldn't speak can attest to this.) It is so inherently boring that it is a mark of a great lecturer if they are able to make it entertaining. Math Academy lessons work differently. They start out with a short introduction: ![[math-academy-lesson-introduction.png]] Then they give a worked example: ![[math-academy-example.png]] Most people can read these in a few minutes, provided they understand the prerequisites. Then you immediately are provided with a problem to solve: ![[math-academy-question.png]] This is much more engaging than the traditional class structure. You aren't just sitting passively, or trying to force yourself to absorb the information by means of taking notes. **How it could be better**: I'm reminded of "See One, Do One, Teach One". This is a principle of medical education where medical trainees first observe a procedure, then perform it themselves, and finally teach it to others[^1]. In a class setting, I think "teach one" might be a good addition to the Math Academy way. If you get a question wrong, Math Academy inserts a new problem into the lesson. That means that if you make a lot of mistakes on problems of a certain type, you will naturally spend more time doing problems of that type. However, if you make few mistakes, you'll quickly progress to more advanced problems. After doing enough problems to be familiar with the concept, you start getting exposed to harder versions of the same concept, with new examples: ![[math-academy-problem-harder.png]] This keeps you from getting bored. 1. You're always active, because you're spending most of your time actively solving problems. 2. You're always pushing the limits of your ability. Once you've solved 2-3 examples successfully, you're immediately upgraded to more difficult problems. This is evocative of what the psychologist Mihaly Csikszentmihalyi calls the "flow state". This is a description of how the user's capabilities must be perfectly matched with the task difficulty to avoid anxiety or boredom. If the task is too easy, the user is bored. If the task is too difficult, the user gets anxious. But when the task is just right for the user's skill, their capabilities grow in a very fun and rewarding way. ![[flow-zone.png]] [image source](https://www.researchgate.net/figure/Graph-of-Csikszentmihalyis-flow-state-when-a-persons-ability-to-execute-a-task_fig1_279226015) This is a central tenet of game design. The reason games are so often separated into levels is to give a feeling of progress, but also to make sure that each level is the perfect difficulty for the player. **How it could be better**: The alternating explanations, examples, and problems already provide some variety within the level, as do the fact that the problems increase in difficulty throughout the level. But each problem is currently just a multiple-choice question – it would be more fun if there were a few different problem types within each level. For example, there could be problems where you have a text box and have to write the answer textually (when the answer is a simple integer). ## Competition On the left side of the main Math Academy page is a leaderboard: ![[math-academy-leaderboard.png]] (I've censored the names of the people in the demotion zone.) Currently, I'm in the "bronze league". Every Monday, the top few people in each league are said to be in the "promotion zone" and enter the next league. The bottom few are in the "demotion zone" and fall into the previous league. In an odd way, this makes you feel less alone when playing Math Academy. I'm "anchpop", and I can see that "bogbec" is only 2 XP ahead of me. How could I resist getting 2 more! Furthermore, I can set my sights on beating him and resolve to always have more XP than him for the rest of the week. If I come back tomorrow, I'm sure bogbec will have accumulated some more XP, so I'll have a motivation to get some more myself It also combines with the feeling of progress, because I have an inherent desire to progress into the silver league. (Look how close I am to promotion!) It also adds in a fear of losing what you've earned - I've climbed up into the bronze league from the pits of the iron league, so I'm not about to let myself enter the demotion zone and fall back down. **How it could be improved**: It would be cool to be able to have friends and compare your XP earned against theirs. And I assume that many people using the app have classmates that are at a similar skill level to them, so it would be cool if certain problems had labels that said: "**Warning**! Your friend 'ChadNauseam' got this problem wrong!". ## You may also like: 1. [Don't Hate the Player, Hate the Game](https://substack.com/@chadnauseam/p-151768107) 2. [New Research Direction: Path Tracing for Pixel Art Games](https://sexandchicago.substack.com/p/new-research-direction-path-tracing) [^1]: Due to recent concerns about trivialities like "patient safety", I don't think this principle is as often used now as it used to be.