Replays analyser

Discussion of all aspects of multiplayer development: unit balancing, map development, server development, and so forth.

Moderator: Forum Moderators

Post Reply
User avatar
Dunno
Posts: 773
Joined: January 17th, 2010, 4:06 pm
Location: Behind you

Replays analyser

Post by Dunno »

I've made this simple script in python which analyses wesnoth replays. Right now, it's not doing anything very useful (it just shows which game used default settings, how many units were killed, recruited and what maps were used) but it's a pretty neat feature when organising tournaments I think. To use it, simply create a directory and put your replays in there along with the script and run it.
Example use.

However, it can be made to actually do something constructive. Like analysing how many time each faction won against another, thus showing any imbalances (given there's a lot of replays it can analyse). And this is the main reason I'm making this thread for: how can a bot tell who won from a replay? I'm not an experienced player so my ideas may be too naive (like comparing kills of each side, if no leader was defeated). Does anyone have an idea for an algorithm that decides who side has won? Comparing kills, recruits etc.? Multiplying kills by something if someone is playing northerners? Any ideas are welcome.

Also, I'm not quite sure where should I post this (Multiplayer Development? Coder's Corner?) so I've chosen the most neutral forum.
Oh, I'm sorry, did I break your concentration?
User avatar
Turuk
Sithslayer
Posts: 5283
Joined: February 28th, 2007, 8:58 pm
Contact:

Re: Replays analyser

Post by Turuk »

Dunno wrote: However, it can be made to actually do something constructive. Like analysing how many time each faction won against another, thus showing any imbalances (given there's a lot of replays it can analyse). And this is the main reason I'm making this thread for: how can a bot tell who won from a replay? I'm not an experienced player so my ideas may be too naive (like comparing kills of each side, if no leader was defeated). Does anyone have an idea for an algorithm that decides who side has won? Comparing kills, recruits etc.? Multiplying kills by something if someone is playing northerners? Any ideas are welcome.
In regards to analyzing how many times a faction won over another, the results might be too hard to pin to imbalance. If you had 1000 replays of loyalists vs northerners, and the loyalists won 90% of the time, that might have potential to identify an imbalance, but if it's 55% against 45%, that's hard to identify where it was lack of balance that caused the win and what was player skill.
Mainline Maintainer: AOI, DM, NR, TB and THoT.
UMC Maintainer: Forward They Cried, A Few Logs, A Few More Logs, Start of the War, and Battle Against Time
User avatar
tekelili
Posts: 1039
Joined: August 19th, 2009, 9:28 pm

Re: Replays analyser

Post by tekelili »

Btw I find quite fun have a list of dead units for tournaments ^_^

About a bot deciding defeated side, I guess can be quite hard dealing with exceptions. But I guess if a side has both less units and less villages then that is surrender side. But no idea how decide when only match one of them :|

Edit: Thinking more about it, cases where surrender side had more units than winner side should be very, very, very rare. In order for a player (or team) be willing to surrender, usually involves have feeling "of be unable to do anything", and that feeling is hard to reach having more units alive than oponent.
Last edited by tekelili on September 30th, 2013, 7:58 pm, edited 1 time in total.
Be aware English is not my first language and I could have explained bad myself using wrong or just invented words.
World Conquest II
User avatar
alpha1
Posts: 198
Joined: February 29th, 2008, 12:57 am

Re: Replays analyser

Post by alpha1 »

Turuk wrote:If you had 1000 replays of loyalists vs northerners, and the loyalists won 90% of the time, that might have potential to identify an imbalance, but if it's 55% against 45% that's hard to identify where it was lack of balance that caused the win and what was player skill.
Well that's the whole point, no? 45%-55% would be balanced (at least according to Blizzard's balancing standards), anything past that point would indicate imbalances.
If you have any wishes or suggestions concerning the TGT or just want to drop me a message, pls pm me at: alpha1_pm
I won't be able to see any messages that are sent to alpha1.
User avatar
Turuk
Sithslayer
Posts: 5283
Joined: February 28th, 2007, 8:58 pm
Contact:

Re: Replays analyser

Post by Turuk »

Sure, and it'd be interesting to see the numbers from his script. I was stating that I doubt there are percentages that are quite that skewed.

If applied to team games, it could identify what pairings seem to work best against each other, assuming average players all around.
Mainline Maintainer: AOI, DM, NR, TB and THoT.
UMC Maintainer: Forward They Cried, A Few Logs, A Few More Logs, Start of the War, and Battle Against Time
The Black Sword
Posts: 373
Joined: October 13th, 2008, 4:35 pm

Re: Replays analyser

Post by The Black Sword »

Tek's old Ladder2000 add on had some interesting stats with win ratios going into the 60s IIRC, including ones I didn't really expect.

I'm not sure how many games went into it before it stopped though. I found the stats and some others I got from l8 very useful for making decisions in alternate era.
User avatar
iceiceice
Posts: 1056
Joined: August 23rd, 2013, 2:10 am

Re: Replays analyser

Post by iceiceice »

Dunno wrote:And this is the main reason I'm making this thread for: how can a bot tell who won from a replay? I'm not an experienced player so my ideas may be too naive (like comparing kills of each side, if no leader was defeated). Does anyone have an idea for an algorithm that decides who side has won? Comparing kills, recruits etc.? Multiplying kills by something if someone is playing northerners? Any ideas are welcome.
IMHO this is probably really hard to do from the replay -- you could try to figure out if one of the leaders died, (even that might be hard if there are advancing units), but often times players concede well before that point anyways. You could try to evaluate who has more villages / more kills at the end and make an educated guess who won, but also sometimes players concede at inappropriate times. You could try to look at the chat and determine who gave the gg, but that is another can of worms.

Usually replays e.g., on Ladder / from your tournament are posted with the players reporting which team won, and we know this is accurate, otherwise the other team would have disputed it. So maybe you should just keep track of this info when doing your analysis?
User avatar
Pentarctagon
Project Manager
Posts: 5564
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Replays analyser

Post by Pentarctagon »

Dunno wrote:Does anyone have an idea for an algorithm that decides who side has won? Comparing kills, recruits etc.? Multiplying kills by something if someone is playing northerners? Any ideas are welcome.

Also, I'm not quite sure where should I post this (Multiplayer Development? Coder's Corner?) so I've chosen the most neutral forum.
Leader death is a definite thing to look for. The statistics show the gold of the units lost vs units recruited, which would probably be a better measure than just how many kills a side had. Unit position could also give a good idea: if there's an ulfserker next to a mage leader or there are several enemy units nearby a leader at low health, that would be a pretty good indication.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
Post Reply