
Game: Loading a foreign language into the brain
- Tutorial
Do you have situations when a word, idiom or grammatical construction of a foreign language cannot be kept in your head, despite the fact that you have met it many times and even specially taught it? And how many percent of foreign words do you remember a month after studying them? And six months later? Is it difficult for you to motivate yourself to learn a foreign language?

With answers to these questions, comes the realization that something needs to be done with the problem of forgetting a significant part of the previously studied. Not only effectively teach, but also effectively maintain their knowledge. In addition, there is a problem of overcoming resistance to routine activities, which can help solve the introduction of game elements in the process of monotonous repetition.
Under the cut you will find a story about a method of learning a foreign language using flashcards, about the technique of effective use of the method and about the fundamental features and algorithms of one version of a software implementation.
So, let's start first, that is, with the ancient (warm lamp) method of learning a foreign language using cards and the features of its correct application, and then look at how we can improve it using modern technology and algorithms.
Using flashcards to learn the language is an intuitive method, the essence of which is extremely simple: Take a small piece of paper, on one side of which the text is written in a foreign language, and on the other side in its native language. Such leaves are collected in decks, in their native language, shuffled and drawn out one at a time. The task of a person is to restore a text in a foreign language, seeing only a translation into his native language. What could be easier? But there are also hidden pitfalls:
This question is worth it to dwell on it in more detail, since the cramming of individual words is the most common mistake in learning a foreign language.
When we express our thoughts, we build our speech from basic primitives, minimal units, just like at home from ready-made blocks or complex programs from several dozen programming language operators. But is the word the minimum unit of language? Let's look at a few examples.
First, languages share shades of meaning in different ways. For example, knowing that the verb “ solve ” is translated into English as “ to decide ”, the phrase “ solve a problem ” can be translated as “ to solve a problem", But it will be a mistake, and the correct option:" to solve a problem ".
Secondly, the same words can mean completely different concepts, which are determined solely by the context in which they are used. For example, the phrase verb “ to put on ” can have more than a dozen meanings when translated into Russian and the sentence “ It was Angela who put William on to Steven ” can be translated in various funny ways: “ Angela put William on Stephen ” or “ Angela put on William” on Stephen ”and so on, but the correct version of“ William and Stephen brought it was Angela ”(more precisely, the phrase“ to put on to ” is used here ).
Thirdly, each language has its own, unique idioms, the appearance of which is due to the unique combination of historical and cultural events. In idioms, the whole phrase takes on a new, often multifaceted meaning. For example, you might guess that “ More haste, less speed ” more or less corresponds to “ Slow, you will go further, ” but what about “ Don't give yourself airs ”, “ You look like red herrings ”, “ Still waters do” run deep "or" We don't mean to talk shop ". Not everything is so obvious, is it?
Fourth, grammar. Words cannot be combined arbitrarily, and for a natural language there is no way to use a compiler that can check everything and find syntax errors. Grammar is the most important topic for learning a language and I, by no means, do not want to ignore the study of grammar rules. But let's remember that after each grammar rule there are always examples and, sometimes, we cannot formulate the rule itself, but examples arise in the head and we, by analogy, speak correctly, but at the same time, we don’t even know why. Let's go even further and recall the fact that any child speaks his native language very well, without even knowing such a word as “grammar”. Children, over several years of immersion in the language environment, accumulate a sufficient number of basic elements,
Fifth, related text is remembered better. It is really simple here: a word torn out of context is most often just a word, and a complete phrase gives an image, sensations, emotions and causes us diverse associations. But we will talk more about emotional color, and now let's summarize:
Learning individual words in a foreign language is a boring and time-consuming process, and most importantly, not able to give the basic building blocks of the language that can be combined and create complex structures.
So then what to teach?
Everything is very simple: write on the cards complete thoughts in the language: phrases, sentences or even a few sentences. Moreover, it doesn’t matter that out of ten words in the phrase there is only one unfamiliar word or a new turn. The main thing is that each card conveys a complete thought, and ten familiar words will help to weave the old word into a tangle of associations, which is, in fact, our memory. In addition, the practice of writing sentences in a foreign language will have a good effect on grammar proficiency.
Examples from a grammar textbook are also good candidates for getting onto cards, but it's even better to add sentences with unfamiliar grammatical constructions from other sources to cards. After you notice a strange turn several times, it will begin to “burn the brain” and you will be forced to find the corresponding rule, which is more likely to remain in your memory, because you were interested, and this interest made the rule emotionally colored. And if, nevertheless, it is forgotten, then sooner or later a card with an appropriate example will come to hand and refresh the memory.
Let's go ahead and talk about how to choose phrases and sentences for getting on cards. The key word here: emotional coloring, that is, any feelings should be associated with the phrase on the card. At the same time, it does not matter at all whether these are good memories or bad, serious or stupid, dramatic or funny ones. What matters is the brightness of these experiences.
If you take a phrase from a book and the names of the characters participate in it, then the phrase will be remembered better if you know the plot of this book, the history of these characters, the exact episode in which the phrase was said, and so on. And it will be even better if you really liked the book or, it doesn’t matter, really didn’t like it. Favorite songs, films, TV programs, videos on Youtube or audio books are also excellent candidates and even better than books, as they help to develop the ability to understand listening comprehension of oral speech.
Another important aspect of using cards is that after you read the phrase in your native language, you must say the answer out loud, clearly and at a natural volume.
Firstly, the pronunciation of the phrase allows you to remember it better, since the flow of sensations associated with this phrase increases significantly: you concentrate on the pronunciation, hear the sound of your own voice, feel the work of the muscles. It will be even better if you make a gesture or expression with your pronunciation or even sing your phrase. All this increases the notorious emotional coloring and associative connectedness.
Secondly, speaking aloud is a good practice in speaking: pronunciation, intonation and speed.
Unfortunately, each method has drawbacks. The most important of them that I felt on myself is pronunciation. If you do not pronounce a particular word correctly, then this method will only make your pronunciation gain a foothold. Therefore, it is important to carefully monitor the accuracy of the pronunciation and correct it as soon as possible.
There is a useful pronunciation exercise: you can select several audio recordings of phrases in a foreign language and listen carefully to each phrase, and then try to copy it as accurately as possible, recording yourself on the recorder. You need to compare two notes, find differences in pronunciation and repeat everything again and again, improving your speech.
There is a simple rule: What we train, we develop. That is, if we just read, then sooner or later we will learn to do it, but we won’t be able to say something or distinguish by ear, if we are only engaged in oral speech, we won’t be able to write and so on. Therefore, devote your time to all the main disciplines of the language: listening comprehension, speech, reading and writing.
We seem to have figured out the method. Now let's look at what information technology can offer us to improve it.
There are a great many programs for electronic cards, and everyone who reads this text should have a question, why did I devote myself to the passion of bicycle building and wrote my own. There were several reasons for this:
First, some programs are optimized for learning words, not phrases. I already wrote about this in detail, we will not stop.
Secondly, in this program there is only one, only list of cards and there is no division into groups, phrases or lessons. The fact is that I experience chronic intolerance to any routine and uninteresting actions (and cramming applies to them, no doubt) and therefore, forcing myself to not only learn new words, but also repeat old ones is difficult for me and I find thousands of reasons to do something more interesting. In this regard, I do not want to share my cards on any basis other than the "level of their knowledge" and I do not want to switch between the process of studying and repeating. Perhaps you have a question, but how does it happen that old cards do not interfere with the study of new ones? I will try to answer this question further.
Thirdly, some programs dictate the training schedule in such a way that cards have to be given a strictly defined time, and at the same time regularly. But, most often, finding the exact time is difficult and I need the opportunity to spend both five minutes and three hours when I feel comfortable. I perfectly understand that the effectiveness of methods based on a clear schedule has been scientifically proven, but what's the point if you can’t follow them?
Let's take a look at the screenshots. This is what the main program window looks like:

