Tuesday, December 8, 2015

Math of Duolingo (100k Lingot Challenge)

Well, at least about the lingots . . .

During our recent long weekend, the two older J's and I were talking about lingot acquisition on Duolingo.  This is a summary of our conversations, plus a bit of background for Duolingo non-users.

What is the point of this post: opportunities for mathematical modeling are all around us!

Our streak obsession

Some of us have become heavy, frequent, users of Duolingo. While others debate whether it is the best tool for language learning, we've at least been finding it a good place to practice languages we already know and learn the basics of some new ones. And accumulating XP, experience levels, translation tiers, and lingots makes it into a fun game that tweaks our greedy instincts for more, more, more.

Especially those lingots:
Oooh, shiny, shiny!
You know our penchant for finding math in all things, so it won't surprise you to know that we've been thinking about the math of lingots. Especially when our curiosity took us to the Lingot Hall of Fame (Thousadaire's row) and we saw this:


There are people with over 100,000 lingots.  Hmm, how did they get so many? How long will it take us to get that many?

Some basic rules

Basically, we know 6 ways to earn lingots:
  • Pass a skill: every skill passed earns 2 lingots (or 3 if you test out with a perfect test)
  • Go up a language level: rise to level N and you earn N lingots.
  • Extend your streak: consecutive days of play build a streak, every ten streak days, you earn S/10 lingots (where S is the length of your streak) 
  • Wagers: you can bet on maintaining a streak and (net) earn 5 lingots every 7 days.
  • Upload a widely liked document to immersion, more on this below
  • Direct grants
Data on skills
Each language has a tree of skills that you complete to unlock the rest of the tree and earn lingots. Oh, yeah, to learn vocabulary and grammar skills, too, I guess:

A section of our German skills tree
There are 120 skills on the German tree. Assuming this is typical, that gives us a max of 360 lingots/language from completed skill trees. There are currently 50 live courses listed on Duolingo, so that means a user could earn 18,000 lingots by completing all the skill trees.

Not bad, but a huge amount of work. To give you a sense, over the past 150 days, I've managed to complete the German and Spanish skill trees, but those were both languages in which I was already quite proficient. Suffice it to say, my progress through the Russian tree has been much slower.

For our time estimate, we assumed 100 days to complete a tree with the possibility of working on 3 languages at a time, but we guessed this is a bit on the optimistic side. This gives us a lingot rate from skills of 10.8 lingots per day (3*360/100).

Also, our top L-tycoon, KcaJP is only studying 8 languages, so even with full trees (which seems unlikely, see below), that would be 2880 lingots from skills.

Advancing levels
The math on lingots from levels is pretty easy. If we have levels {ni} for m different courses, then we received this many lingots for our level progression:
 n1(n1 + 1)/2 +...+ nm(nm + 1)/2 - m

The subtle -m comes from the fact that we start each course at level 1 and don't get a free lingot from that.

I've seen one claim that the max level per course is 25, so that would be 324 lingots/course, or 16,200 total lingots. Making similar assumptions to that for the skill trees, we estimated 150 days to get to level 25, 3 languages running in parallel, for 6.48 lingots per day from this source.

Based on the KcaJP's levels in the 8 courses, I think this source only provided 514 lingots. Also, because many of these 8 courses have very low levels, it is unlikely KcaJP has completed many of the skill trees.

Extend your streak and wagers
This is very similar to the language levels, but is open-ended. In this case, lingots accumulated are S(S+10)/200.

Betting on keeping mini-streaks (each of 7 days) gives us 5 lingots every 7 days, so we will accumulate 5*S/7 from this source.

Data on likes
The last two ways to get lingots are to be loved. If you are loved for yourself, people can give you lingots directly. The most extreme case we've seen was a user who was gifted about 4000 lingots. However, even gifts of 100 lingots are extremely rare. Because of this, we aren't counting on donations and think it lingot gifts can be ignored for understanding lingot tycoonhood.

One other way is to be loved, indirectly, is to upload a document to Immersion that then gets upvoted. Typically, this earns the uploader 0-5 lingots. There is one extreme example (a Harry Potter page) that got about 1500 upvotes. Again, we think this source can be safely ignored for our analysis.

How long for our 100k badge?

So, in summary, we have the following as the key factors for earning lingots:
  • Pass a skill: estimate 10.8 lingots per day, source of 2880 lingots for KcaJP
  • Go up a language level: estimate 6.48 lingots per day, source of 524 lingots for KcaJP
  • Extend your streak and wagers: 5*S/7 + S*(S+10)/200
  • Total forecast lingots on day S: S2/200 + 18 S
We rounded the coefficient of S since our estimates for passing skills and level increases weren't precise to that level anyway.

Solving this quadratic for 100,000, gives is about 3020 days for us to reach 100,000 lingots, or 8.3 years. Assuming we keep our streak every day for that whole time, our assumptions mean we would have:

  1. Earned about 32k lingots by completed 90 skill trees (40 more than duolingo currently has, but there are another 29 at different stages of development and we're gonna take 8 years, so, maybe?)
  2. Earned about 20k lingots having gotten to level 25 on 60 courses (not sure how this links with 90 completed trees, but, oh well)
  3. Earned about 48k lingots from sheer persistence

An obvious conclusion

Having explored our estimates of how long it would take us to get 100,000 lingots, we want to turn back to our favorite Ltycoon, KcaJP. While we can't guess about how many lingots KcaJP has been gifted or upvoted, the visible sources of income are:

  1. less than 2880 from skills
  2. 514 from levels
  3. less than 12000 from streak and wagers (this is the max available since Duolingo launched on 30 November 2011)

In total, that would still be an impressive 15k lingots, but we've still got 100k unexplained!

So, how did this lingot tycoon reach this pinnacle of virtual wealth? Frankly, we don't know, but can conclude that there must be/have been other ways to earn lingots. We have found parchment fragments suggesting a distant time when it was easy to earn loads of lingots from translating on immersion. Is that the key?

6 comments:

  1. Hi. I don't know if this is possible, so i'm just guessing. You get a lingot for leveling up, and from level 1 to 3 is easy and fast. I noticed in the settings you can reset a language tree. Maybe he does 1 or 2 levels in a few seconds/minutes, gets 1 or 2 lingots, then resets the language and repeats? If the language resets, but the lingots stay, then he could get hundreds or thousands per day. Again this is just a guess. I don't know if the lingots stay when you reset a language.

    -Ash.Blue

    ReplyDelete
  2. I tested and you do keep the lingots you earned, even if you reset a language. Still, I'm not sure I could do this and earn at a rate faster than 1 lingot per minute of activity, on average. To get to 100k at that rate would still cost me 69 solid days of wasted life. Or, if I could push myself to do it for 100 minute a day, still would take almost 3 years. Yikes!

    ReplyDelete
    Replies
    1. I think it depends on how long it would take. 2 lingots for finishing a skill, and 1 lingot for each level multiplied by the level. If he did the first skill and got to level 3 while doing it (only 300 xp) That's 7 lingots (I think?). It depends only how long it would take to do the first skill.

      Delete
    2. It might be that some languages are better suited for this method than others. Using the German tree, I managed to get lingots at a rate between 3 and 4 per minute. This is a language I know well, so no mistakes when testing out of skills and translation is basically immediate. Also, I can type fairly quickly. However, some of the earlier skills have very few sub-skills, like "The" which has only a single sub-skill and blocks progress further down the tree.

      Delete
  3. After almost a year, we are earning lingots at a pace far slower than our final equation in this post. From 365 days, our formula would get about 7200 Lingots. We actually have 4900 in total.

    One reason we are still earning Lingots at a fairly fast clip is that we are running three accounts (J0, J1, and J2), so the rate of accumulation for 7 day wagers and overall streak is roughly 3x as fast.

    ReplyDelete