You know, I have always wanted to understand how Frontier scores its tracks. I've asked before in dedicated topics on this... never got a response from devs. I had even seen a post for how Fusion does it, and had my suspicions Frontier did it sorta like that...
http://forums.ubi.com/showthread.php...ring-Explained
... but no, its not quite the same. But I decided it was a good starting point, and a couple of months ago I started keeping track of points, and began doing a little analysis on this puzzle.
And now I have successfully reverse-engineered Frontiers scoring algorithm. ALL OF IT.
The community can gain a lot of good from this....here are just some ideas:
- tf.lforo and bonxy can soon start telling us your "real" global score; most Android global hackers will fall off the LB
- dutscher can add this to his "Improve your times table" page so you can see how much each track is worth
- Someone can put this algorithm in an excel spreadsheet for scoring. Improve a track get your new score!
- Imagine a page where it looks at your scores and adds a small amount to each... and then tells you which you should concentrate on to get more points.
- and hey... maybe now that we know/understand all of this stuff, we can better point out RLs issues when they occur.
I am going to break this down into multiple sections:
- How to calculate the "normal" LB scores
- Explain what the heck is going on with the Donkey/Crazy LB scoring
- Point you to some useful related data that I have gathered (explained more later)
So here we go....
How to calculate score for the "normal" LB based on rider fault and time
First step is to calculate your ZERO_FAULT_SCORE, based solely on your time.
Faults are ignored in this phase (Dont worry, we'll be using your faults later)And funny thing... everything you need to know to score can be determined entirely from the 3 scores given for each track: silver/gold/platinum. Makes a lot of sense really; RL made this as simple as possible for themselves. Lets use "Coal Town" as an example:
- Silver = 28 secs
- Gold = 25.75 secs
- Plat = 22 secs
Here are some scoring facts:
- Getting 0-fault Silver time exactly is worth 250K points
- Getting 0-fault Gold time exactly is worth 500K points (ie an additional 250K from Silver)
- Getting 0-fault Plat time exactly is worth 750K points (ie an additional 250K from Gold)
Now.. you know we can get points above Plat too...well, it turns out there is important "hidden" medal point too, which we will call the "Ultimate" point. It can be determined from the tracks Plat score:
- Ultimate time is always Plat/2. (so for Coal Town it would be 22/2 = 11 secs)
- Getting Ultimate time exactly will give you 1 million points.(ie an additional 250K from Plat)
- If you can get a time past Ultimate time...any time at all... you will automatically get the maximum score of 3 MILLION. Yeah, thats not easy to do... but it can happen)
So what about the scores between those medal points?
- Scoring between Silver-Gold, Gold-Plat, or Plat-Ultimate is linear. In other words:
- If you are 60% of the way to Plat from Gold, then you will get 60% of 250K added to the 500K you already had from getting Gold.
- If you are 10% of the way to Ultimate from Plat, then you will get 10% of 250K added to the 750K you already had from getting Plat.
Okay, thats harder to say than it is to show...and its going to get worse... so its time for a pretty picture of Coal Towns scoring profile:
Spoiler: Show
Shown that way, you can see what I mean; scoring between medal points is a straight line. The time difference between medals is not always the same so how many points you get per unit of time your score improves is determined by the slope of the given line you are on.
Notice I have not mentioned the time below Silver yet.. . because Bronze scoring is where the calculation is most ugly.As you can see on the graph above, scoring is not linear below Silver; instead the score you get decays exponentially the farther you get from Silver. Exactly HOW it decays algorithmically... took me a while to see because its unique for each track; some decayed faster.. some slower.
This was by FAR the hardest thing to puzzle out.... but I did figure it out.Just like "Ultimate Time", its based upon the 3 main Silver/Gold/Plat numbers per track:
- Bronze scoring uses a "natural exponential function"
- Full definition found here: https://developer.mozilla.org/en-US/...jects/Math/exp
- The speed of decay is partly based on the MEDAL_RANGE
- MEDAL_RANGE = Silver-Plat. (so for Coal Town its 28-22 = 6 secs)
- The exponent for the exponential decay function is: (Silver-RiderTime)/MEDAL_RANGE So for a 35 second Coal Town run the exponent would be: (28-35)/6
Just to make sure we are clear, this is the bronze scoring equation in Java:
Math.exp((silverTime-riderTime)/medalRange)*250000
(You can do this in Excel too using the EXP() function...)
And thats all you need to know to get the ZERO_FAULT_SCORE!
The final step is to account for your faults. And thats really, REALLY easy: each faults costs you 100K.
- FINAL_SCORE = ZERO_FAULT_SCORE - NUM_FAULTS*100K
Here is another track to further illustrate how faults work
Spoiler: Show
And honestly... its fairly easy to check yourself if you want. Just pick a new track, find out its gold time, and run it getting that time with 4 faults or so. Keep note of your newly updated score, and then run the track again and again, always getting as close as possible to the same score you did before. each time you'll get approximately 100K points (more or less. . . nobody is perfect getting the same score)
Thats it! For the "normal leaderboard" tracks anyway....but for those of you who try to implement this scoring algorithm and want to confirm its working as expected, here are some data points to test against.
Spoiler: Show
And just because I love to show all the variations, here are a bunch of different "normal LB" tracks that I measured. Take note of Trojan Giraffe; its one of the ones where the timesavers are so huge the top players can actually get very, very close to Ultimate time (closer than I did here), thereby making almost a million points...with a little more work... maybe 3 million one day.
Spoiler: Show
... And the conversation continues on the next post...
"Night Life Scoring"...how to score for the Donkey/Crazy Leaderboard
From time to time, we have noticed that we dont always get the scores we expect... and this has been seen a LOT more often once the Donkey and Crazy LB was added.
Well, there is a reason for at least SOME of that inconsistency.... the Donkey/Crazy LBs use the same scoring algorithm as above... EXACTLY the same. But they are NOT using the medal datapoints that each track has, like the "normal" LB does. Instead they use what I am calling: "Night Life Scoring".
It does not matter what the "visual" medal times for a track are because...
All Donkey/Crazy tracks score points using the Silver/Medal/Gold times from "Night Life"
Silver= 30.7 sec
Gold= 24 sec
Plat= 22 sec
Ultimate= Plat/2 = 22/2 = 11
MedalRange= Silver-Plat = 30.7-22 = 8.7
Thats.... really odd, and kinda blew my mind when I figured it out!But I can certainly prove it, and we have very strong evidence that this is not a new bug; its been this way from the very beginning of Donkey. I have checked 20+ tracks ... old ones, new ones.. used Agent, used Donkey... doesnt matter. Its the same for every Donkey/Crazy track I've seen.
Is this a bug? Or did RL do this intentionally for some reason? I dont know, and for the moment... I dont care. To me its more important to know how it works TODAY, and we can worry about if RL is going to tell us they did it on purpose, or fix it later.
Because this DOES have scoring implications....
Most tracks (160+) are like these two, where scoring is not exact but the tracks were about the same length as Night Life... and we can get approximately the standard amount of points we expect (750K+). The end result is that much of the time scoring works good enough people dont notice.
Spoiler: Show
Sometimes its a very long track though, and we cant reach NightLifes Silver/Gold scores on a track, let alone reach Plat to get the usual 750K. There are about 40 longer tracks where we cant possibly get more than 500K points. Of those, there are about 12 where we cant even reach 250K!
These tracks have been part of what is frustrating people; many of the new tracks lately are longer so its become noticeable lately. Its not the ONLY reason we have scoring issues, but its an added quirk that confuses people, obscuring other scoring bugs. Some examples:
Spoiler: Show
And... sometimes (for 3 tracks) this scoring quirk works in our favor instead.When a tracks run is really fast, we are able to beat NightLifes "Ultimate Time", and easily make 3 million points. Those tracks are:
- The Cave
- Bunnyhop
- Hill Climb
Spoiler: Show
NOTE: we discovered this a YEAR ago, which is why I know the NightLife scoring system has been around since the beginning.
http://forums.ubi.com/showthread.php...&#post10784595
http://forums.ubi.com/showthread.php...2#post10708292
How to gather Track scoring data in the most pain-free/accurate way
I bet some of you will want to gather your own data and see if this is all true for you as well (its a good idea, really)However, there are some common pitfalls you can get into, so we'll want to make sure those things dont happen... so read on....
Here is my procedure to do this data gathering:
Spoiler: Show
Useful statistical data that I have gathered
First, some kudos to some of the useful guys around here with tools that really came in handy in all of this work:
- Medal times requirements to each track by dutscher_sbf
- Frontier Advanced LB and Stats by Bonxy
- Frontier Global and PvP Track/LBs by mpksoul
I've been pulling data fairly frequently lately from Bonxys site....generating interesting stats, etc. Here is a description of what I have....
First one is:
Trials Frontier Scoring Statistics (on Google Sheets)
Whats on there:
- MedalTimes This is the latest up-to-date medal times along with the pre-calculated Ultimate and MedalRanges for each track. This is mostly useful to anyone who wants to duplicate the algorithm, or maybe write a spreadsheet that can auto-calculate stats.
- AvgTopScores sheet Want to know how the top guys are really doing? Use this to find which tracks tend to give the most/least contributions to global scores, so you can concentrate on those tracks
- Normal AvgTop Column: For the "normal LB", averages the track scores of the top 50 players (or top 10, top5 etc if there arent very many players).
- Donkey AvgTop Column: Same for Donkey LB (you can really see the affect of NightLife Scoring if you sort either way)
- Crazy AvgTop Column: Same for Crazy LB... interestingly enough its not quite the same as Donkey...
- KTM Top Column: Bonus info!
Shows how many of the top 200 ranks over both platforms are now using the KTM bike . . . so if nobody else is beating that Tier1 track with KTM, you can save time and not even bother to try.
The next one uses this scoring algorithm on all 6 LBs across IOS/Android, and shows the top 500:
Trials Frontier Recalculated Leaderboards
Until Bonxy's site , etc are fully functional, I will try to keep this updated every week; you can always find the latest link in the OP.
Most columns are self-explanatory, except maybe "AvgTrackScore". For any player above 100 tracks, I averaged their track scores; think of it as a measure of "skill" even though you dont have enough tracks to top the LB. I made sure the top 250 guys with high AvgTrackScore are in the list as well, even if you are not in the top 500 due to total score.
A note on "people to ignore". . . often referred to as "hackers":
Be sure to check out "Ignored Riders" on the spreadsheet. I strongly suspect those listed are the main problems towards having a "clean" LB (note that we have a couple on IOS too...). Please let me know if I have someone in there incorrectly, or if you see one that still made it to the LB. If they have a track listed in that spreadsheet I "adjusted" their score just for that track (so even hackers can participate if they play properly).But if a name has no track names listed for them, then they were scored low on every track; low enough that their "hacks" are not a major contribution to global rank.
Some strong caution on the LB results; this is a work in progress and inaccuracies do exist right now. So be aware:.
- If you dont have a track in the top 3000 on Bonxys track LBs for your platform, it will have no contribution to your new calculated score.
- One track is missing from the Crazy LBs (Spinners Alley), affecting everyones caclulated scores
- Some Riders (not clear who yet besides carterclem7) are ranked oddly due to incorrect track times.
- For the normal LBs, we found some track medal times are not what we thought they were, and there may be more. So data may be incorrect vs in-game LB scores for that reason as well.. but not for Donkey/Crazy. Due to their scoring quirks, their scoring times cant have this problem.
If you DO have questions about if someone is ranked oddly, check this out first; use lforo to compare them with riders ranked near them. I find using the win/loss ratio there tends to validate the new ranking, and when its doesnt (like carterclem7) there might be something to check into:
http://tf.lforo.com/ios/profile/compare
... thats all for now guys!![]()
May i be the first to say beautiful work Xitooner! Wow....
Thanks for putting this all together, i was just going over the AvgTopScores sheet, very cool! That´s something i can put to use right away. And what a twist to the story with the Nightlife scoring for the Donkey. Incredible that you figured that one out.
Nice Work
Am disappointed that a WR doesn't get a bonus
I'd rather the scoring to be based upon standard deviations from a set mean as well... This way gives not much in the way of a bonus for beating the rest of the world by half a second, and definitely makes some tracks much better to work with, especially ones with very low Plat times like Trojan or Parched Cliff
Any scoring methodology that relied on rankings relative to others would be a constant moving target requiring constant recalculations and resulting in people's scores going both up and down. That sounds like a major headache and something that would cause RL's servers to explode.Originally Posted by Bryan235465 Go to original post
Xitooner. Fantastic job here. Do we know the ultimate score for every track?
I doubt the median times or standard deviations would change much day to day unless a new bike is released. You could calculate the median and std dev once a wee or fortnight and rotate tracks so the calculation happens over the entire week.Originally Posted by Flippant9 Go to original post
Here is a quick breakdown on how close people are to the 3m bonus.
Pt/Sec World Record % of Ult Time Seconds Required
Platium Ultimate Android iOS Android iOS Android iOS
Trojan Giraffe 0:36.000 0 18 13,889 18.818 18.466 96% 97% 0.82 0.47
Cracked Plateau 0:28.500 0 14.25 17,544 15.714 15.444 91% 92% 1.46 1.19
Hilltop Ghetto (level 17) 0:24.250 0 12.125 20,619 14.877 14.708 82% 82% 2.75 2.58
Woodwork Conclave 0:28.000 0 14 17,857 17.299 16.442 81% 85% 3.30 2.44
The Grindhouse 0:24.666 6 12.333 20,271 15.471 14.845 80% 83% 3.14 2.51
Cracked Reservoir 0:24.600 0 12.3 20,325 15.431 15.079 80% 82% 3.13 2.78
Grease Transit 0:28.000 0 14 17,857 17.932 17.799 78% 79% 3.93 3.80
Madhouse 0:28.500 0 14.25 17,544 18.275 17.249 78% 83% 4.03 3.00
I don't think any are actually possible.
I got a spreadsheet with all the WRs... Just pumped into it the Ult Times.. Let me see if I can share using dropbox
Try this
https://www.dropbox.com/s/bxt89okza1...Plat.xlsx?dl=0
Quick and Nasty, but it works. Len Left and Right are good Excel formulas
We do indeed; its always 1/2 of the Plat score. Its also on the Google Docs spreadsheet I gave (and looks like Bryan235465 has it too)Do we know the ultimate score for every track?
I tend to agree; if it was possible with what we have today, some of those top guys (KarTanK, etc) would probably have done it.I don't think any are actually possible.They may all try harder now that we now how close they are to the 3 million limit on Trojan, etc. But. . . we got KTM for Tier1 and it changed Tier1 WRs. If we get a Legendary Bike for Tier3, then possibly some of those tracks will be in reach after all. Probably not within reach for riders like me. . . but for those top riders.... just maybe.
![]()
What does the Pt/sec mean?Originally Posted by Bryan235465 Go to original post
Points per second of improvement, after plat. I was going to bundle in rankings of other players and their times, then give you a reasonable improvement value of time and then translate that into points. At that point I could sort by best opportunity for more points.Originally Posted by ChemicalD Go to original post
Maybe later. It would also only work for tracks ranked better than 1500, as that is the most data I can pull from bonxy. But with some Len left and right formulas, I could basically copy paste entire top 1500 times into a spreadsheet and make the data usable