This Streamlit application is a simulator designed to analyze strategies for a tile-based multiplier game inspired by mechanics similar to those found on sites like death.fun.
It allows users to configure game parameters (specifically, a sequence of fixed cumulative multipliers) and simulate thousands of games for various strategies to determine Expected Value (EV), success rates, and analyze kill tile placement patterns.
- Configurable Game Parameters:
- Define a sequence of fixed cumulative multipliers achieved after successfully clearing each row.
- Set the number of simulations to run per strategy.
- Uses a predefined, repeating tile pattern for rows:
[7, 6, 5, 4, 3, 4, 5, 6, ...].
- Strategy Simulation: Simulates strategies based on cashing out after a specific number of successful rows.
- Detailed Results per Strategy:
- Expected Value (EV).
- Average Multiplier on successful cashout.
- Success Rate (probability of reaching the target and cashing out).
- Kill Rate (percentage of games ending in a kill for that strategy).
- Kill Position Analysis:
- For each row attempted within a strategy, view the frequency distribution of kill tile positions.
- Includes a bar chart visualization for kill frequencies per row.
- Overall Summary Table: Compares all simulated strategies by EV, target multiplier, success rate, and kill rate.
- Interactive UI: Built with Streamlit, featuring:
- A sidebar for configuration.
- Tabs for easy navigation between different strategy results.
- A dark theme for comfortable viewing.
- Reset to default settings button.
- Python 3.7+ installed.
pip(Python package installer).
-
Clone the Repository (or download the files): If this project is in a Git repository, clone it:
git clone <repository_url> cd <repository_directory>
Otherwise, ensure you have
app.pyandrequirements.txtin the same directory. -
Create a Virtual Environment (Recommended):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Dependencies: Navigate to the project directory in your terminal and run:
pip install -r requirements.txt
This will install Streamlit, Matplotlib, and NumPy.
- Make sure your virtual environment is activated (if you created one).
- Open your terminal in the project directory (where
app.pyis located). - Run the following command:
streamlit run app.py
- Streamlit will typically open the app automatically in your default web browser. If not, it will display a local URL (usually
http://localhost:8501) that you can open.
- Configure Parameters (Sidebar):
- Fixed Cumulative Multipliers: Enter a comma-separated list of the multipliers you achieve after successfully clearing 1 row, 2 rows, 3 rows, and so on (e.g.,
1.1, 1.32, 1.66, ...). The number of multipliers determines the maximum number of successful rows that strategies will be simulated for. - Simulations per Strategy: Set how many full games should be simulated for each defined strategy (e.g., for aiming for 1 success, 2 successes, etc.). Higher numbers give more statistically accurate results but take longer.
- The Tile Pattern (
[7, 6, 5, 4, 3, 4, 5, 6], repeating) is fixed and displayed for reference.
- Fixed Cumulative Multipliers: Enter a comma-separated list of the multipliers you achieve after successfully clearing 1 row, 2 rows, 3 rows, and so on (e.g.,
- Run Simulation: Click the "🚀 Run Simulation" button.
- View Results:
- A progress bar will show the simulation status.
- Once complete, results for each strategy (e.g., "1 Success", "2 Successes") will appear in separate tabs.
- Each tab displays key metrics: EV, Average Multiplier on Cashout, Success Rate, and Kill Rate.
- Within each tab, an expander titled "Kill Analysis Details" contains:
- A bar chart visualizing kill tile frequencies for each row attempted in that strategy.
- Strategies Summary Table: Below the tabs, a summary table compares all simulated strategies.
- Reset Defaults: Click "Reset Defaults" in the sidebar to restore the initial multiplier and simulation count settings.
app.py: The main Streamlit application script containing all the UI and simulation logic.requirements.txt: Lists the Python dependencies required to run the app.README.md: This file.
- Allow user to define the
TILE_PATTERN. - More advanced statistical analysis of kill patterns (e.g., checking for sequential biases).
- Option to export simulation data (e.g., raw kill logs) for external analysis.
Feel free to contribute or suggest improvements!