A terminal match analyzer for Valorant. It scores a set of matches on combat and utility,
ranks them with a hand-written heapsort, and renders the top five in a rich table.
Note: the data source is currently mocked.
analyzer/api_client.pygenerates synthetic matches rather than calling a live endpoint, so the tool runs standalone with nothing to configure. The docstring onfetch_recent_matchesshows what the real request looks like. The client returns raw stats only; scoring, sorting and rendering all happen downstream of it, so a live client only has to produce the same fields.
- Impact score over raw K/D.
analyzer/scoring.pyranks a match by(kills + assists + smokes / 4) / deaths, so a 20/18/12 game does not outrank a 16/6/9 one just on kill count, and a smoke counts a quarter of a kill or assist. - Heapsort, written out.
analyzer/algorithms.pyimplementsheapifyandheapsort_matchesdirectly rather than callingsorted(). It builds a min-heap over a copy of the match list, keyed on any field, and repeatedly swaps the smallest remaining match behind the heap. The list comes out highest first with no reversal pass: O(n log n) worst case, and no allocation beyond the copy. - Agent-specific columns. The table surfaces utility usage (smokes deployed) alongside combat stats, since for a controller main that is the number that actually reflects the round.
git clone https://github.com/apollo-2006/valo_scout.git
cd valo_scout
pip install -r requirements.txt
python main.pyOutput is a five-row table of peak-impact matches: map, K/D/A, KDA ratio, smokes deployed, and the computed impact score.
The tests check the heapsort against sorted() across every small size and with
frequent ties, and pin down the scoring rules:
python -m unittestmain.py entry point, theme, table rendering
analyzer/api_client.py match retrieval (currently synthetic), raw stats only
analyzer/scoring.py KDA ratio and impact score
analyzer/algorithms.py heapify + heapsort over match dicts
tests/ heapsort and scoring tests
MIT. See LICENSE.
Abir Deol · abirdeol.tech