Miloš Vlainić

My GitHub blog: things you might be interested, and probably not...

WIN.gg (2019-2022)

Machine Learning consultant

WIN.gg was my first real data job - roughly mid-2019 through early 2022, right after the re-qualification story in my 2019 education blogs. The company sits at the intersection of esports media and betting-adjacent products: news, match pages, and tools on the betting side of the group.

The work was not one product. It was a stretch of applied ML where the same four questions kept coming back:

  1. Who wins? Pre-match and live win probability for Dota 2, CS:GO, and League of Legends.
  2. How good is this player or team right now? A skill rating that updates after every series and decays when someone stops playing.
  3. What should a reader see next? News recommendation with almost no rating history - only clicks, tags, and a knowledge graph of players, teams, and tournaments.
  4. Is any of this good enough to ship? Compare model probabilities to bookmaker odds, measure yield, and only then wrap it in something writers or bettors could use.

I worked as a consultant, mostly in a tight loop with one main ML collaborator, plus product and editorial people who actually knew what readers and the sportsbook cared about.

My role

Day to day I was doing research and delivery at the same time:

Courses ran in parallel on purpose (fast.ai, IBM PyTorch, MITx probability and statistics, Andrew Ng’s structuring projects track). I used them as language for the same problems in the notebooks, not as a separate hobby.


Projects

Dota 2 - live win probability

This was the first big build. Dataset cleaning, sklearn pipelines, then a bake-off: naive Bayes (weak), logistic regression and LightGBM / CatBoost once leakage was gone, fast.ai tabular (looked great until leakage was caught - classic). Optuna on random forests was slow and misleading for the same reason.

Leakage lesson: total earned gold mirrored net worth and dominated importance. Models were re-fit without it. Team-difference features beat raw per-player tables.

Numbers (held-out live matches, after cleanup): LightGBM around AUC ~0.85, accuracy ~0.76. The interesting part was time slicing: first five minutes only ~0.70 AUC - basically a coinflip with a nudge; by twenty minutes, near 0.90. Late game dipped again. A handful of features (gold, last hits, objective damage, level, streak) carried most of the signal.

I also applied Ng’s train / train-dev / dev / test framing and sliced error by game time instead of trusting one accuracy number.

Dota 2 - draft-only (pick and ban)

Sparse hero matrices, role encodings, hero attributes, counter scores from public data. Best boosted models sat near AUC 0.55-0.57. Counter features looked good in EDA and were ~50/50 in practice. Patch as a feature did not save it. Hero-pair explosions failed harder (~0.51).

Honest conclusion I wrote down: pre-match draft signal is weak without a strong skill prior. That is why ratings became central, not a side quest.

Player and team ratings (Elo to TrueSkill 2)

I did the reading track - Elo, Glicko, TrueSkill, TrueSkill Through Time, whole-history ideas - and then ran grids on real snapshots: mu/sigma scales, tau as a fraction of sigma, beta, decay, grace periods (60/120/180 days), team K, tier differences.

Practical fix: raising tau from ~1% to ~10% of sigma “solved many issues” on an old Dota snapshot. Too little drift and the rating cannot follow roster and patch changes.

We exported rankings for CS:GO, Dota 2, and LoL - weekly tables, big-event batches. In the prediction service, player priors were not flat mu: they pulled from the last year of matches - competition tier, percentile contribution per stat (deaths subtracted), win rate, recency, and a cap on games so a 3-0 streak could not dominate.

Underneath I was absorbing factor graphs, expectation propagation, and why draw margins make Gaussian updates messy - the math folder was not decoration.

CS:GO - live features and rankings

Shorter than Dota as a modeling story; longer as domain homework. Round end reasons, economy and loss bonus, armor, bomb plant economics, side choice, overtime rules, map pool changes, 128 tick, why pick/ban data came from a third-party match site and why coach slots inflate player lists. One economy patch note was bookmarked because a single balance change can invalidate a model.

