Raising skill through crafting : the formula

Gopol
Mystique
Posts: 781
Joined: Wed 06 Jan 2016, 16:42
Realm: Fiergrue

Raising skill through crafting : the formula

Postby Gopol » Wed 21 Jun 2017, 16:15

The original subject in French : Chances de up une aptitude en craftant : La formule exacte et le simu !

The formula

With:
  • H : the current level of your hero in ONE discipline or skill
  • Diff : The difficulty level of the craft
  • ts : the duration of the craft in seconds
  • q : the chance of not getting a up in the chosen skill
  • p : 1 - q = the chance of getting at least one up in the chosen skill

Then, for Diff > H - 5 , we have
  • q = [(Diff + 5 ) / H ] ^ ( -0.0012 * ts )
And q =1 for Diff <= H - 5

This can also be expressed in different equivalent manners :
  • q = [H / (Diff + 5 )] ^ ( 0.0012 * ts )
  • q = [H / (Diff + 5 )] ^ ( 103.68 * td ) where td is the duration in days
  • q = e^(- λ * ts ) with λ = -0,0012 * LN( H / (Diff + 5 ) )
  • q = e^(- λ * td ) with λ = -103,68 * LN( H / (Diff + 5 ) )
The last form makes subsequent calculations of percentiles etc easier , especially in a spreadsheet.


Tested with...
The formula has been tested with more than 260 crafts.
I found 2 errors likely due to errors of encoding when I wrote down the craft and 3 errors of 0.1% due to the fact that the duration in seconds of a craft such as shown in the game are in fact rounded down values. A craft that is shown to take 1666 seconds takes in fact 1666.6667 seconds. When the real duration is taken into account those 3 errors fade away.

It has been tested for lots of different skills including extraction, foundry, forging, stone cutting, botany, masonry, sewing, breeding, ...
It has not (sufficiently) been tested with some guild only crafts, terrains, exploration and it obviously doesn't apply to combat


And for 2 skills ?

Very simply, when you can up both the discipline and the skill (like both metal and forging), the global chance of getting a up is computed like this :
  • pglobal = 1 - q1 * q2


Multiple up for the same skill ?

We know it is possible to get multiple ups for the same skill during a craft.
That chance, however, is not displayed in the game and a huge statistical analysis would be needed to find it with any kind of certainty.
However....

