• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 09:38
CET 15:38
KST 23:38
  • 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
Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10[ASL20] Finals Preview: Arrival13TL.net Map Contest #21: Voting12[ASL20] Ro4 Preview: Descent11Team TLMC #5: Winners Announced!3
Community News
Starcraft, SC2, HoTS, WC3, returning to Blizzcon!13$5,000+ WardiTV 2025 Championship4[BSL21] RO32 Group Stage3Weekly Cups (Oct 26-Nov 2): Liquid, Clem, Solar win; LAN in Philly2Weekly Cups (Oct 20-26): MaxPax, Clem, Creator win9
StarCraft 2
General
Starcraft, SC2, HoTS, WC3, returning to Blizzcon! RotterdaM "Serral is the GOAT, and it's not close" Weekly Cups (Oct 20-26): MaxPax, Clem, Creator win 5.0.15 Patch Balance Hotfix (2025-10-8) TL.net Map Contest #21: Voting
Tourneys
Constellation Cup - Main Event - Stellar Fest Merivale 8 Open - LAN - Stellar Fest $5,000+ WardiTV 2025 Championship Sea Duckling Open (Global, Bronze-Diamond) $3,500 WardiTV Korean Royale S4
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 498 Wheel of Misfortune|Cradle of Death Mutation # 497 Battle Haredened Mutation # 496 Endless Infection Mutation # 495 Rest In Peace
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ SnOw's ASL S20 Finals Review [BSL21] RO32 Group Stage Practice Partners (Official) [ASL20] Ask the mapmakers — Drop your questions
Tourneys
BSL21 Open Qualifiers Week & CONFIRM PARTICIPATION [ASL20] Grand Finals Small VOD Thread 2.0 The Casual Games of the Week Thread
Strategy
Current Meta How to stay on top of macro? PvZ map balance Soma's 9 hatch build from ASL Game 2
Other Games
General Games
Stormgate/Frost Giant Megathread Dawn of War IV Nintendo Switch Thread ZeroSpace Megathread General RTS Discussion Thread
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread YouTube Thread Dating: How's your luck?
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
[Manga] One Piece Movie Discussion! Anime Discussion Thread Korean Music Discussion Series you have seen recently...
Sports
2024 - 2026 Football Thread NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023 Formula 1 Discussion
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
DnB/metal remix FFO Mick Go…
ImbaTosS
Why we need SC3
Hildegard
Career Paths and Skills for …
TrAiDoS
Reality "theory" prov…
perfectspheres
Our Last Hope in th…
KrillinFromwales
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1722 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
Netherlands10341 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
TL+ Member
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
Netherlands10341 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
TL+ Member
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
Next event in 23m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Lowko388
RotterdaM 238
StarCraft: Brood War
Mini 1840
Sea 1654
GuemChi 1387
Jaedong 829
Soma 595
firebathero 566
Stork 559
hero 271
Leta 232
Rush 225
[ Show more ]
Shuttle 206
sSak 154
Barracks 109
Hyuk 109
Pusan 91
Mong 91
Hyun 85
Snow 72
Sharp 59
Backho 51
ToSsGirL 39
Shine 25
Yoon 19
Movie 19
Terrorterran 16
scan(afreeca) 11
IntoTheRainbow 10
Noble 7
Dota 2
qojqva2695
Dendi666
Counter-Strike
zeus470
edward114
markeloff80
Other Games
singsing2292
B2W.Neo786
hiko503
DeMusliM363
crisheroes305
Fuzer 246
Liquid`LucifroN172
XaKoH 129
XcaliburYe92
Mew2King72
QueenE50
Mlord4
Organizations
Counter-Strike
PGL140
StarCraft: Brood War
Kim Chul Min (afreeca) 8
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 15 non-featured ]
StarCraft 2
• intothetv
• AfreecaTV YouTube
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• Azhi_Dahaki22
• HerbMon 22
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• WagamamaTV476
League of Legends
• Jankos2493
• TFBlade147
Upcoming Events
LAN Event
23m
OSC
7h 23m
Replay Cast
8h 23m
OSC
21h 23m
LAN Event
1d
Korean StarCraft League
1d 12h
CranKy Ducklings
1d 19h
LAN Event
2 days
IPSL
2 days
dxtr13 vs OldBoy
Napoleon vs Doodle
BSL 21
2 days
Gosudark vs Kyrie
Gypsy vs Sterling
UltrA vs Radley
Dandy vs Ptak
[ Show More ]
Replay Cast
2 days
Sparkling Tuna Cup
2 days
WardiTV Korean Royale
2 days
LAN Event
3 days
IPSL
3 days
JDConan vs WIZARD
WolFix vs Cross
BSL 21
3 days
spx vs rasowy
HBO vs KameZerg
Cross vs Razz
dxtr13 vs ZZZero
Replay Cast
3 days
Wardi Open
3 days
WardiTV Korean Royale
4 days
Replay Cast
5 days
Kung Fu Cup
5 days
Classic vs Solar
herO vs Cure
Reynor vs GuMiho
ByuN vs ShoWTimE
Tenacious Turtle Tussle
6 days
The PondCast
6 days
RSL Revival
6 days
Solar vs Zoun
MaxPax vs Bunny
Kung Fu Cup
6 days
WardiTV Korean Royale
6 days
Liquipedia Results

Completed

BSL 21 Points
SC4ALL: StarCraft II
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
YSL S2
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025

Upcoming

BSL Season 21
SLON Tour Season 2
BSL 21 Non-Korean Championship
Acropolis #4
HSC XXVIII
RSL Offline Finals
WardiTV 2025
RSL Revival: Season 3
Stellar Fest
META Madness #9
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
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.