This project analyzes Flesh and Blood hero matchup data and calculates the Nash equilibrium for the metagame.
- meta.csv - Original matchup data
- win_rate_matrix.csv - Win rate matrix for all hero matchups
- win_rate_report.txt - Detailed report of win rates
- nash_equilibrium.csv - Nash equilibrium probabilities for each hero
- nash_equilibrium.txt - Detailed Nash equilibrium report
- wr_vs_nash_equilibrium.csv - Each hero's win rate against Nash equilibrium
- wr_vs_nash_equilibrium.txt - Detailed report of win rates vs Nash
- hero_selector_usage.py - Standalone Python script for hero selection
- index.html - Interactive web-based hero wheel selector
# Install dependencies
uv sync
# Run the analysis
python main.pyThis will generate all the CSV and TXT reports plus the Nash equilibrium calculations.
- Open
index.htmlin your web browser - Click the wheel or the "SPIN" button to randomly select a hero
- Heroes are selected with probability equal to their Nash equilibrium representation
Note: You need to serve the files via a local web server for the CSV to load properly. You can use:
# Python 3
python -m http.server 8000
# Then open http://localhost:8000 in your browserpython hero_selector_usage.pyIn game theory, a Nash equilibrium is a strategy where no player can improve their expected outcome by unilaterally changing their strategy. In the context of Flesh and Blood:
- The Nash equilibrium shows the optimal distribution of hero choices
- At equilibrium, all heroes in the optimal mix should have approximately equal win rates
- Playing according to Nash equilibrium maximizes your expected win rate against optimal opponents
- High percentage heroes in the Nash equilibrium are strong in the current metagame
- Win rate vs Nash shows how each hero performs against optimal play
- Heroes with positive advantage perform well against the meta
- Heroes with negative advantage perform poorly against the meta
- Python 3.11+
- pandas
- numpy
- scipy
MIT