If we make the assumption that the developers took care that N task of duration T are equivalent to 1 task of duration N*T not only for getting the first up (that is now known for certain) but also for subsequent ups, then I can give the formulas for getting more than 1 up in a craft as there is only one way to achieve this. This is also relatively easy to implement (the actual random process is easier that the analytical formulas that compute those chances : see more explanations in the French original thread if you are interested and you can see the formulas in hidden cells in the simulator.

The simulator

Currently only in French but shouldn't be too hard to understand :

Recent version of OpenOffice or compatible is required :
Gopol - Chances de up.ods

Thanks

Thanks to Gerhart Friedlander and his colleagues for writing ""Nuclear and Radiochemistry" : subsequent disintegration of Strontium90 into Yttrium90 and then Zirconium90 is very similar to getting subsequent ups...

Tuf
Bâtisseur
Posts: 101
Joined: Thu 12 Jan 2017, 21:59
Realm: -

Re: Raising skill through crafting : the formula

Postby Tuf » Wed 21 Jun 2017, 18:48

Best to calculate in energy not seconds.

Gopol
Mystique
Posts: 781
Joined: Wed 06 Jan 2016, 16:42
Realm: Fiergrue

Re: Raising skill through crafting : the formula

Postby Gopol » Wed 21 Jun 2017, 19:20

Except that the time cost shown in game and in the guide is more precise than the energy cost.

Using time you just have to remember to use the "normal" time of the action when you are mutilated, not the doubled time.

Melindra
Bourlingueur
Posts: 86
Joined: Thu 22 Sep 2016, 06:17
Realm: Wojtek

Re: Raising skill through crafting : the formula

Postby Melindra » Wed 21 Jun 2017, 20:22

Amazing work! Thank you! :D
Do you think the same formula applies to companions?

Gopol
Mystique
Posts: 781
Joined: Wed 06 Jan 2016, 16:42
Realm: Fiergrue

Re: Raising skill through crafting : the formula

Postby Gopol » Wed 21 Jun 2017, 20:37

Probably. Maybe the constant is different but I doubt it.

bonob
Citoyen
Posts: 21
Joined: Fri 15 Jan 2016, 17:09
Realm: Wojtek

Re: Raising skill through crafting : the formula

Postby bonob » Thu 22 Jun 2017, 17:34

So, if your goal is to get at least one skill-up, you're better of doing one long task rather than several short tasks, at equal difficulty?

For example, say hero 50, difficulty 50,
- Task duration 1.0h => at least one skill-up 33.75%
- Task duration 0.5h => at least one skill-up 18.61%
- 2 tasks (A and B) 0.5h => A succeeds and B fails + A fails and B succeeds + A and B succeed = 2 * 18.61% * (1-18.61%) + 18.61 * 15.05 (15.05 is chance for hero 51) = 33.09%

On the other hand, the chance to not get any skill-up is:
- Task duration 1.0h => 66.25%
- Task duration 0.5h => 81.39%
- 2 tasks 0.5h fail => 81.39% ^ 2 = 66.25%

There's a discrepancy I can't quite wrap my head around here, looks like it's due to the 2 drawings not being independent. Am I completely rusty on my probabilities and missing something that should be obvious?
Sustain your attention. Boar slashed, run ruined..

Gopol
Mystique
Posts: 781
Joined: Wed 06 Jan 2016, 16:42
Realm: Fiergrue

Re: Raising skill through crafting : the formula

Postby Gopol » Thu 22 Jun 2017, 17:46

No, that's the very point of the negative exponential. Both are exactly equivalent.

1 task of 9000 seconds or 900 tasks of 10 seconds or 100 task of 90 seconds all give you the exact same probability of getting at least one up.

1 task of 30 min, hero level 50, task lev 50 : up = 18,61% not up = 81,39%
1 task of 60 min, hero level 50, task lev 50 : up = 33,75% not up = 66,25%

81,39% ^2 = 66, 25%
And 18,61% ^2 + 18,61% * 81,39% * 2 = 33,75% = succeed both + succeed one and fail the other (*2 as they are dual)

It all fits.

bonob
Citoyen
Posts: 21
Joined: Fri 15 Jan 2016, 17:09
Realm: Wojtek

Re: Raising skill through crafting : the formula

Postby bonob » Thu 22 Jun 2017, 17:54

All right, but then what is wrong with my first calculation, giving 33.09% for 2 half duration tasks compared to 33.75% for a full duration task?
Sustain your attention. Boar slashed, run ruined..

Gopol
Mystique
Posts: 781
Joined: Wed 06 Jan 2016, 16:42
Realm: Fiergrue

Re: Raising skill through crafting : the formula

Postby Gopol » Thu 22 Jun 2017, 18:02

bonob wrote:All right, but then what is wrong with my first calculation, giving 33.09% for 2 half duration tasks compared to 33.75% for a full duration task?


I guess the problem is that you are multiplying a posteriori probabilities that are not independent.

Ok another count :

up on first task 30min = 18,61 no up 81,39%
If had up on first one : we don't care about next one : we have our at least 1 up.
If failed on first one = up on second = 18,61 ; no up = 81,39
Total = 18,61 * 1 + 81,39 * 18,61 = 33,76 ( ,01 difference due to roundings)
The 15,05 never shows up.

bonob
Citoyen
Posts: 21
Joined: Fri 15 Jan 2016, 17:09
Realm: Wojtek

Re: Raising skill through crafting : the formula

Postby bonob » Thu 22 Jun 2017, 18:26

Ah ah, I got it.

My previous calculation was wrong because:
- A succeeds and B fails = 18.61 * 84.95 (failure is based on 51 skill)
- A fails and B succeeds = 81.39 * 18.61
- A and B succeed = 18.61 * 15.05
Added together: 33.75%

Your other formula, A succeeds + A fails and B succeeds is much better and gives the same result.
That's the formula for (A or B knowing not A) I guess, dusty memories.

Thanks a lot for the refresher Gopol ^_^
Sustain your attention. Boar slashed, run ruined..

Gopol
Mystique
Posts: 781
Joined: Wed 06 Jan 2016, 16:42
Realm: Fiergrue

Re: Raising skill through crafting : the formula

Postby Gopol » Mon 26 Jun 2017, 12:30

I have started a statistical analysis to see if all works as expected and whether it also applies to companions or not.

So far, the companions seem to follow the same formula.

My guess for multiple ups in a single craft was wrong however.
The actual chance of getting multiple ups is well lower. Like 30-50% lower.

What this means is that when you are still in the range where multiple ups are plausible, you will raise your skill more quickly by doing small actions. It doesn't matter once multiple ups are impossible or close to impossible anyway.

How it works exactly, I don't know. I can think of at least 8 different algorithms that would extend the formula used for single ups to multiple ups in a relatively reasonable manner with different parameters. And some of those options are difficult to apprehend analytically (even though it is easy to program the algorithm that performs the actual random, finding the formula for average etc is hard ). Some also have close enough results that it will be very difficult to differentiate between them through an statistical analysis.

My next step will be to perform some long high level craft with tagged along low level companions like activating a lev70 rune with level 5-12 archeo companions along and see what happens.

I would like to also do that for hero stats, but that is more difficult to setup.
If anyone can create a situation where they have a low hero stat (like <15) and do a long and high level ( >60) craft in that skill and see exactly how that skill jumped in game, I'm interested. Eg:
  • Like for exemple, do a lev60+ Feed with a 70/10 skill in herbo/flora and carefully write down the hero stats before and after the craft.. You must be very very careful to correctly write down the start and finish stats.

User avatar
NightCroucher
Bâtisseur
Posts: 127
Joined: Thu 12 May 2016, 06:37
Realm: Ruslana

Re: Raising skill through crafting : the formula

Postby NightCroucher » Tue 27 Jun 2017, 22:45

That was interesting )


Return to “Skills”

Who is online

Users browsing this forum: No registered users and 1 guest