Feature work reused ideas from the Dota position functions. Concrete outputs were TrueSkill ranking tables from the commercial feed and from demos, across several parameter presets we sweated over.

News recommendation

WIN.gg is a content site. We had tags and clicks, not star ratings, and almost no user-item matrix yet - classic cold start.

I self-taught the recommender surveys (content-based vs collaborative, implicit feedback, matrix factorization) and then trained knowledge-graph embeddings with OpenKE - TransE and RotatE on entities and relations from news metadata. Filtered Hit@10 for the better RotatE runs landed around 0.95; we kept dimension 20 because it was almost as good as 50 with far fewer dimensions. Huge TransE or dim 1000 runs were poor.

Follow-ups (fastText, RDF2Vec, BERT-style graph building from Liquipedia) stayed mostly ideas. I remain skeptical that users would ask our site “what team does X play for?” instead of a search engine :)

Prediction service and the tipster thread

By 2021 the tipster work had a real shape: a collector that pulls series, rosters, and player stats from MongoDB, attaches ratings from a ratings API, writes through Redis, runs under Docker on a remote box. Several saved versions of the collector exist because the script moved from laptop experiment to something that had to stay up.

Yield tests on LoL compared model probabilities to outcomes around a fixed split date - basic vs richer feature sets, including a fast.ai model. The question shifted from AUC to whether probabilities make money against the market, the way betting papers teach you to think.

Product conversations kept returning to the same fork: a model that beats bookmakers might be a subscription; one that does not should stay an internal sportsbook tool or a feature on the betting site, not mixed with affiliate fluff on the same surface. Pre-match was the sane first product; live was hard because bookmakers often move faster than our live feed.

Around the same time I tried cookiecutter-style layout: repeated notebook code into src/data, raw vs interim vs processed - still unsure how far to take Make and secrets, but the direction was right.

Smaller threads I still count as learning


Learning alongside the job

Track What I used it for
fast.ai + IBM PyTorch course Tabular and vision baselines; Rossmann-style tables; embeddings that fed recommender thinking
MITx Probability & Statistics Language for priors, confidence, and “is this model real?”
MITx ML with Python Perceptron through collaborative filtering in one syllabus
Ng - Structuring ML Projects Orthogonalization, single metric, error analysis, mismatch - applied to Dota time slices
ESL / ISL / betting papers Calibration, odds-to-probability, longshot bias - how you judge a tipster
Rating papers & factor graphs TrueSkill updates, not just calling a library

I also had to learn the games properly: Dota Radiant/Dire and gold confounders, CS:GO economy, LoL as the main yield-test title by 2021.

Data plumbing: REST vs push WebSocket live state (snapshots every 15-30 seconds, not a full diff), hero name mapping, fields that exist in the internal match DB but never arrive on the wire, Redis warmup, Docker Compose on a remote host. A painful provider exercise: load internal columns into pandas and argue whether the winner flag should come from the demo file.


What I actually learned

  1. Learn the domain before you name features - otherwise you build economy variables that the next patch deletes.
  2. Leakage is silent until you slice by time or remove the one column that is “too good.”
  3. One AUC is a lie - slice by minute, patch, or confidence; use train-dev the way Ng suggests.
  4. Put a probabilistic skill prior under weak pre-match signal; tune tau, decay, and grace on ranking failures, not on vibes.
  5. Notebooks to service - database, cache, container, and feature order that must match training exactly in production.
  6. Judge like a bookmaker when the product is betting: yield and calibration, not a Kaggle leaderboard.

Unfinished edges (on purpose to remember)

Draft-only models never became sharp. Live features from the commercial feed were a subset of what the internal database promised. Matching series identity to sportsbook odds stayed unsolved. The news recommender stopped at strong embeddings, not an online ranker. The tipster sat forever between internal sportsbook tool and public product. The learning on those edges is probably the most valuable part of the archive.


I hope this captures what I did at WIN.gg and what stuck. If I misread a lesson or you want a section expanded, please let me know.