a small revolution in flash card applications

Introduction

Hello Habr! I have always dreamed of creating an ideal application for learning and memorizing information, I tried to understand how memory works in general, how well it can work, what and how it depends, in this article we will see what I have achieved at this stage, or maybe I have nothing I didn’t do that. I will be glad to criticize, and if the project is open source, I will be glad to pull requests/suggestions.

How did it all start?

In 2020, I became obsessed with the idea of ​​learning languages, there are so many of them that my eyes are wide open, I want to learn both. Later, of course, I chose Spanish and English as a priority, and a little later I realized what level I wanted them for – English (B1/B2), Spanish A2. And of course I used apps to learn vocabulary and phrases. In such applications, “Weak”, “Average” and “Strong” cards flash quite often. And now I’m sitting in the application, it seems like I’m responding to words, it’s already good, but they somehow move between states according to an incomprehensible algorithm. Rather, there is something primitive there, similar to the number of answers and non-answers; I was not satisfied with such an evaluation system. As a result, having tried various applications, based on what I had read about the principles of learning and how the brain works, I caught myself thinking: In one application one thing is good, in another – another, there are things that are not in either one, and how cool it would be to collect all of them chips in one place and coordinate with each other.

As the saying goes:

If you criticize, suggest!

And here we will offer it.

First prototype, ancestor of MindVault

First prototype MindVault was called GreekMemo and worked on the principle of brute force, there was already some kind of weak rating system, and the number of necessary ratings for a word to be considered learned, and in general, it was all not bad, however, it was still a hat compared to my Napaleon plans. I struggled with the GUI interface and other things for a long time.

By the way, GreekMemo looked something like this:

import os
import random
import difflib

def check_ratio(s1, s2):
    s = difflib.SequenceMatcher(None, s1, s2)
    return round(s.ratio(), 2)

DELIMITER = input('Delimiter: ')
AMOUNT_PER_SESSION = int(input('Amount: '))
INPUT_FILE = input('File: ')

cards = dict()
answers_data = dict()

with open(INPUT_FILE, 'r', encoding='utf-8') as f:
	for line in f.readlines():
		question, answer = line.split(DELIMITER)
		cards[question.strip()] = answer.strip()

questions = list(cards.keys())
random.shuffle(questions)

attemps = 0
while True:
	question = random.choice(questions[:AMOUNT_PER_SESSION])
	answer = input(f'{question}: ')
	answer_ratio = check_ratio(cards[question], answer)
	if not question in answers_data:
		answers_data[question] = 0
	if answer_ratio >= 0.9 and answers_data[question] > 2:
		questions.remove(question)
		del answers_data[question]
		del cards[question]
		message="Learned!"
	elif answer_ratio >= 0.8:
		answers_data[question] += 1
		message="Right!"
	else:
		message = f'Wrong! ({cards[question]})'
	attemps += 1
	if attemps > 2:
		attemps = 0
		os.system('cls')
	print(message)

The first MindVault core, also known as CogniVersa

Six months ago I finally overcame my procrastination, and in principle I don’t remember how it was, but I collected and structured in my head everything I wanted to do and the result was the CogniVersa core in the language NodeJSalthough there is not much from the node itself, it can be considered made on JavaScript. Not so long ago it was deleted, and since there are no backups of it, I won’t be able to show it, it was similar to the current one, only with some flaws in logic, assessment calculations and something else, which I later inherited MindVaultwhich were corrected later.

The long-awaited release, everything works, and even almost as it should

Two weeks ago the first full-fledged release of this miracle was released, but from time to time there were all sorts of shortcomings in working with the GUI menu (I use Swing with FlatLaf themes to support Java 8+), flaws in the logic, something is not updated, in some places the interface is crap, but then after several updates, rethinking the logic and other things, I came to this:

How is MindVault different? About his tricks and killer features

Five card states: Repetition, Weak, Average, Strong, Not studied

By the way, they are located according to their priority, more on that later

Grading system: When creating a session, the application asks you to enter a word/phrase or something in order to calculate the comfortable speed at which you type, this is necessary in order to then understand whether you thought about the answer for a long time or not, that is, the speed of the answer is also included in the assessment

IN speed estimate includes not only the typing speed, but also the thinking speed, which depends on the current average rating, if they are very good they give you 3.5 seconds to think plus your typing speed plus another half of your typing speed, so to speak penalties, you never know

