Skip to content

DotaAnalyst: Show the analyst where deaths came from and what they cost - #37

Merged
coreymaher merged 2 commits into
masterfrom
dota-analyst-deaths-log
Sep 25, 2026
Merged

coreymaher merged 2 commits into
masterfrom
dota-analyst-deaths-log

Conversation

@coreymaher

@coreymaher coreymaher commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

Picks up two fields OpenDota started emitting in September:

Non-hero killers are named with the same buckets damageTaken already uses (towers, creeps, neutrals, roshan), now shared through one unitBucket, so the analyst reads one vocabulary for what hurt the player and what killed them.

Gold lost is only sent when nonzero. Turbo has no death gold loss, so Turbo matches never carry it; an Ability Draft match checked against its own gold_reasons matched exactly.

networth_t and the first-blood victim_player_slot were left out: the first duplicates gold_t closely enough not to earn the tokens, and the processor already resolves the first-blood victim from the objective's key.

Adds ~400 tokens (2.4%) to a 31-minute Turbo match's prompt.

Testing

  • npm run typecheck, cdk synth and scripts/load-test-bundles.sh pass
  • Old and new prompts for match 9013325936 differ only in the added fields and prompt lines
  • damageTaken is identical to master on that match after the unitBucket refactor
  • A match with deaths_log stripped, as parsed before OpenDota emitted it, produces none of the new fields or log lines
  • A/B on that match with gemini-3.8-flash, one call per side, focus player on Disruptor (Turbo, position 5):
    • The new analysis turned the non-hero deaths into a weakness and a recommendation, with the right times: "falling to enemy creeps at 14:03 and to Roshan at 25:20", and "monitor your health and aggro closely near objectives". The old one had no way to see either death.
    • Neither side leaked a raw field name or invented a stat; the gold swing, barracks, ward count and percentile each check out against the match.
    • It did not use time spent dead, though Disruptor's 208s was well below both enemy laners' (Pudge 349s, Earthshaker 329s), nor the five smoke kills. Both are in the data for the analyst to cite when they stand out.
    • The prompt grew by 423 tokens (22,436 to 22,859); output ran longer on this call (1,503 to 2,092 tokens, reasoning included).

🤖 Generated with Claude Code

The analyst saw only a death count, and the event log carried only deaths to
heroes, so a player diving a tower or dying to Roshan was invisible. It now
gets time spent dead for every player, the focus player's deaths with their
killer and gold lost, and non-hero deaths in the log.

Kills made under Smoke of Deceit are now marked, so it can tell a planned gank
from a chance pickoff.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coreymaher
coreymaher force-pushed the dota-analyst-deaths-log branch from a1e5e98 to 5917138 Compare September 24, 2026 08:34
…prompt

Killers and damage sources now share one classification, so the analyst reads
the same words for what hurt the player and what killed them, and the two
cannot drift apart. The death guidance moves into the damage analysis it
overlapped with.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coreymaher
coreymaher marked this pull request as ready for review September 25, 2026 07:18
@coreymaher
coreymaher merged commit cfc4c95 into master Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant