Jump to content


How to calculate total WN8?

wn8 statistics stats

  • Please log in to reply
3 replies to this topic

StormGoblin #1 Posted 10 July 2017 - 01:33 PM

    Private

  • Player
  • 4271 battles
  • 5
  • [ARNIE] ARNIE
  • Member since:
    02-14-2016

Hi,

 

I need some help with the calculation of wn8 scores. I have created an application to calculate wn8 scores, but my total account wn8 score is not correct.

 

Part 1: wn8 per tank

The first part, wn8 per tank, works great and is equal to most World of Tanks statistics websites. So, no help needed here.

For those interested the following is the code I used for this part:

Source of the expected tank values: http://www.wnefficie..._values_30.json

 

Code for wn8 per tank

foreach ($playervehicles["data"]["$account_id"] as $tanktype => $tank) {

    $expDmg = $expected_tank_values["data"]["$key"]["expDamage"];
    $expSpot = $expected_tank_values["data"]["$key"]["expSpot"];
    $expFrag = $expected_tank_values["data"]["$key"]["expFrag"];
    $expDef = $expected_tank_values["data"]["$key"]["expDef"];
    $expWinRate = $expected_tank_values["data"]["$key"]["expWinRate"];

 

    $avgDmg = $vehicle_damage / $vehicle_battles;
    $avgSpot = $vehicle_spotted / $vehicle_battles;
    $avgFrag = $vehicle_frags / $vehicle_battles;
    $avgDef = $vehicle_basedefense / $vehicle_battles;

 

    $rDAMAGE = $avgDmg / $expDmg;
    $rSPOT = $avgSpot / $expSpot;
    $rFRAG = $avgFrag / $expFrag;
    $rDEF = $avgDef / $expDef;
    $rWIN = $vehicle_winrate / $expWinRate;

 

    $rWINc = max(0, ( $rWIN - 0.71 ) / ( 1 - 0.71 ));
    $rDAMAGEc = max(0, ( $rDAMAGE - 0.22 ) / ( 1 - 0.22 ));
    $rFRAGc = max(0, min($rDAMAGEc + 0.2, ( $rFRAG - 0.12 ) / ( 1 - 0.12 )));
    $rSPOTc = max(0, min($rDAMAGEc + 0.1, ( $rSPOT - 0.38 ) / ( 1 - 0.38 )));
    $rDEFc = max(0, min($rDAMAGEc + 0.1, ( $rDEF - 0.10 ) / ( 1 - 0.10 )));

 

    $wn8 = ( 980 * $rDAMAGEc ) + ( 210 * $rDAMAGEc * $rFRAGc ) + ( 155 * $rFRAGc * $rSPOTc ) + ( 75 * $rDEFc * $rFRAGc ) + ( 145 * MIN(1.8, $rWINc) );

}

 

Part 2: total (account) wn8

The second part is more difficult apparently, because the outcome is not correct.

  • I created a total expected stats variable per tank.
  • Following I used those totals for calculating the ratio's.

 

The result is that my (StormGoblin) wn8 score is 1088. According to most statistics sites is should be 1181.

Sources I used for comparison: http://wotlabs.net/, http://www.wotinfo.net/, http://www.noobmeter.com/, http://www.wotstats.org/

 

Code for total (account) wn8

foreach ($playervehicles["data"]["$account_id"] as $tanktype => $tank) {

    $wn8expDmg  += $vehicle_battles * $expDmg;
    $wn8expSpot += $vehicle_battles * $expSpot;
    $wn8expFrag += $vehicle_battles * $expFrag;
    $wn8expDef  += $vehicle_battles * $expDef;
    $wn8expWin  += $vehicle_battles * $expWinRate;

}

 

$rDAMAGE = $damage_dealt / $wn8expDmg;

$rSPOT = $spotted / $wn8expSpot;
$rFRAG = $frags / $wn8expFrag;
$rDEF = $basedefense / $wn8expDef;
$rWin  = ($wins / $wn8expWin) * 100;

 