Further, accuracy assessment answer, everything is simple here: if you write “knock” instead of “knock” it will be about 80% accurate out of 100% and the program will of course tell you that it was almost correct and it’s worth writing it like that (just in case)

As a result, the score for answering a card is: median of speed + accuracy

Then they are collected in an array and the overall score among all of them is calculated there, this is the score for the session

Briefly about the assessment for the session: In the config itself there is a thing – perSessionCards, this is the number of cards that are learned at a time. The basis here is such a thing that a person can hold a maximum in short-term memory at a time 10-11 units, on average, of course 7-9. This is what the assessment influences, it regulates how much per session you are currently studying from 5 before 10 cards at a time, based on the scores you receive.

How does the transition between states occur: Initially, when you add cards they are all able LEARN (not learned), after learning all cards go into WEAK (weak) regardless of the assessment, since the brain remembers the last 3-5 actions, it is necessary that the card is still encountered. Then it depends on the answers: if the score is low, we remain in WEAK, answered average/good, let's go from WEAK V MIDDLE. And so on until the card gets into STRONG (strong) – these cards are considered learned + worked out.

Category REVISE, spaced repetition Ebbinghaus:

The next time you load the session config, the application updates the cards, checks what interval you are currently on and whether it is violated. If the interval is violated, the card is considered forgotten (Of course, this is not a fact, especially if the interval is already large or the word is used, and in the future the logic of the program will still be corrected and improved) and moves to LEARN. An interval violation is: the current interval + a third and a half of this interval

Intervals (days since last repetition): 1, 3, 7, 14, 30, 60, 120, 240

Transitions between states from REVISE differ from LEARNhere is where the word will fall in WEAK, MIDDLE or immediately to STRONG directly depends on the assessment, because if a word is remembered well and easily after a while, then it does not require elaboration.

Priorities: The first priority is considered REVISEbecause if there is something to repeat, you must repeat it first, then they go WEAK, MIDDLE for elaboration, and only then can we learn something new.

Some restrictions set by the program and in the future may be configurable parameters (and some not): You can learn a maximum of 100 new cards per day, perhaps this will be customized later. Pomodoro timer for mental tasks, diagram 20-5-20-5-20-15 (that is, we work for 20 minutes, rest for 5, and have a long break of 15 minutes.) at the same time, you can do a maximum of 3 such training blocks per day, this will protect you from the mess in your head, at least it should.

Where can I touch it? What principles were included in the basis?

The principles of learning and brain function that formed the basis for creating the application:

  1. Spaced repetition is a technique of repeating information at increasing intervals of time. It is based on the Ebbinghaus forgetting curve. By repeating material on an optimal schedule, you can effectively move knowledge from short-term to long-term memory. MindVault uses intervals of 1, 3, 7, 14, 30, 60, 120, 240 days for optimal retention.

  2. Intensity – the principle of working on a task as focused as possible, without distractions. MindVault's Pomodoro Timer helps you stay focused by alternating periods of intense work of 20 minutes with short breaks of 5 minutes. This avoids mental exhaustion.

  3. Volume limitation (chunking) – in one approach it is optimal to learn a limited amount of new information, about 5-10 elements. The human brain is capable of holding 7±2 units in working memory. MindVault adjusts the number of cards per session from 5 to 10 depending on your results.

  4. Multi-stage memorization – for reliable assimilation, it is not enough to remember a fact once. It takes several repetitions to transfer knowledge from short-term to long-term memory. In MindVault, cards go through 5 stages – Unlearned, Weak, Average, Strong, Repetition. This ensures gradual development of the material.

  5. Prioritization – first of all, you need to repeat what has already been learned earlier, and only then move on to new material. MindVault prioritizes Review cards, followed by Weak and Average. And only after they are exhausted, he offers to learn new cards from the Unstudied category. This helps not to forget what has already been mastered.

The application is completely open, as can be understood from the introduction itself, by the way it is on Java.

Git: https://github.com/DedInc/MindVault

The code is far from perfect, I can only do so-so JavaI just wanted cross-platforms and then implement it on Android, if you like it, you can use it, and again: I will be glad to see your ideas and advice.

Good luck to the whole hub 🙂

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *