• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 15:24
CEST 21:24
KST 04:24
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
Serral wins EWC 20259Tournament Spotlight: FEL Cracow 20259Power Rank - Esports World Cup 202580RSL Season 1 - Final Week9[ASL19] Finals Recap: Standing Tall15
Community News
[BSL 2025] H2 - Team Wars, Weeklies & SB Ladder2EWC 2025 - Replay Pack2Google Play ASL (Season 20) Announced26BSL Team Wars - Bonyth, Dewalt, Hawk & Sziky teams10Weekly Cups (July 14-20): Final Check-up0
StarCraft 2
General
Greatest Players of All Time: 2025 Update #1: Maru - Greatest Players of All Time Serral wins EWC 2025 Power Rank - Esports World Cup 2025 EWC 2025 - Replay Pack
Tourneys
FEL Cracov 2025 (July 27) - $10,000 live event TaeJa vs Creator Bo7 SC Evo Showmatch Esports World Cup 2025 $25,000 Streamerzone StarCraft Pro Series announced $5,000 WardiTV Summer Championship 2025
Strategy
How did i lose this ZvP, whats the proper response
Custom Maps
External Content
Mutation # 484 Magnetic Pull Mutation #239 Bad Weather Mutation # 483 Kill Bot Wars Mutation # 482 Wheel of Misfortune
Brood War
General
BW General Discussion [BSL 2025] H2 - Team Wars, Weeklies & SB Ladder BGH Auto Balance -> http://bghmmr.eu/ Afreeca app available on Samsung smart TV Google Play ASL (Season 20) Announced
Tourneys
[Megathread] Daily Proleagues [BSL20] Non-Korean Championship 4x BSL + 4x China CSL Xiamen International Invitational [CSLPRO] It's CSLAN Season! - Last Chance
Strategy
Does 1 second matter in StarCraft? Simple Questions, Simple Answers [G] Mineral Boosting
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread Total Annihilation Server - TAForever [MMORPG] Tree of Savior (Successor of Ragnarok) Path of Exile
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
How many questions are in the Publix survey?
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread UK Politics Mega-thread Stop Killing Games - European Citizens Initiative Things Aren’t Peaceful in Palestine
Fan Clubs
INnoVation Fan Club SKT1 Classic Fan Club!
Media & Entertainment
Anime Discussion Thread [\m/] Heavy Metal Thread Movie Discussion! [Manga] One Piece Korean Music Discussion
Sports
2024 - 2025 Football Thread Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023 NBA General Discussion
World Cup 2022
Tech Support
Gtx660 graphics card replacement Installation of Windows 10 suck at "just a moment" Computer Build, Upgrade & Buying Resource Thread
TL Community
TeamLiquid Team Shirt On Sale The Automated Ban List
Blogs
Ping To Win? Pings And Their…
TrAiDoS
momentary artworks from des…
tankgirl
from making sc maps to makin…
Husyelt
StarCraft improvement
iopq
Socialism Anyone?
GreenHorizons
Eight Anniversary as a TL…
Mizenhauer
Customize Sidebar...

Website Feedback

Closed Threads



Active: 744 users

Fun with TLPD and R

Blogs > zoniusalexandr
Post a Reply
zoniusalexandr
Profile Blog Joined August 2010
United States39 Posts
Last Edited: 2011-07-22 02:25:24
July 07 2011 06:37 GMT
#1
I've been working on a way to statistically evaluate player performances that improves upon ELO, but before I can do any calculations I need data!

Now that we've got all the data in one place and in a common format, we can start having fun. I've been working on network problems recently for my research, so I thought I'd whip up a few graphs.

Here's a quick graph of the game network for the Homestory Cup #3, just to make sure everything's working before we look at the whole dataset. Here the nodes represent players, and each line connecting two players represents one game.
[image loading]
Everything looks good, nothing out of the ordinary. You can see the groups of 4 pretty clearly, with the players who advanced out of group stages in the middle.