Everything is extremely simple:
Nothing tricky. The screenshot shows the Score parameter . It increases with the addition of new words and the receipt of the correct answers and decreases from the reverse actions. Purpose of the game: to score 100,000 points, then the program will show the cartoon, exactly as in the game "Wait a minute!" .
And this is how the card editor looks:

It's time to open the hood and see how it all works. The level of knowledge of each card is expressed in weight coefficient (floating point number), on the basis of which, in a pseudo-random manner, a card is selected for display to the user. That is, the basis of the algorithm is the selection of random weighted elements from the set. Each response from a Success or Failure user changes the weight of the card, respectively, to a smaller or larger side.
The weight of the card after the answer changes the following code:
Upon receipt of the correct answer, the weight decreases exponentially, while for the minimum card weight it is chosen not zero, but one, in order to avoid a situation in which the probability of showing the card will be close to zero, and also to avoid possible problems with rounding.
When an incorrect answer is received, the weight increases logarithmically: the smaller the current weight, the greater the value. This approach allows you to simulate a situation where the user gives the wrong answer to the learned card. In this case, the card is immediately transferred to the category of unexplored and, with a high degree of probability, will again be shown to the user in the near future.
Parameters IncorrectAnswerFactor and CorrectAnswerFactordefaults to 0.5 and can be changed in the settings file.
It remains to figure out how to ensure the existence of a single list for all cards, or rather, how to ensure that long-learned cards do not interfere with the active study of those that have been added recently.
To solve this problem, two parameters will help us: Maximum MaxWeight and initial InitialWeight card weight. We make the maximum weight of the card equal to the number of cards multiplied by some MaxWeightFactor coefficient , and the initial weight of the card will be equal to half the maximum weight. Then, provided that all cards are learned (i.e., their weight is approximately 1), their number is N andMaxWeightFactor = 1 (the default value), the new card will have a starting weight (N + 1) / 2 and the probability it will select the next card is approximately equal to 1/3 . That is, the probability of choosing a new card does not depend on the number of cards, and this is exactly what allows you to store all the cards in one large deck.
The article examined an effective method of memorizing elements of a foreign language using double-sided cards. The key elements of the method and the rules for obtaining the maximum return on it were described. The features of the software implementation of this method were distinguished that distinguish it from existing analogues (the only deck of all cards, the absence of explicit switching between learning and repetition, the absence of a schedule imposition), and the algorithms to ensure such features are described.
And finally, links:
Direct download link ( Windows, portable ): github.com/black-square/iFlashcards/releases/download/v1.2.5/iFlashcard-1.2.5.zip
Project page: code.google.com/ archive / p / smart-flashcards
Example card set:github.com/black-square/iFlashcards/releases/download/v1.2.5/settings.xml GitHub
source code ( C ++, Qt, Boost ): github.com/black-square/iFlashcards In this article, I wanted to describe the difficulties that I had while studying a foreign language and how the attempt to solve them led me to launch a new open source project. I wanted to share my results with the community, to receive constructive criticism of the method and algorithms, and also to express the hope that my achievements would be useful to someone else. And, of course, I invite everyone to take part in the project: share ideas, get tasks / bugs and send pull requests.

