Giter Site home page Giter Site logo

Comments (6)

yaniv-aknin avatar yaniv-aknin commented on August 16, 2024

Heya, thanks for this idea! I started looking at it, here are a few observations I made. Note I rarely play multiplayer/team games, so maybe I'm a bit clueless about them :)

  • It's not easy to know when a nuke was built, but easy to know when a nuke was launched; so I'll go with that
  • I assume we'll look at all VALID games with more than two players
  • I'll look at all games where one team has at least one player with VICTORY result, and the other teams do not have a victory result
  • Not sure what's a good visualization plot; maybe a set of violin charts, one per number of players, each mark would represent a victory or loss for the team and the height would be 'time to nuke'

from fafanalysis.

yaniv-aknin avatar yaniv-aknin commented on August 16, 2024

Hmm, we'll also look at the first nuke launched by any given team.

from fafanalysis.

yaniv-aknin avatar yaniv-aknin commented on August 16, 2024

I got this far (looking at 10% of nuke launches on 1st January 2022 in valid >2 player games; for the real answer I'll look at all nuke launches in 2022Q1) -

WITH
  nuke_launches AS (
    SELECT id, player, offset_ms,
    FROM `fafalytics.misc.cmds_q122`
    TABLESAMPLE SYSTEM (10 PERCENT)
    WHERE `fafalytics.faf_ladder_1v1.COMMAND_NAME`(CAST(JSON_EXTRACT_SCALAR(payload, "$.cmd_data.command_type") AS INT64)) = "Nuke"
      AND dt = "2022-01-01"
  ),

  q122_valid_multiplayer_games AS (
    SELECT *, ARRAY_LENGTH(g.playerStats_gamePlayerStats) total_players
    FROM `fafalytics.faf.games_denorm` g
    WHERE ARRAY_LENGTH(g.playerStats_gamePlayerStats) > 2
      AND g.validity = "VALID"
      AND DATE(startTime) = "2022-01-01"
  )

SELECT g.id, ARRAY_AGG(ps.player_player.login), ps.team, "VICTORY" IN UNNEST(ARRAY_AGG(ps.result)) is_victory, MIN(n.offset_ms) first_nuke_ms,
FROM q122_valid_multiplayer_games g
JOIN UNNEST(g.playerStats_gamePlayerStats) ps
INNER JOIN `fafalytics.misc.meta_q122` m ON (g.id, ps.player_player.id) = (m.id, m.faf_player_id)
LEFT JOIN nuke_launches n ON (m.id, m.replay_player_id) = (n.id, CAST(n.player AS STRING))
GROUP BY id, team
ORDER BY id

Which yields a table like so:

id f0_ team is_victory first_nuke_ms
16026235 [JTuceHok,Arler] 3 false
16026235 [S_Monstr,The_Lupes] 2 true
16026241 [Asgaria,TheHardModer,iosh,AsteroidComa128,crustaceanMODE,brack8] 3 false
16026245 [Bigwebmaster,YourMom7,YourMom7] 2 true 2555000
16026245 [Insulner,Lidake] 3 false
16026246 [gonec,Pablo-Escobar,XenocideX,Zickfried] 3 false
16026246 [KapToqpKa,Dadkys,Cetuk,MIHAI] 2 true
16026256 [PaintThinner,SealForce,FFF,AgeOfEpicness,Paradox_of_War] 2 false

Which kinda looks plausible. :)

But I ran out of time, so I'll revisit this issue when I'm next free.

from fafanalysis.

yaniv-aknin avatar yaniv-aknin commented on August 16, 2024

I think this is beginning to look interesting.

Here's a line plot showing "average time to first nuke, by team size, and did the team win or lose":
image

Now a violin plot that gives you an idea of density:
image

And perhaps most interesting, but not very easy to read, is one where we consider "no nukes built" to be "0"; this is useful to show how many games are decided without a nuke at all, and especially the difference between win/loss when not building nukes (more teams win if they launched at least one nuke):
image

Would love to hear your thoughts, when I have a moment I'll clean this up and submit a proper analysis.

from fafanalysis.

yaniv-aknin avatar yaniv-aknin commented on August 16, 2024

I've asked the pros (reddit, kaggle) - let's see what we get :)

from fafanalysis.

IndexLibrorumProhibitorum avatar IndexLibrorumProhibitorum commented on August 16, 2024

So, it looks like nukes are more frequently used as the number of players goes up, but using a nuke might not lead to a statistically significant increase in winchance? Is that about right? I'd like to see this cleaned up a bit and with p values included :P

from fafanalysis.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.