---
name: dota2-analyzer
description: Analyze Dota 2 matches for single-map and series (Bo1/Bo2/Bo3/Bo5) win probabilities using rating-based logistic models strengthened by recent form, H2H, patch meta and optional Poisson kill or net-worth lead simulation. Extract team rankings, form and stats from DLTV, Dotabuff, OpenDota, STRATZ and Liquipedia via browse_page. Supports pre-draft strength estimates and post-draft adjustments. Use for pre-match predictions, series score distributions, value spotting vs bookmaker or Polymarket odds. Triggers on Dota 2, dota2, TI, DreamLeague, Bo3 prediction, map win, series win, 勝率, Radiant, Dire.
---

# Dota 2 Win Probability Analyzer (Strengthened)

Use for any professional Dota 2 match analysis involving win rates or probabilities. Trigger words include Dota 2, dota2, TI, The International, DreamLeague, ESL One, PGL, Bo3, Bo5, map win, series prediction, Radiant vs Dire, etc.

## Core Model (Why This Is Stronger)

- **Primary**: Rating-difference logistic model calibrated on pro data. Convert DLTV ranking points, recent win rates and form into a single-map win probability. Far more stable than raw win-rate conversion for sparse samples.
- **Strengthened upgrade**: Optional Poisson (or Normal) model of expected kill difference / GPM difference drawn from team averages. Map the resulting lead distribution through an empirical logistic curve (gold or kill lead → win probability) for a second independent estimate. Average or use as sensitivity check.
- **Series**: Exact dynamic programming for Bo1–Bo5 score distributions treating maps as independent (standard practical approximation; real series have mild draft-adaptation dependence).
- **Side note**: Small Radiant advantage (patch-dependent, typically +0.5–2.5%) can be applied as a final adjustment when side is known or randomly assigned.
- Prefer the logistic + form model for most pre-match work. Use the Poisson-lead path when kill/GPM averages are reliable and you want a second view.

Typical calibrated range: even match map_p ≈ 0.48–0.53; clear favorite (large ranking + form gap) map_p ≈ 0.58–0.68. Extreme gaps rarely exceed 0.75 without roster collapse or patch mismatch.

## Step-by-Step Workflow (Follow Strictly)

### 1. Clarify the Query
- Exact teams (full or short names / orgs), series format (Bo1, Bo2, Bo3 most common, Bo5 for majors/TI), event/stage, date, current patch if known.
- Ask whether draft/veto is complete or heroes are known (post-draft analysis is higher value).
- Past match (validation / review) vs upcoming (prediction). Multiple matches → prioritize high-profile or user-specified.
- Note any known absences, stand-ins, or recent roster changes.

### 2. Locate Data Pages
- Rankings (primary strength signal): https://dltv.org/ranking or web_search `DLTV Dota 2 ranking`.
- Team pages: web_search `site:dotabuff.com/esports [team]` or `OpenDota [team]`, `STRATZ [team]`.
- Match / series page: Liquipedia (`site:liquipedia.net [team1] vs [team2]`), Dotabuff esports match, or tournament bracket pages.
- Recent form / H2H: team recent matches on Dotabuff or OpenDota; Liquipedia H2H section.
- Patch meta context when needed: Spectral Stats or STRATZ meta pages.

### 3. Extract Data with browse_page
Use the ready prompts in `references/data-extraction-prompts.md`.

- Ranking page → current points / rank for both teams.
- Each team page → recent win rate (last 20–40 games or 3 months), average duration, average kills / GPM / XPM if available, roster stability, notable absences.
- Match / Liquipedia page → series format, H2H history, previous results on current patch, odds if listed, draft notes.
- Customize extraction to focus on current patch window and relevant opponents.
- If data sparse (new roster, stand-ins, low sample) → shrink heavily toward 50% and state low confidence.