$rWINc = max(0, ( $rWIN - 0.71 ) / ( 1 - 0.71 ));
$rDAMAGEc = max(0, ( $rDAMAGE - 0.22 ) / ( 1 - 0.22 ));
$rFRAGc = max(0, min($rDAMAGEc + 0.2, ( $rFRAG - 0.12 ) / ( 1 - 0.12 )));
$rSPOTc = max(0, min($rDAMAGEc + 0.1, ( $rSPOT - 0.38 ) / ( 1 - 0.38 )));
$rDEFc = max(0, min($rDAMAGEc + 0.1, ( $rDEF - 0.10 ) / ( 1 - 0.10 )));

 

$wn8 = ( 980 * $rDAMAGEc ) + ( 210 * $rDAMAGEc * $rFRAGc ) + ( 155 * $rFRAGc * $rSPOTc ) + ( 75 * $rDEFc * $rFRAGc ) + ( 145 * MIN(1.8, $rWINc) );

 

So, what am I doing wrong? How can I calculate the total wn8 score for my account?


Edited by StormGoblin, 11 July 2017 - 01:37 PM.


kaadomin #2 Posted 10 July 2017 - 10:28 PM

    Warrant Officer

  • Player
  • 27868 battles
  • 575
  • [NXD] NXD
  • Member since:
    06-11-2012

View PostStormGoblin, on 10 July 2017 - 01:33 PM, said:

The result is that my (StormGoblin) wn8 score is 1088. According to most statistics sites is should be 1181.

Sources I used for comparison: http://wotlabs.net/, http://www.wotinfo.net/, http://www.noobmeter.com/, http://www.wotstats.org/

 

 

So, what am I doing wrong? How can I calculate the total wn8 score for my account?

 

I tested this account with my script:

 

WN8average =     1 099,34 (Averaged value of all tank WN8 including battle count)
WN8overall   = 1 181,79 (this value you'll find on wot-life, xvm ...)

 

These are two different values :) and this will be sightly different in nearly every case!

 

Read the last point of the English FAQ- it was my key (BTW: I missed it in the German translation and marked the most important word):

http://wiki.wneffici...r-tank_basis.3F

Is WN8 calculated on a per-tank basis?

No, WN8 is calculated based on the only data available through the API, which is games played in each tank, and aggregate stats for damage, kills, spots and defense. However, from a 20000 player vBAddict database, the average error introduced to WN8 by using aggregate data instead of averaging per-tank WN8 (weighted by battles on each tank) is 2.15% of the total WN8 score, while 95% of players have an error under 6.3% of their total WN8 and 99% of players have errors under 9.2% of their total WN8.

 

They hide a main element in a sentence between the formulas between step 1 and 2

 

http://wiki.wnefficiency.net/pages/WN8

 Step 1 takes the counts of tanks played on account, and multiplies them by the expected stats to get the account total expected values. Then the actual account totals (your total dmg, frags, spots, def, win-rate) are divided by the total expected values to give the ratios.

 

They mix up values of the expected values to average expected values

 and

mix up tank values to average tank values

than they calculate with these average values like a "vitual tank"

 

... it's like a delicious coking recipe with many steps put in a list and mixed together. They decide (define) overall as mixture of all parts and argue with a little error.

 

I use both, because the defined overall became complete stupid if you argue with values of tank classes, tiers ... it's only a fast and dirty version for xvm-wn8. A difference in player overall WN8 below 10% tells you nothing about the value of the player. I could rant on this longer but ... I show the overall (fast & dirty) Version on my player profiles, because the player don't like different values :)  but on all other parts (diagram ...) I use the average value. 

 

Okay, I hope it helps -> btw: we had the same topic here

 

regards Kaadomin/Tomek

 

 



StormGoblin #3 Posted 11 July 2017 - 01:39 PM

    Private

  • Player
  • 4271 battles
  • 5
  • [ARNIE] ARNIE
  • Member since:
    02-14-2016

Thank you for your answer. 

I got it to work and am now using the two wn8 you mentioned.



pipovec #4 Posted 14 July 2017 - 08:45 AM

    Private

  • Player
  • 50999 battles
  • 12
  • [FPC-P] FPC-P
  • Member since:
    07-20-2012

with c++

https://github.com/p.../PlayersWN8.cpp







Also tagged with wn8, statistics, stats

1 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users