• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 09:11
CEST 15:11
KST 22:11
  • 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
Team TLMC #5 - Finalists & Open Tournaments0[ASL20] Ro16 Preview Pt2: Turbulence6Classic Games #3: Rogue vs Serral at BlizzCon9[ASL20] Ro16 Preview Pt1: Ascent10Maestros of the Game: Week 1/Play-in Preview12
Community News
Weekly Cups (Sept 8-14): herO & MaxPax split cups3WardiTV TL Team Map Contest #5 Tournaments1SC4ALL $6,000 Open LAN in Philadelphia7Weekly Cups (Sept 1-7): MaxPax rebounds & Clem saga continues29LiuLi Cup - September 2025 Tournaments3
StarCraft 2
General
#1: Maru - Greatest Players of All Time Team Liquid Map Contest #21 - Presented by Monster Energy Weekly Cups (Sept 8-14): herO & MaxPax split cups SpeCial on The Tasteless Podcast Team TLMC #5 - Finalists & Open Tournaments
Tourneys
Sparkling Tuna Cup - Weekly Open Tournament WardiTV TL Team Map Contest #5 Tournaments Maestros of The Game—$20k event w/ live finals in Paris RSL: Revival, a new crowdfunded tournament series SC4ALL $6,000 Open LAN in Philadelphia
Strategy
Custom Maps
External Content
Mutation # 491 Night Drive Mutation # 490 Masters of Midnight Mutation # 489 Bannable Offense Mutation # 488 What Goes Around
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ [ASL20] Ro16 Preview Pt2: Turbulence Diplomacy, Cosmonarchy Edition BW General Discussion ASL20 General Discussion
Tourneys
[ASL20] Ro16 Group D [ASL20] Ro16 Group C [Megathread] Daily Proleagues SC4ALL $1,500 Open Bracket LAN
Strategy
Simple Questions, Simple Answers Muta micro map competition Fighting Spirit mining rates [G] Mineral Boosting
Other Games
General Games
Stormgate/Frost Giant Megathread Path of Exile General RTS Discussion Thread Nintendo Switch Thread Borderlands 3
Dota 2
Official 'what is Dota anymore' discussion LiquidDota to reintegrate into TL.net
League of Legends
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
Community
General
Things Aren’t Peaceful in Palestine US Politics Mega-thread Canadian Politics Mega-thread Russo-Ukrainian War Thread The Big Programming Thread
Fan Clubs
The Happy Fan Club!
Media & Entertainment
Movie Discussion! [Manga] One Piece Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion MLB/Baseball 2023
World Cup 2022
Tech Support
Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread High temperatures on bridge(s)
TL Community
BarCraft in Tokyo Japan for ASL Season5 Final The Automated Ban List
Blogs
The Personality of a Spender…
TrAiDoS
A very expensive lesson on ma…
Garnet
hello world
radishsoup
Lemme tell you a thing o…
JoinTheRain
RTS Design in Hypercoven
a11
Evil Gacha Games and the…
ffswowsucks
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1623 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
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
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
OSC
13:00
King of the Hill #225
iHatsuTV 0
Liquipedia
2v2
11:00
TLMC $500 2v2 Open Cup
WardiTV456
IndyStarCraft 121
Rex80
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Lowko433
IndyStarCraft 121
Rex 80
ProTech67
Codebar 1
StarCraft: Brood War
Calm 14153
Flash 7409
Rain 5349
Bisu 5009
GuemChi 4145
BeSt 1400
Horang2 1399
EffOrt 1033
Mini 864
Hyuk 696
[ Show more ]
Zeus 528
firebathero 487
Pusan 384
ZerO 327
Hyun 213
Snow 204
Soulkey 181
Barracks 155
Mind 127
Rush 98
Mong 74
ggaemo 72
PianO 53
soO 50
Aegong 48
Backho 47
Sea.KH 45
JYJ42
Movie 36
Killer 35
Sharp 26
sorry 17
Free 17
Sacsri 17
Terrorterran 15
Yoon 13
HiyA 12
hero 12
Icarus 11
SilentControl 10
IntoTheRainbow 6
Noble 5
Bale 5
Hm[arnc] 4
Dota 2
Gorgc4019
singsing3995
qojqva1613
Dendi1565
XcaliburYe241
Pyrionflax184
Fuzer 154
Counter-Strike
byalli224
markeloff168
zeus99
edward20
Other Games
olofmeister1206
B2W.Neo882
hiko804
x6flipin406
crisheroes374
Hui .237
Happy166
QueenE56
NeuroSwarm48
Trikslyr34
FunKaTv 20
ToD9
Organizations
StarCraft: Brood War
Afreeca ASL 16165
UltimateBattle 208
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• intothetv
• AfreecaTV YouTube
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• C_a_k_e 2547
• WagamamaTV456
League of Legends
• Nemesis6036
• TFBlade300
Upcoming Events
PiGosaur Monday
10h 49m
LiuLi Cup
21h 49m
RSL Revival
1d 20h
Maru vs Reynor
Cure vs TriGGeR
The PondCast
1d 23h
RSL Revival
2 days
Zoun vs Classic
Korean StarCraft League
3 days
BSL Open LAN 2025 - War…
3 days
RSL Revival
3 days
BSL Open LAN 2025 - War…
4 days
RSL Revival
4 days
[ Show More ]
Online Event
5 days
Wardi Open
5 days
Sparkling Tuna Cup
6 days
Liquipedia Results

Completed

Proleague 2025-09-10
Chzzk MurlocKing SC1 vs SC2 Cup #2
HCC Europe

Ongoing

BSL 20 Team Wars
KCM Race Survival 2025 Season 3
BSL 21 Points
ASL Season 20
CSL 2025 AUTUMN (S18)
LASL Season 20
RSL Revival: Season 2
Maestros of the Game
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1

Upcoming

2025 Chongqing Offline CUP
BSL World Championship of Poland 2025
IPSL Winter 2025-26
BSL Season 21
SC4ALL: Brood War
BSL 21 Team A
Stellar Fest
SC4ALL: StarCraft II
EC S1
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
MESA Nomadic Masters Fall
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries 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.