### 4. Estimate Inputs (see `references/strength-estimation.md`)
- Start from DLTV points difference or ranking gap → base rating_diff.
- Convert recent win-rate difference and form (last 5–10 series) into additive adjustment.
- Apply H2H, motivation (must-win, lower-bracket), roster continuity, patch fit tweaks (±0.02–0.05 typical on map_p).
- **When draft known**: manually adjust map_p by hero win-rate edges, known counters, or lane matchups (document the delta).
- Clamp extreme values (rarely outside 0.38–0.72). Always shrink toward 0.50 when samples < 10–12 recent games.
- For unknown draft: prepare base + optimistic + pessimistic scenarios or sensitivity range.

### 5. Run the Calculation Script
```bash
# Preferred — direct map win probability
python3 /home/workdir/.grok/skills/dota2-analyzer/scripts/calculate_dota2_probs.py \
  --map_p 0.58 --format bo3

# From rating difference (Elo-style logistic)
python3 ... --rating_diff 120 --format bo3

# Strengthened Poisson kill-lead path
python3 ... --kills_a 28.5 --kills_b 24.0 --format map --poisson_lead

# Series with different per-map probabilities (post-draft or scenarios)
python3 ... --map_ps "0.62,0.55,0.48" --format bo3

# Bo5 example
python3 ... --map_p 0.57 --format bo5 --n_sims 100000
```
- Always run sensitivity: ±0.03–0.05 on map_p and observe series win % movement.
- If maps/drafts unknown, present base + optimistic + pessimistic series win ranges.

### 6. Present Results Clearly
1. **Match context**: teams, format, event, patch, data timestamp, key extracted stats (ranking points, recent form, standout numbers).
2. **Estimated inputs**: map_p (or rating_diff / expected kill lead) with one-sentence justification; note any draft adjustments.
3. **Probability table** (from script):
   - Single-map win % for A / B (Radiant/Dire if relevant)
   - Series win % for A / B
   - Score distribution (2-0, 2-1, 1-2, 0-2 for Bo3; fuller for Bo5)
4. **Key insights**: biggest edges, upset potential, important maps or draft priorities if known.
5. **Market comparison** (if odds available): model vs implied probability, rough EV flags.
6. **Caveats & confidence**: sample sizes, roster uncertainty, unmodeled draft variance, High/Med/Low confidence.

### 7. Iteration & Extra Context
- Update live when draft completes, absences confirmed, or new form appears.
- For betting / Polymarket angle: after model probs, compare to sharp books or prediction-market prices; flag potential +EV.
- Back-test on finished matches when useful (estimate pre-match inputs from then-available data only).

## Important Rules & Limitations
- Analytical estimates only — not betting advice. User is responsible for decisions and local regulations.
- Dota 2 has extremely high variance (draft, individual performance, Roshan timing, buyback economy). Even a 65% series favorite loses often. Never treat model edge as certainty.
- Data quality varies sharply. Top teams have rich samples; mid/lower-tier or newly formed rosters require heavy shrinkage toward 50%.
- Draft is the single largest unmodeled factor pre-game. Post-draft estimates are meaningfully stronger.
- Script assumes map independence. Real series have sequential draft adaptation and psychological effects; effect is usually modest.
- Prefer the logistic + form path. Use Poisson-lead only as a cross-check or when kill/GPM data is high-quality.
- Always show sensitivity or a range when data is thin. State confidence level explicitly.

## Bundled Resources
- `scripts/calculate_dota2_probs.py` — core calculator (logistic / rating_diff, series DP, optional Poisson kill-lead path, score distributions).
- `references/data-extraction-prompts.md` — ready-to-use browse_page instructions for DLTV, Dotabuff, OpenDota, STRATZ, Liquipedia.
- `references/strength-estimation.md` — formulas, calibration notes, draft adjustment guidelines, limitations.

Load these via read_file when needed. Re-run the script whenever inputs change. This converts public Dota 2 data into transparent, defensible win probabilities.