Now let's try something more difficult. I thought it might be really cool to look at the whole game network of the TLPD. However, there are a huge number of players who have played only a handful of games, and so plotting all the players becomes overwhelming. Instead, I've limited the sample to a k-core or a k-degenerate graph, which is basically the largest subset of players who have played games against at least k other opponents. I tried out a bunch of values, but k=12 seemed to work the best (you're welcome to experiment on your own). The nodes are represented by the player name, which is colored to represent their most played race:
(edit: this graph originally included redundant games between pairs of players. I've removed the duplicates, which biased the network against the Koreans, who don't have as many games on record)
[image loading]
This graph shows quite clearly the three different scenes, the Koreans on the right, Europeans on bottom-left, and Americans on bottom-right. Even though these three are fairly distinct, there's a lot of cross-over, especially for players in the middle.

That's all I've got for today, getting the data into R took longer than I thought. For my next analysis, I'm going to be working on a new algorithm to rank players based on their performance and the difficulty of their opponents that might replace ELO. I've almost finished working out the math, but my plan is to use Metropolis-Hastings to maximize the likelihood of the realized game outcomes based on the players skill levels. I'm still a little new to Bayesian methods, so ideas/comments would be much appreciated!

PS: Here's the R code I used to consolidate the data and generate the network graphs.
+ Show Spoiler [R Code] +
rm(list=ls())
options("stringsAsFactors"=FALSE)
setwd(dir)

int <- read.csv("tlpd_international.csv")
int <- int[ ,1:12]
int$edition <- "International"

kor <- read.csv("tlpd_korean.csv")
kor <- kor[ ,1:12]
kor$edition <- "Korean"

beta <- read.csv("tlpd_beta.csv")
beta <- beta[ ,1:12]
beta$edition <- "Beta"

tlpd <- rbind(int,kor,beta)

write.csv(tlpd, file = "tlpd.csv", append = FALSE)

library(igraph)

getRaceColors <- function(players,tlpd){
races <- c()
for (player in players){
games <- c(tlpd[tlpd$Winner==player,8],tlpd[tlpd$Loser==player,11])
t <- length(games[games=="T"])
z <- length(games[games=="Z"])
p <- length(games[games=="P"])
if (t > z){
races <- c(races,"#00005d")
}
else if (z > p){
races <- c(races,"#890000")
}
else {
races <- c(races,"#006e2f")
}
}
return(races)
}

event = "2011 Homestory Cup #3"
hsc = tlpd[tlpd$Tournament == event,]
hsccondensed = hsc[ ,c(7,10)]
hscgraph <- graph.data.frame(hsccondensed,directed=FALSE)
plot(hscgraph,vertex.label=unique(c(hsc$Winner,hsc$Loser)),layout=layout.kamada.kawai(hscgraph),
vertex.size=20,vertex.label.cex=0.7,main="Homestory Cup #3 Game Network")

tlpdcondensed = tlpd[ ,c(7,10)]
tlpdgraph <- graph.data.frame(tlpdcondensed,directed=FALSE)
V(tlpdgraph)$label <- unique(c(tlpd$Winner,tlpd$Loser))
V(tlpdgraph)$size <- 0
V(tlpdgraph)$label.cex <- 0.75
cores <- graph.coreness(tlpdgraph)
tlpdgraph2 <- subgraph(tlpdgraph,as.vector(which(cores>30))-1)
V(tlpdgraph2)$label.color <- getRaceColors(V(tlpdgraph2)$label,tlpd)
plot(tlpdgraph2,layout=layout.fruchterman.reingold(tlpdgraph2),main="TLPD Game Network",
sub="Only players with 30+ games against top opponents are shown (30-core)",margin=c(-1,-1,-1,-1))


*****
R1CH
Profile Blog Joined May 2007
Netherlands10340 Posts
July 07 2011 06:46 GMT
#2
Scraping TLPD (and other parts of the site) is against our terms of service as it creates undue load on our servers. I've edited the offending portion of your post out, I would appreciate it if you didn't distribute such tools.
AdministratorTwitter: @R1CH_TL
sinani206
Profile Blog Joined November 2010
United States1959 Posts
July 07 2011 06:48 GMT
#3
You'd think Tyler would be doing better considering all of the games he's played...

Anyway, really nice work. It was very interesting to see the analysis of HSC and of the TLPD in general.
literally everything is wifom just shut the fuck up
zoniusalexandr
Profile Blog Joined August 2010
United States39 Posts
July 07 2011 07:03 GMT
#4
Sorry about that! I've taken down the hosted script file. Would it be acceptable if I still distributed the csv file? I know a number of people have been looking to get access to that data, and distributing the compiled data file won't affect your servers.
R1CH
Profile Blog Joined May 2007
Netherlands10340 Posts
July 07 2011 07:10 GMT
#5
We'd prefer if you didn't. Our volunteers have put years of work into building up the TLPD database and making it one of TL's top resources and we'd like to keep that data on TL; it represents a lot of time and effort by our TLPD team.

If you have ideas for more statistics and features however, you can definitely post them in the TLPD feedback thread and we'll see if we can make it available through a more official means .
AdministratorTwitter: @R1CH_TL
Primadog
Profile Blog Joined April 2010
United States4411 Posts
July 07 2011 07:11 GMT
#6
yes please zoniusalexandr. This is right up my alley.
Thank God and gunrun.
Ruyguy
Profile Blog Joined January 2011
Canada988 Posts
July 07 2011 08:53 GMT
#7
why do you people write in alien language?
Primadog
Profile Blog Joined April 2010
United States4411 Posts
July 07 2011 08:55 GMT
#8
On July 07 2011 17:53 Ruyguy wrote:
why do you people write in alien language?

Don't you insult holy arabian numerals in such tone!
Thank God and gunrun.
Please log in or register to reply.
Live Events Refresh
RotterdaM Event
17:00
Rotti Stream Rumble All-Random
RotterdaM762
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RotterdaM 762
UpATreeSC 132
SteadfastSC 75
EmSc Tv 49
MindelVK 12
StarCraft: Brood War
Mini 1093
EffOrt 677
Dewaltoss 143
Mind 122
yabsab 95
TY 86
Free 36
sas.Sziky 26
eros_byul 0
Dota 2
syndereN130
League of Legends
Grubby3477
Counter-Strike
fl0m4642
sgares521
Stewie2K150
Super Smash Bros
Westballz32
Heroes of the Storm
Liquid`Hasu0
Other Games
Fuzer 120
Trikslyr89
mouzStarbuck44
Sick5
trigger1
Organizations
StarCraft 2
EmSc Tv 49
EmSc2Tv 49
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 22 non-featured ]
StarCraft 2
• kabyraGe 220
• Berry_CruncH131
• davetesta54
• LUISG 2
• IndyKCrew
• sooper7s
• Migwel
• AfreecaTV YouTube
• LaughNgamezSOOP
• intothetv
• Kozan
StarCraft: Brood War
• 80smullet 19
• HerbMon 17
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• C_a_k_e 5822
• masondota22377
• WagamamaTV723
League of Legends
• TFBlade1133
Other Games
• imaqtpie1282
• Shiphtur647
Upcoming Events
Sparkling Tuna Cup
14h 36m
WardiTV European League
20h 36m
PiGosaur Monday
1d 4h
uThermal 2v2 Circuit
1d 20h
The PondCast
2 days
Replay Cast
3 days
Korean StarCraft League
4 days
CranKy Ducklings
4 days
Online Event
4 days
Sparkling Tuna Cup
5 days
Liquipedia Results

Completed

BSL 20 Non-Korean Championship
FEL Cracow 2025
Underdog Cup #2

Ongoing

Copa Latinoamericana 4
Jiahua Invitational
BSL 20 Team Wars
CC Div. A S7
IEM Cologne 2025
FISSURE Playground #1
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25

Upcoming

BSL 21 Qualifiers
ASL Season 20: Qualifier #1
ASL Season 20: Qualifier #2
ASL Season 20
CSLPRO Chat StarLAN 3
BSL Season 21
RSL Revival: Season 2
Maestros of the Game
SEL Season 2 Championship
WardiTV Summer 2025
uThermal 2v2 Main Event
HCC Europe
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.