Loading...
  OR  Zero-K Name:    Password:   

AFK/solo-resign stats tool

14 posts, 707 views
Post comment
Filter:    Player:  
sort

2 years ago
There was recently a discussion where a user was suspected to be a serial AFKer/early-solo-resigner.

On the one side it is a very annoying behavior (especially for the top-players, as it is mentioned oftentimes recently), but on the other side it is an accusation which is hard to prove, as opposite to simple "TK in battle X".

So I made a script which makes the relevant statistics for a given user.

Since I don't know how to parse replay files, I used the ZK website battles search. Thankfully all the data is there - the duration of the battle, whether and when the user "died" and so on.

I analysed the last 100 "valid" games of the user (this number can be easily changed in the settings), where "valid" means:
1. Name of the room includes "Teams All Welcome"
2. No exit voted
3. Duration > 1 min.

To give an example/reference point, here are results for myself:

All Battles:

battles count: 100
average battle duration: 25 min.
average played time: 24 min.
average relative played time: 95% of the battle duration
left before the end in 15% of battles

Won Battles:

battles count: 52
average battle duration: 24 min.
average played time: 24 min.
average relative played time: 98% of the battle duration
left before the end in 3% of battles

Lost Battles:

battles count: 48
average battle duration: 26 min.
average played time: 24 min.
average relative played time: 93% of the battle duration
left before the end in 27% of battles


So I very rarely left a game where my team is going to win, but don't like to play to the last solar, so in 27% of lost games I solo-resign/ragequit, but close to the end of the battle.

Now, these are the results for the suspected serial AFKer/resigner:

All Battles:

battles count: 100
average battle duration: 22 min.
average played time: 16 min.
average relative played time: 79% of the battle duration
left before the end in 49% of battles

Won Battles:

battles count: 47
average battle duration: 22 min.
average played time: 17 min.
average relative played time: 79% of the battle duration
left before the end in 44% of battles

Lost Battles:

battles count: 53
average battle duration: 22 min.
average played time: 16 min.
average relative played time: 78% of the battle duration
left before the end in 52% of battles


As we can see, this user quits half of the games, both won and lost, at the same average time-mark.

I hope this tool can help to (dis-)prove the similar accusations.

To run the script you need Bash and cURL.

The script is in the spoiler below:

[Spoiler]

+5 / -0
2 years ago
Of the times this player resigned early, how often did they resign only after they had already lost all or most of their units and thus would have very little stuff left to "annoy" whoever inherited it?
+0 / -0

2 years ago
Can't get such kind of info with this approach. Even by parsing the replay files, AFAIU, you can't know, you need to actually replay the games, so it's not feasible.
+0 / -0
2 years ago
Maybe look at the total value of stuff the player owned right before they resigned in the in-game graph? It would be obvious in the graph when they resigned since their total value would suddenly drop to 0 (if they hadn't already lost everything before resigning) while the top player would suddenly gain an equal value at the same time.
+0 / -0
Again, there is no such info available. All I can get it what appears in the https://zero-k.info/Battles/Detail/XXXXXXX pages.
+0 / -0
ILrankrollmops: in case you are interested you can find all the data from the battles pages in a sqlite database http://zerok-local-analysis.s3-website.eu-west-3.amazonaws.com/data/zk.db.gz , updated regularly. Warning: it's large! (I used it for http://zero-k.info/Forum/Thread/34840?postID=248087)

The data you provided could be obtained using that database using:

select COUNT(*) as "Battle count", 
  AVG(b.duration_sec/60) as "Average duration(min)",
  AVG(bp.playtime_sec/60) as "Average playtime(min)", 
  AVG(CAST(bp.playtime_sec as float)/b.duration_sec) as "Average relative played time",
  CAST(SUM(b.duration_sec!=bp.playtime_sec) as float)/COUNT(*)*100 as "Left before the end"
from battle_player bp inner join battles b on bp.battle_id=b.battle_id where player_id = 5295
  AND b.duration_sec>60 AND b.title LIKE "%Teams All Welcome";


with the result for me (I checked and your results are very close to what you showed, even if I compute over all your battles):

quote:

Battle count|Average duration(min)|Average playtime(min)|Average relative played time|Left before the end
772|22.130829015544|21.9300518134715|0.990710690360682|6.21761658031088


Similar queries can be made for battles won/battles lost and limiting from which start date to consider.

I assume if you like programming in bash, you know (or could easily learn SQL) ;-).
+1 / -0
"left before the end in 15% of battles" is not a relevant statistic, for example I quit most of my lost games before they end or resign vote passes.

It should be specified what it means, because leaving before the end when the game is a minute from ending is a much different situation than leaving in the first 5 minutes.
+0 / -0
You can tweak endlessly what you report. You want number of battles where person left before 95% of battle time? Here you are:

select COUNT(*) as "Battle count", 
  AVG(b.duration_sec/60) as "Average duration(min)",
  AVG(bp.playtime_sec/60) as "Average playtime(min)", 
  AVG(CAST(bp.playtime_sec as float)/b.duration_sec) as "Average relative played time",
  CAST(SUM(CAST(bp.playtime_sec as float)/b.duration_sec<0.95) as float)/COUNT(*)
from battle_player bp inner join battles b on bp.battle_id=b.battle_id where player_id = 5295
  AND b.duration_sec>60 AND b.title LIKE "%Teams All Welcome";


ILrankrollmops: I am jealous on your formatted code, how do you achieve that? (tried quote/spoiler, but don't seem to do what I want)

Edit: now with formatting.
+0 / -0
quote:
It should be specified what it means, because leaving before the end when the game is a minute from ending is a much different situation than leaving in the first 5 minutes.


It seems pretty clear that the "end" of the game is when the game stops, i.e. when the stats screen pops up. And yes, there is a big difference between leaving in the first 5 minutes vs the last 5 -- that is what "average relative played time" is for. Leaving the game for the last 5% on average vs leaving the game for the last 20% on average is pretty telling of exactly the issue that is of concern here.

Also of note is the difference of 5% between ILrankrollmops' won/lost games, vs 1% for the other set of statistics. This is evidence that the early leaving is not dependent on winning or losing the game.

btw, FRrankmalric

Ostensibly, forum uses BBCode, but code/pre tags don't appear to be implemented. However, that effect seems to be the result of using triple brackets { { { and } } } (without the spaces)

to get something like this
+2 / -0

2 years ago
FRrankmalric: I didn't know about DB, and yes I can SQL, so I will look into it. Regarding the formatting, took it from here: https://zero-k.info/Wiki/formatting ; as USrankAdminmaackey suggested, it's
[spoiler]​{​{​{code​}​}​}[/spoiler]

[Spoiler]
+1 / -0

2 years ago
FRrankmalric, do you have an updated db? I wrote some R code which creates hall of fame shame for the AFKers, but the db is too old now...
+0 / -0
2 years ago
Fixed the update script, I was saving with a different name that was linked here. Sorry for that.

Please post a message if you do not see it updating again.

Would you benefit from (let's say) a database with the last 6 months only? This is the full database that has 10 years of games, and while interesting might be to large to always get only for recent updates.

+0 / -0

2 years ago
6 last months will definitely do. I can wait until you post it.

I'm also testing my hypothesis regarding players' synergy.
+0 / -0
2 years ago
Link for the database of the last 6 months: http://zerok-local-analysis.s3-website.eu-west-3.amazonaws.com/data/zk_last6months.db.gz (~23 MBytes). Did not check much so please tell me if you see any inconsistencies. Should be updated daily.

+1 / -0