Tournament Ubers Premier League X: Commencement

Status
Not open for further replies.

ckw

Tired
is a Top Tutor Alumnusis a Forum Moderator Alumnusis a Contributor Alumnus
Smart Kid and 64 Squares Thanks for retaining. I know shit didn't go our way but this is how Pokemon is sometimes.


Bushtush suapah Thanks for pulling up and doing your best despite being so busy with world cup. I hope you guys win in finals man

MZ The Dovahneer MMII Trade Jhonx~ Alkione Dj Breloominati♬ Thank you for all the test games you guys provided me. You really learn a lot from losing haha. Also thanks for the ironing tip Trade, that saved my life.

robjr Zesty43 I can tell you guys really wanted to play more, sorry you didn't get more chances. Please come back for Ubers Winter Tour rob <3

Amaranth Tough luck bro but thanks for never getting demoralized. We did our best, just wasn't enough this time but I've seen u rock em before!

Nael222 You know you messed up but you can make it right. We aren't perfect people so I hope you stop beating yourself up at some point please

GeniusFromHoenn Thanks for keeping the vibe up all the time. Your positive mentality is a gem and so is your attention to detail and hard work. You are a future star so please keep your head up, remain resilient in the face of defeat, and use these experiences to overcome any setbacks you may face in the future!

Special shoutouts to the Bandits. You know what you guys did :zonger:


I'll wait for the UPL dump to share my stuff. I've said it when Edgar and 64 Squares approached me for retention but this is my last tour. I know y'all think I'm capping and that's fine. Letting go is definitely hard as hell but its got to be done at some point. I don't think I can give over 200 shoutouts in one post so I will thank everyone for this ride :heart:
 

SparksBlade

is a Tournament Directoris a Community Leaderis a Community Contributoris a member of the Battle Simulator Staffis a Top Dedicated Tournament Host
Community Leader
too much emotions here. gonna wash them off with some useless stats
Gen​
Average Number of Turns​
Number of Games​
SS​
56.88​
122​
USM​
42.59​
59​
ORAS​
54.20​
48​
BW2​
29.90​
32​
DPP​
35.38​
32​
ADV​
41.40​
35​
GSC​
68.29​
31​

the order being: GSC > SS > ORAS > SM > ADV > DPP > BW2

for those curious about "what if that 990 turn oras game didn't count" well first congrats on being basic and disregarding the clash of two valid and popular teams and secondly the average would drop to 34.34 making it the second quickest

lemme know if you're interested in any other types of stats from the games e.g. gens with most twave clicked per game (no im not doing usage stats Fc do it)
 

SparksBlade

is a Tournament Directoris a Community Leaderis a Community Contributoris a member of the Battle Simulator Staffis a Top Dedicated Tournament Host
Community Leader
and i'm back with even more useless data, but this time on demand

Data forAverageMedian
Turns56.8843
Switches43.2632.5
Thunder Wave2.42 (0.27 missed)1.5 (0 missed)

Data forAverageMedian
Turns42.5936
Switches34.8025
Thunder Wave0.27 (0 missed)0 (0 missed)

Data forAverageMedian
Turns54.2028.5
Switches52.0824
Thunder Wave0.660

Data forAverageMedian
Turns29.9025.5
Switches23.0321
Thunder Wave0.750

Data forAverageMedian
Turns35.3829
Switches25.9023
Thunder Wave0.840

Data forAverageMedian
Turns41.4030
Switches33.7726
Thunder Wave0.510

Data forAverageMedian
Turns68.2944
Switches5229
Thunder Wave0.510
For the curious, these are the differences of average and median turns for each gen:
SS: 13.88
USM: 6.59
ORAS: 25.70
BW2: 4.40
DPP: 6.38
ADV: 11.40
GSC: 24.29

A bit surprised that no gen got close to 1 twave use per game. Also, a total of 312 Thunder Waves were clicked between USM and SS, and of those approximately 33 missed which is surprisingly close to the expected number (yes some were clicked vs mons that weren't affected aka already statused or immune to twave etc).

Things that I was asked to do but I didn't/couldn't:
  • Stats about mons getting frozen: sorry regex is just very annoying and I was just fed up after I figured out the twave one. I would have had to find a replay where a mon gets frozen and stays frozen for a couple turns to check that getting frozen and staying frozen wouldn't interfere with each other's data, and I was too lazy to hunt for that in 359 games
  • Stats about mons getting ohko'd: maybe I missed something, but from what I saw the actual replay code doesn't say that a mon got ohko'd but rather the HP it has after taking a hit and at start/end of turn, so I would have to figure out regex to check for a mon that was at 100 at start of turn and at 0 at end of that turn.
  • Hazards on field at the end of game: with defog and spin and players spamming hazards to pp stall or spamming hazards predicting defog/spin or spamming hazards vs magic coat, I have no idea how I could do it from just parsing. Good old brute forcing by just watching all the replays is the way

Here's the jank code that I was using
JavaScript:
function median(arr, len) {
    if (len % 2 === 0) {
        return (arr[(len / 2) - 1] + arr[len / 2]) / 2;
    }
    return arr[(len - 1) / 2];
}

function httpGet(theUrl)
{
    var xmlHttp = new XMLHttpRequest();
    xmlHttp.open( "GET", theUrl, false ); // false for synchronous request
    xmlHttp.send( null );
    return xmlHttp.responseText;
}

function sparks(urls) {
    const turnsArr = [];
    const switchesArr = [];
    const twavesArr = [];
    const avoidedTwavesArr = [];

    for (let i = 0;i < urls.length;i++) {
        const replay = httpGet(urls[i]);
        turnsArr.push(replay.match(/\|turn\|/g)?.length || 0);
        switchesArr.push(replay.match(/\|switch\|/g)?.length || 0);
        twavesArr.push(replay.match(/\|Thunder Wave\|/g)?.length || 0);
        avoidedTwavesArr.push(replay.match(/\|Thunder Wave\|.{5,20}\[miss/g)?.length || 0);
    }

    turnsArr.sort((a, b) => a - b);
    switchesArr.sort((a, b) => a - b);
    twavesArr.sort((a, b) => a - b);
    avoidedTwavesArr.sort((a, b) => a - b);
    let turnsMedian, switchesMedian, twavesMedian, avoidedTwavesMedian;

    return {
        'median turns': median(turnsArr, turnsArr.length),
        'average switches': switchesArr.reduce((a, b) => a + b, 0) / switchesArr.length,
        'median switches': median(switchesArr, switchesArr.length),
        'average twaves': twavesArr.reduce((a, b) => a + b, 0) / twavesArr.length,
        'median twaves': median(twavesArr, twavesArr.length),
        'average twaves avoided': avoidedTwavesArr.reduce((a, b) => a + b, 0) / avoidedTwavesArr.length,
        'median twaves avoided': median(avoidedTwavesArr, avoidedTwavesArr.length),
    };
}
The httpGet method I stole from stackoverflow and have never looked at since. If you find any mistakes in this or things worth enhancing, you can correct me by just posting them here and the difference it makes with the stats. I probably won't be running this again unless a very interesting and doable request comes my way.
And here are all the replays in array for you to use with the code: https://pastebin.com/WeHeD6av

Note: I ran the script in devtools on the replays page to avoid cors issue, so no I have not deployed it anywhere and I won't be deploying it anywhere so if you want to use this, you'll have to copy the code yourself.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 1, Guests: 0)

Top