How xanetic/dota-lastpick works
Guess the Last Pick is a Dota 2 draft-guessing game: players inspect a professional match with its final pick hidden, use optional hints, and choose a hero. Casual play runs in the browser; the backend adds ranked accounts, leaderboards, build guessing, and multiplayer. Supporting data pipelines collect match and player statistics and derive draft signals used by the reasoning engine. The main workflow and product capabilities are documented, but frontend source excerpts were not provided, so internal UI-to-data wiring is not asserted.
Main entry points: app.py Backend API · analyze.py Draft analyzer · hero_attributes.json Draft signal tables · attributes_bootstrap.py Hero attributes
Components 18
Browser game
- Game interface
app.js - Game API client
api.js - Localization
i18n.js
Ranked and multiplayer
- Backend API
server/app.py - Account database
data/game.db
Draft reasoning
- Draft analyzer
server/analyze.py
Game data
- Match and hero data
data/matches.json - Build and item data
data/builds.json - Draft signal tables
data/hero_attributes.json - Player and role data
data/players.json
Data pipelines
- Match collection
fetch_data.py - Draft corpus collection
fetch_explorer.py - Hero attributes
attributes_bootstrap.py - Player positions
build_playerstats.py - Draft interactions
build_interactions.py - Build collection
build_builds.py
Other components
- Player
- OpenDota
Connections 17
- Player → Game interface: plays
README.md - Player → Backend API: uses ranked features
- Game interface → Game API client: uses API client
- Backend API → Draft analyzer: analyzes drafts
server/app.py - Backend API → Account database: reads users
server/app.py - Match collection → OpenDota: fetches matches
fetch_data.py - Draft corpus collection → OpenDota: queries drafts
fetch_explorer.py - Hero attributes → OpenDota: fetches statistics
attributes_bootstrap.py - Player positions → OpenDota: queries player data
build_playerstats.py - Draft interactions → Draft corpus collection: reads corpus
build_interactions.py - Build collection → Match and hero data: reads matches
build_builds.py - Build collection → OpenDota: queries inventories
build_builds.py - Hero attributes → Draft signal tables: writes attributes
attributes_bootstrap.py - Player positions → Player and role data: writes player data
build_playerstats.py - Draft interactions → Draft signal tables: writes signals
build_interactions.py - Draft analyzer → Draft signal tables: uses draft signals
- Draft analyzer → Player and role data: uses player roles