With answers to these questions, comes the realization that something needs to be done with the problem of forgetting a significant part of the previously studied. Not only effectively teach, but also effectively maintain their knowledge. In addition, there is a problem of overcoming resistance to routine activities, which can help solve the introduction of game elements in the process of monotonous repetition.
Under the cut you will find a story about a method of learning a foreign language using flashcards, about the technique of effective use of the method and about the fundamental features and algorithms of one version of a software implementation.
So, let's start first, that is, with the ancient (warm lamp) method of learning a foreign language using cards and the features of its correct application, and then look at how we can improve it using modern technology and algorithms.
Learning a language with flashcards
Using flashcards to learn the language is an intuitive method, the essence of which is extremely simple: Take a small piece of paper, on one side of which the text is written in a foreign language, and on the other side in its native language. Such leaves are collected in decks, in their native language, shuffled and drawn out one at a time. The task of a person is to restore a text in a foreign language, seeing only a translation into his native language. What could be easier? But there are also hidden pitfalls:
Should I learn single words?
This question is worth it to dwell on it in more detail, since the cramming of individual words is the most common mistake in learning a foreign language.
When we express our thoughts, we build our speech from basic primitives, minimal units, just like at home from ready-made blocks or complex programs from several dozen programming language operators. But is the word the minimum unit of language? Let's look at a few examples.
First, languages share shades of meaning in different ways. For example, knowing that the verb “ solve ” is translated into English as “ to decide ”, the phrase “ solve a problem ” can be translated as “ to solve a problem", But it will be a mistake, and the correct option:" to solve a problem ".
Secondly, the same words can mean completely different concepts, which are determined solely by the context in which they are used. For example, the phrase verb “ to put on ” can have more than a dozen meanings when translated into Russian and the sentence “ It was Angela who put William on to Steven ” can be translated in various funny ways: “ Angela put William on Stephen ” or “ Angela put on William” on Stephen ”and so on, but the correct version of“ William and Stephen brought it was Angela ”(more precisely, the phrase“ to put on to ” is used here ).
Thirdly, each language has its own, unique idioms, the appearance of which is due to the unique combination of historical and cultural events. In idioms, the whole phrase takes on a new, often multifaceted meaning. For example, you might guess that “ More haste, less speed ” more or less corresponds to “ Slow, you will go further, ” but what about “ Don't give yourself airs ”, “ You look like red herrings ”, “ Still waters do” run deep "or" We don't mean to talk shop ". Not everything is so obvious, is it?
Transfer
“ Do not be conceited ,” “ You look like a white crow ” (and they have red herrings), “ There are devils in a quiet pool ,” “ We are not going to talk about business ”
Fourth, grammar. Words cannot be combined arbitrarily, and for a natural language there is no way to use a compiler that can check everything and find syntax errors. Grammar is the most important topic for learning a language and I, by no means, do not want to ignore the study of grammar rules. But let's remember that after each grammar rule there are always examples and, sometimes, we cannot formulate the rule itself, but examples arise in the head and we, by analogy, speak correctly, but at the same time, we don’t even know why. Let's go even further and recall the fact that any child speaks his native language very well, without even knowing such a word as “grammar”. Children, over several years of immersion in the language environment, accumulate a sufficient number of basic elements,
Fifth, related text is remembered better. It is really simple here: a word torn out of context is most often just a word, and a complete phrase gives an image, sensations, emotions and causes us diverse associations. But we will talk more about emotional color, and now let's summarize:
Learning individual words in a foreign language is a boring and time-consuming process, and most importantly, not able to give the basic building blocks of the language that can be combined and create complex structures.
So then what to teach?
Everything is very simple: write on the cards complete thoughts in the language: phrases, sentences or even a few sentences. Moreover, it doesn’t matter that out of ten words in the phrase there is only one unfamiliar word or a new turn. The main thing is that each card conveys a complete thought, and ten familiar words will help to weave the old word into a tangle of associations, which is, in fact, our memory. In addition, the practice of writing sentences in a foreign language will have a good effect on grammar proficiency.
Examples from a grammar textbook are also good candidates for getting onto cards, but it's even better to add sentences with unfamiliar grammatical constructions from other sources to cards. After you notice a strange turn several times, it will begin to “burn the brain” and you will be forced to find the corresponding rule, which is more likely to remain in your memory, because you were interested, and this interest made the rule emotionally colored. And if, nevertheless, it is forgotten, then sooner or later a card with an appropriate example will come to hand and refresh the memory.
Emotional coloring
Let's go ahead and talk about how to choose phrases and sentences for getting on cards. The key word here: emotional coloring, that is, any feelings should be associated with the phrase on the card. At the same time, it does not matter at all whether these are good memories or bad, serious or stupid, dramatic or funny ones. What matters is the brightness of these experiences.
If you take a phrase from a book and the names of the characters participate in it, then the phrase will be remembered better if you know the plot of this book, the history of these characters, the exact episode in which the phrase was said, and so on. And it will be even better if you really liked the book or, it doesn’t matter, really didn’t like it. Favorite songs, films, TV programs, videos on Youtube or audio books are also excellent candidates and even better than books, as they help to develop the ability to understand listening comprehension of oral speech.
Speaking the answer out loud
Another important aspect of using cards is that after you read the phrase in your native language, you must say the answer out loud, clearly and at a natural volume.
Firstly, the pronunciation of the phrase allows you to remember it better, since the flow of sensations associated with this phrase increases significantly: you concentrate on the pronunciation, hear the sound of your own voice, feel the work of the muscles. It will be even better if you make a gesture or expression with your pronunciation or even sing your phrase. All this increases the notorious emotional coloring and associative connectedness.
Secondly, speaking aloud is a good practice in speaking: pronunciation, intonation and speed.
Do not forget: a silver bullet does not exist
Unfortunately, each method has drawbacks. The most important of them that I felt on myself is pronunciation. If you do not pronounce a particular word correctly, then this method will only make your pronunciation gain a foothold. Therefore, it is important to carefully monitor the accuracy of the pronunciation and correct it as soon as possible.
There is a useful pronunciation exercise: you can select several audio recordings of phrases in a foreign language and listen carefully to each phrase, and then try to copy it as accurately as possible, recording yourself on the recorder. You need to compare two notes, find differences in pronunciation and repeat everything again and again, improving your speech.
There is a simple rule: What we train, we develop. That is, if we just read, then sooner or later we will learn to do it, but we won’t be able to say something or distinguish by ear, if we are only engaged in oral speech, we won’t be able to write and so on. Therefore, devote your time to all the main disciplines of the language: listening comprehension, speech, reading and writing.
iFlashcard
We seem to have figured out the method. Now let's look at what information technology can offer us to improve it.
There are a great many programs for electronic cards, and everyone who reads this text should have a question, why did I devote myself to the passion of bicycle building and wrote my own. There were several reasons for this:
First, some programs are optimized for learning words, not phrases. I already wrote about this in detail, we will not stop.
Secondly, in this program there is only one, only list of cards and there is no division into groups, phrases or lessons. The fact is that I experience chronic intolerance to any routine and uninteresting actions (and cramming applies to them, no doubt) and therefore, forcing myself to not only learn new words, but also repeat old ones is difficult for me and I find thousands of reasons to do something more interesting. In this regard, I do not want to share my cards on any basis other than the "level of their knowledge" and I do not want to switch between the process of studying and repeating. Perhaps you have a question, but how does it happen that old cards do not interfere with the study of new ones? I will try to answer this question further.
Thirdly, some programs dictate the training schedule in such a way that cards have to be given a strictly defined time, and at the same time regularly. But, most often, finding the exact time is difficult and I need the opportunity to spend both five minutes and three hours when I feel comfortable. I perfectly understand that the effectiveness of methods based on a clear schedule has been scientifically proven, but what's the point if you can’t follow them?
Let's take a look at the screenshots. This is what the main program window looks like:

