Kalith

New effort to create tank specific values for wn8 rating

80 posts in this topic

I made calculation of the new averages using your script: https://yadi.sk/d/GSC6dx153NGzBh/csv, wn8-averages-2017-10-10.csv

There is not so big difference in values comparing with v31.

Here is results: https://yadi.sk/d/GSC6dx153NGzBh/plots/user_account_data

v31 suffix is the v31 table

newavg suffis is the new averages table.

The result is slightly worse, but I think it's within the margin of error.

We can use v31 as basis and update it later if required. 

Script for averages calculation:

 
CREATE OR REPLACE FUNCTION wn8.calculate_averages()
RETURNS VOID
LANGUAGE plpgsql
AS $$
DECLARE
    l_tiers int[];
    l_tier int;
    l_types text[];
    l_type text;
    l_tank_ids int[];
    e_dmg float8;
    e_frg float8;
    e_spo float8;
    e_def float8;
    e_win float8;
    n_dmg float8;
    n_frg float8;
    n_spo float8;
    n_def float8;
    n_win float8;
BEGIN
    l_tiers := ARRAY(SELECT tier FROM xvm.vehicles_list GROUP BY tier ORDER BY tier);
    l_types := ARRAY(SELECT type FROM xvm.vehicles_list GROUP BY type ORDER BY type);

    FOREACH l_type IN ARRAY l_types LOOP
    FOREACH l_tier IN ARRAY l_tiers LOOP
        l_tank_ids := ARRAY(SELECT tank_id FROM xvm.vehicles_list WHERE type = l_type AND tier = l_tier);

        IF array_length(l_tank_ids, 1) = 0 THEN
            CONTINUE;
        END IF;

        SELECT dmg, frg, spo, def, win FROM wn8.exp_def WHERE type = l_type AND tier = l_tier
        INTO e_dmg, e_frg, e_spo, e_def, e_win;

        SELECT
            (regr_intercept(a.r_dmg, b.r_dmg) + regr_slope(a.r_dmg, b.r_dmg)) * e_dmg,
            (regr_intercept(a.r_frg, b.r_frg) + regr_slope(a.r_frg, b.r_frg)) * e_frg,
            (regr_intercept(a.r_spo, b.r_spo) + regr_slope(a.r_spo, b.r_spo)) * e_spo,
            (regr_intercept(a.r_def, b.r_def) + regr_slope(a.r_def, b.r_def)) * e_def,
            (regr_intercept(a.r_win, b.r_win) + regr_slope(a.r_win, b.r_win)) * e_win
        FROM wn8.tmp_exp a
        JOIN wn8.tmp_user_account_stats b USING(player_id)
        WHERE a.tank_id IN (SELECT * FROM unnest(l_tank_ids))
        INTO n_dmg, n_frg, n_spo, n_def, n_win;

        DELETE FROM wn8.exp_def_new WHERE type = l_type AND tier = l_tier;

        INSERT INTO wn8.exp_def_new (type, tier, dmg, frg, spo, def, win)
        VALUES (l_type, l_tier, n_dmg, n_frg, n_spo, n_def, n_win);
    END LOOP;
    END LOOP;
END;
$$;

 

Share this post


Link to post
Share on other sites
5 hours ago, sirmax said:

I made calculation of the new averages using your script: https://yadi.sk/d/GSC6dx153NGzBh/csv, wn8-averages-2017-10-10.csv

There is not so big difference in values comparing with v31.

Here is results: https://disk.yandex.ru/client/disk/wn8-data/plots/user_account_data

v31 suffix is the v31 table

newavg suffis is the new averages table.

The result is slightly worse, but I think it's within the margin of error.

We can use v31 as basis and update it later if required. 

Script for averages calculation:

  Reveal hidden contents

CREATE OR REPLACE FUNCTION wn8.calculate_averages()
RETURNS VOID
LANGUAGE plpgsql
AS $$
DECLARE
    l_tiers int[];
    l_tier int;
    l_types text[];
    l_type text;
    l_tank_ids int[];
    e_dmg float8;
    e_frg float8;
    e_spo float8;
    e_def float8;
    e_win float8;
    n_dmg float8;
    n_frg float8;
    n_spo float8;
    n_def float8;
    n_win float8;
BEGIN
    l_tiers := ARRAY(SELECT tier FROM xvm.vehicles_list GROUP BY tier ORDER BY tier);
    l_types := ARRAY(SELECT type FROM xvm.vehicles_list GROUP BY type ORDER BY type);

    FOREACH l_type IN ARRAY l_types LOOP
    FOREACH l_tier IN ARRAY l_tiers LOOP
        l_tank_ids := ARRAY(SELECT tank_id FROM xvm.vehicles_list WHERE type = l_type AND tier = l_tier);

        IF array_length(l_tank_ids, 1) = 0 THEN
            CONTINUE;
        END IF;

        SELECT dmg, frg, spo, def, win FROM wn8.exp_def WHERE type = l_type AND tier = l_tier
        INTO e_dmg, e_frg, e_spo, e_def, e_win;

        SELECT
            (regr_intercept(a.r_dmg, b.r_dmg) + regr_slope(a.r_dmg, b.r_dmg)) * e_dmg,
            (regr_intercept(a.r_frg, b.r_frg) + regr_slope(a.r_frg, b.r_frg)) * e_frg,
            (regr_intercept(a.r_spo, b.r_spo) + regr_slope(a.r_spo, b.r_spo)) * e_spo,
            (regr_intercept(a.r_def, b.r_def) + regr_slope(a.r_def, b.r_def)) * e_def,
            (regr_intercept(a.r_win, b.r_win) + regr_slope(a.r_win, b.r_win)) * e_win
        FROM wn8.tmp_exp a
        JOIN wn8.tmp_user_account_stats b USING(player_id)
        WHERE a.tank_id IN (SELECT * FROM unnest(l_tank_ids))
        INTO n_dmg, n_frg, n_spo, n_def, n_win;

        DELETE FROM wn8.exp_def_new WHERE type = l_type AND tier = l_tier;

        INSERT INTO wn8.exp_def_new (type, tier, dmg, frg, spo, def, win)
        VALUES (l_type, l_tier, n_dmg, n_frg, n_spo, n_def, n_win);
    END LOOP;
    END LOOP;
END;
$$;

 

Agreed

Share this post


Link to post
Share on other sites
5 hours ago, BlackAdder said:

@Gryphon_

Are all tanks (same class and tier) have same expected dmg now? 

On wotlabs, most sites, and some mods, yes. However, the xvm team is close to having an automated way of producing per-tank values so you will see a slightly different WN8 score in XVM (mine is 4 different overall)

Share this post


Link to post
Share on other sites
5 hours ago, Gryphon_ said:

On wotlabs, most sites, and some mods, yes. However, the xvm team is close to having an automated way of producing per-tank values so you will see a slightly different WN8 score in XVM (mine is 4 different overall)

Isn't that kinda unfair to less good tanks? 

 

But i guess it makes life easier for devs (with new tanks). 

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.