Ladder statistics

General feedback and discussion of the game.

Moderators: Forum Moderators, Developers

Post Reply
amir
Posts: 21
Joined: August 24th, 2008, 10:43 am

Ladder statistics

Post by amir » July 7th, 2019, 5:10 pm

I created win/loss per faction statistics from ladder games. I did it by downloading all replays and converting them to xml using WML2XML. After that i parsed the game title for the word "ladder" and declared a game won when one side surrenders. Only games that ended by surrender are taken into account.
Attached you'll find the result as renderings in a pdf and the raw csv data.

I'm aware that this is not much data and therefor not very significant. I guess I'll have to wait way longer before doing this again or find a way to access the ladder data directly.
Attachments
wesnoth.pdf
A pdf with renderings of the csv data
(284.69 KiB) Downloaded 104 times
result_filtered.csv
A csv file containg the parsed data
(43.1 KiB) Downloaded 79 times

User avatar
sergey
Posts: 439
Joined: January 9th, 2015, 9:25 pm

Re: Ladder statistics

Post by sergey » July 7th, 2019, 8:15 pm

amir wrote:
July 7th, 2019, 5:10 pm
I'm aware that this is not much data and therefor not very significant.
Do you have any ideas why there is no much data? There should be much more ladder games. Have you downloaded all replays from here https://replays.wesnoth.org/ ? Perhaps it is caused by the fact that the game may be also ended by quit (no surrender) or by leader death.

Have you logged how many replays were processes in total? Were there any errors during processing? E.g. faction name equals to "Custom". I am pretty sure that so called map-picker (map-randomizer) add-ons that are often used for the ladder games may have that problem. For 1.14 it is even worse, we could check earlier versions too.

Take a look at my comment viewtopic.php?f=15&t=49889&start=120#p643796
Author of SP scenario Dragon Fight and SP campaign Captured by a Nightmare.
Created The Rise of Wesnoth (alternative mechanics) version of the mainline campaign.

amir
Posts: 21
Joined: August 24th, 2008, 10:43 am

Re: Ladder statistics

Post by amir » July 8th, 2019, 9:20 am

sergey wrote:
July 7th, 2019, 8:15 pm
Do you have any ideas why there is no much data? There should be much more ladder games. Have you downloaded all replays from here https://replays.wesnoth.org/ ? Perhaps it is caused by the fact that the game may be also ended by quit (no surrender) or by leader death.
I only analyzed v1.14 games because i wanted to rely on the surrender feature. about 500 ladder games didn't end in surrender.
sergey wrote:
July 7th, 2019, 8:15 pm
Have you logged how many replays were processes in total?
I parsed 220166 games in total and about 900 of those were games with the word "ladder" in the title.
sergey wrote:
July 7th, 2019, 8:15 pm
Were there any errors during processing? E.g. faction name equals to "Custom". I am pretty sure that so called map-picker (map-randomizer) add-ons that are often used for the ladder games may have that problem. For 1.14 it is even worse, we could check earlier versions too.
Yes, i encountered the "Custom" faction name but i have a workaround, so i get the real faction name. Appart from that i only encountered one game where the title had the word "ladder" in the title but had more than 2 sides.

---
sergey wrote:
July 7th, 2019, 8:15 pm
Take a look at my comment viewtopic.php?f=15&t=49889&start=120#p643796
Do you still have the ladder database data? I have the means to overcome the technical challenges you faced because i can analyze the replays for each game.

---

I created a repository containing my code: https://github.com/kallaballa/WesnothStats
Last edited by Pentarctagon on July 8th, 2019, 12:33 pm, edited 1 time in total.
Reason: Merged triple-post

User avatar
sergey
Posts: 439
Joined: January 9th, 2015, 9:25 pm

Re: Ladder statistics

Post by sergey » July 8th, 2019, 10:21 am

amir wrote:
July 8th, 2019, 9:23 am
Do you still have the ladder database data?
Yes, I have mysql dump of the ladder games table. I will send it to you.

The table doesn't contain Wesnoth version and factions. However, it may contain replay file identifier which can be downloaded from the ladder website http://wesnoth.gamingladder.info/gamehistory.php Perhaps you should investigate the ladder website code to understand how to link the replay identifier with the url of that file, I will provide more info via PM. From the replay file you can take the Wesnoth version. I recommend to take into account 1.10 - 1.14 games, since there were no balance changes as I described in the bottom of this comment viewtopic.php?f=15&t=49889&start=45#p643231 You can determine the winner based on the ladder game data and don't rely on the "surrender" functionality.

There is a possibility to discard the game. Perhaps you should exclude such games from the analysis. Also there was an idea to analyze only games with players that have more than 1800 Elo points, Cackfiend and Hejnewar agreed on that value. Additionally, you could restrict points difference between players to have better results (player with much higher points can win no matter what faction they use). I think 400 may be used as a maximum points difference. Elo points are available in the db table.
amir wrote:
July 8th, 2019, 9:20 am
Yes, i encountered the "Custom" faction name but i have a workaround, so i get the real faction name.
Could you describe the workaround please, I didn't understand the code. I think you could determine the faction based on the recruitment list.

P.S. I think I understood your code :) You retrieved the faction name from the variable, which is actually my code that is used in the "Ladder Era" add-on :lol: That won't work for earlier Wesnoth versions. I added this add-on only for 1.14. For earlier versions "Sandbox Map Picker" and "Rushed By Yetis" add-ons (map-pickers) were used.