Everything is extremely simple:
- We click on the Next card button and the program randomly selects a card for us, taking into account the level of our knowledge for each card
- We see the phrase in the native language (or foreign, if you change the direction in the settings)
- We recall the translation and, importantly, pronounce it aloud
- Click Next card again and see the answer.
- Compare your answer with the standard and, depending on the result, click either Success or Failure
- The program adjusts the level of our knowledge of this card and then selects a new card for us and everything repeats again
Nothing tricky. The screenshot shows the Score parameter . It increases with the addition of new words and the receipt of the correct answers and decreases from the reverse actions. Purpose of the game: to score 100,000 points, then the program will show the cartoon, exactly as in the game "Wait a minute!" .
And this is how the card editor looks:

Algorithms
It's time to open the hood and see how it all works. The level of knowledge of each card is expressed in weight coefficient (floating point number), on the basis of which, in a pseudo-random manner, a card is selected for display to the user. That is, the basis of the algorithm is the selection of random weighted elements from the set. Each response from a Success or Failure user changes the weight of the card, respectively, to a smaller or larger side.
The weight of the card after the answer changes the following code:
double CalcNewFactor( double oldFactor, Answer::T answer )
{
return answer == Answer::Correct?
oldFactor - CorrectAnswerFactor * ( oldFactor - 1 ):
oldFactor + ( MaxWeight - oldFactor ) * IncorrectAnswerFactor;
}
Upon receipt of the correct answer, the weight decreases exponentially, while for the minimum card weight it is chosen not zero, but one, in order to avoid a situation in which the probability of showing the card will be close to zero, and also to avoid possible problems with rounding.
When an incorrect answer is received, the weight increases logarithmically: the smaller the current weight, the greater the value. This approach allows you to simulate a situation where the user gives the wrong answer to the learned card. In this case, the card is immediately transferred to the category of unexplored and, with a high degree of probability, will again be shown to the user in the near future.
Parameters IncorrectAnswerFactor and CorrectAnswerFactordefaults to 0.5 and can be changed in the settings file.
It remains to figure out how to ensure the existence of a single list for all cards, or rather, how to ensure that long-learned cards do not interfere with the active study of those that have been added recently.
To solve this problem, two parameters will help us: Maximum MaxWeight and initial InitialWeight card weight. We make the maximum weight of the card equal to the number of cards multiplied by some MaxWeightFactor coefficient , and the initial weight of the card will be equal to half the maximum weight. Then, provided that all cards are learned (i.e., their weight is approximately 1), their number is N andMaxWeightFactor = 1 (the default value), the new card will have a starting weight (N + 1) / 2 and the probability it will select the next card is approximately equal to 1/3 . That is, the probability of choosing a new card does not depend on the number of cards, and this is exactly what allows you to store all the cards in one large deck.
Conclusion
The article examined an effective method of memorizing elements of a foreign language using double-sided cards. The key elements of the method and the rules for obtaining the maximum return on it were described. The features of the software implementation of this method were distinguished that distinguish it from existing analogues (the only deck of all cards, the absence of explicit switching between learning and repetition, the absence of a schedule imposition), and the algorithms to ensure such features are described.
And finally, links:
Direct download link ( Windows, portable ): github.com/black-square/iFlashcards/releases/download/v1.2.5/iFlashcard-1.2.5.zip
Project page: code.google.com/ archive / p / smart-flashcards
Example card set:github.com/black-square/iFlashcards/releases/download/v1.2.5/settings.xml GitHub
source code ( C ++, Qt, Boost ): github.com/black-square/iFlashcards In this article, I wanted to describe the difficulties that I had while studying a foreign language and how the attempt to solve them led me to launch a new open source project. I wanted to share my results with the community, to receive constructive criticism of the method and algorithms, and also to express the hope that my achievements would be useful to someone else. And, of course, I invite everyone to take part in the project: share ideas, get tasks / bugs and send pull requests.
Only registered users can participate in the survey. Please come in.
What do you think about iFlashcard
- 62.8% Interesting idea, worth a try 461
- 10.5% The idea is nothing, but for me it does not fit 77
- 12.8% In similar programs, more successful learning algorithms are already implemented 94
- 13.7% I do not think that the use of cards can be useful 101