Click here to Skip to main content
15,850,360 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm creating an app with language learning exercises and would like to measure the users' accuracy. In one of the exercises, the users have to click on several words to rebuild a sentence (like Duolingo).

The words "move up" towards the correct sentence if they are right and appear in red for 1 second if they are wrong.

Let's take for example a sentence consisting of 5 word. So 5 words = 100% accuracy. I want the system to reward the user for right words (+20% each right word) and punish them for wrong words (-20% each wrong word). Let's take this sequence:

User clicks on right word: +20%
User clicks on wrong word: -20%
User clicks on right word: +20%
User clicks on right word: +40%
User clicks on right word: +60%
User clicks on right word: +80%

So, the user has finished the exercise with a 80% of accuracy because they made a mistake.

Now let's say that the user starts a new exercise of another 5-word sentence, BUT now the user will start with a 80% accuracy from the PREVIOUS exercise.
User clicks on right word: ___

(*) When the user clicks on the right word, they should gain +20%, BUT the user is starting at a 80% accuracy level from the PREVIOUS exercise, so what formula should I use to leverage the new result with the previous result?

For example, in the second exercise the maximum the user can get is again 100%. So what if I say 100% + 80% (from the previous exercise) = 180% / 2 = 90%. So the new maximum percentage the user can get in this second exercise is 90%, which divided by 5 equals: 18%.

User clicks on right word: 80% + 18% = 98%
User clicks on right word: 98% + 18% = 116% ???
User clicks on wrong word: 116% - 18% = 98%
User clicks on right word: 98% + 18% = 116% ???
User clicks on right word: 116% + 18% = 134% ???

As you can see this logic is not possible. Can you see my mistake? Do I need a leverage or a moving leverage algorithm?

What I have tried:

I have tried the things explained on top.
Posted
Comments
Richard MacCutchan 30-Apr-21 9:18am    
Don't use percentage values to record the answers. Use simple numbers, and calculate the total percentage at the end. For example, in a list of five words, if the user gets 4 correct , then the percentage is 4 / 5 * 100.
maicart 30-Apr-21 10:14am    
Thanks a lot! Have you found the flaw in my logic regarding the second part?
Richard MacCutchan 30-Apr-21 11:09am    
Just use what I suggested. Forget percentages as they are not meaningful until you want to display some final results.
maicart 30-Apr-21 11:37am    
@Richard. Thanks again. That's exactly my point. I want the user to know their score as they are doing the exercise. For example, they finish the first exercise, and they have 4 / 5 right * 100 = 80. So, the user's score is 80.

Now the user starts another exercise and gets 1 / 5 right. Right now, what's his current score, taking into account that his previous score was 80? My point is that I want the user to know their score as they do the exercises, not just at the end. Is there a formula or algorithm for that?
Richard MacCutchan 30-Apr-21 12:00pm    
At the end of the first question you have the score which is 4 / 5, so you calculate the percentage: 80%. At the end of the next question with a score of 1 / 5, you just total everything before calculating the percentage at the end:
4 right out of 5 = 80%
4 right out of 5 + 1 right out of 5 = 5 right out of 10 = 50%.

If you want to show the interim scores then the score for 1 right out of 5 is 20%.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900