P.S.S. It is not correct to rely on those variables because of the "shuffle sides" functionality. E.g variable side1 may be used fore side 2 if the sides were shuffled. If I will explain that, it will lead to more questions on how the add-on works. As I said earlier, you should rely on the recruit list to determine the real faction if "Custom" faction name is used.
For example:
- Knalgans have "Dwarvish" word in their recruitment list
- Drakes "Drake"
- Rebels "Elvish"
- Undead "Skeleton"
- Notherners "Orcish"
- Loyalists "Horseman" (don't use "Spearman" since Northerners have "Goblin Spearman")
Author of SP scenario Dragon Fight and SP campaign Captured by a Nightmare.
Created The Rise of Wesnoth (alternative mechanics) version of the mainline campaign.

amir
Posts: 21
Joined: August 24th, 2008, 10:43 am

Re: Ladder statistics

Post by amir » July 8th, 2019, 4:10 pm

I switched to using the ladder database as data source and analyzed games from 2013-2018. Once for all parsable games and once for all parseable games where both players have an elo above 1800. Attached you'll find the rendered pdfs. Thanks to sergey for the database file and help.

Edit: i fixed the pdf files
Attachments
1800elo.pdf
the rendered statistics for games with both players above 1800
(698.53 KiB) Downloaded 135 times
0elo.pdf
the rendered statistics for games with both players above 0
(718.07 KiB) Downloaded 91 times

User avatar
sergey
Posts: 439
Joined: January 9th, 2015, 9:25 pm

Re: Ladder statistics

Post by sergey » July 8th, 2019, 5:22 pm

Wow, that is great!

May I take a look at the code, could you update your github repo please?
Last edited by sergey on July 9th, 2019, 6:23 am, edited 1 time in total.
Author of SP scenario Dragon Fight and SP campaign Captured by a Nightmare.
Created The Rise of Wesnoth (alternative mechanics) version of the mainline campaign.

amir
Posts: 21
Joined: August 24th, 2008, 10:43 am

Re: Ladder statistics

Post by amir » July 8th, 2019, 5:31 pm

Done. the script I'm using is decideByName.sh

User avatar
Cackfiend
Posts: 436
Joined: January 28th, 2007, 7:36 am
Location: Florida, USA
Contact:

Re: Ladder statistics

Post by Cackfiend » July 8th, 2019, 6:17 pm

very interesting data, amir! the 1800elo pdf is especially interesting.

We did create Ladder Era to fight these imbalances :)

viewtopic.php?f=15&t=49964
"There's no love in fear." - Maynard James Keenan

I'm the guy who's responsible for 40% Gliders in all hexes... I can now die a happy man. =D

amir
Posts: 21
Joined: August 24th, 2008, 10:43 am

Re: Ladder statistics

Post by amir » July 9th, 2019, 1:53 pm

I updated the repo to be usable by others and wrote a proper readme. You should now be able to reproduce my results and query your own. I know that the code is far from optimal.
Please let me know if you have any problems or suggestions for improvement.

User avatar
nyov
Posts: 20
Joined: July 7th, 2019, 1:45 pm

Re: Ladder statistics

Post by nyov » July 10th, 2019, 3:56 pm

Nice info for someone uninitiated to MP, like me.
Looks like I should play Loyalists or Northerners, and skip on the Undead ^_^

(and again, nice work on the XML converter)

User avatar
sergey
Posts: 439
Joined: January 9th, 2015, 9:25 pm

Re: Ladder statistics

Post by sergey » July 10th, 2019, 4:24 pm

nyov wrote:
July 10th, 2019, 3:56 pm
Nice info for someone uninitiated to MP, like me.
Looks like I should play Loyalists or Northerners, and skip on the Undead ^_^
Don't do that please :) In the beginning, your losses will be caused by a lack of skills, not due to an imbalance. And you should learn how to play as Undead, otherwise it will be even worse for you.
Author of SP scenario Dragon Fight and SP campaign Captured by a Nightmare.
Created The Rise of Wesnoth (alternative mechanics) version of the mainline campaign.

User avatar
josteph
Developer
Posts: 740
Joined: August 19th, 2017, 6:58 pm

Re: Ladder statistics

Post by josteph » July 10th, 2019, 7:28 pm

It does sound like one should try to master northerners before one tries to master undead, though, doesn't it? (Feel free to answer in a new thread)

User avatar
nyov
Posts: 20
Joined: July 7th, 2019, 1:45 pm

Re: Ladder statistics

Post by nyov » July 10th, 2019, 7:50 pm

sergey wrote:
July 10th, 2019, 4:24 pm
Don't do that please :)
Just trying to get a rise out of someone ;) based on that kinda obvious faction imbalance there.
I am rather partial to the Rebels and Undead factions.
And I won't likely be playing Ladder, now or in the future, so no issue for me.

amir
Posts: 21
Joined: August 24th, 2008, 10:43 am

Re: Ladder statistics

Post by amir » July 10th, 2019, 10:35 pm

Are there other statistics you would like to see?

User avatar
sergey
Posts: 439
Joined: January 9th, 2015, 9:25 pm

Re: Ladder statistics

Post by sergey » July 10th, 2019, 10:58 pm

amir wrote:
July 10th, 2019, 10:35 pm
Are there other statistics you would like to see?
Could you compile faction vs faction per map statistics please? E.g. win ratio Drakes / Rebels on Hamlets = 60% / 40%

I have even better idea, though it is of course up to you to implement it or not. Here it is:
- remove all rows from the table that don't have associated replay file
- add new text columns "winner faction" and "looser faction"
- add new numeric column "Wesnoth version"
- add new text column "map name"
- add new text column "era name"
- fill those new columns with data from the replay files

With such modified table it would be much faster and more convenient to perform future queries. However, feel free to ignore this idea if you don't like it.
Author of SP scenario Dragon Fight and SP campaign Captured by a Nightmare.
Created The Rise of Wesnoth (alternative mechanics) version of the mainline campaign.

Post Reply