Skip to content

This project uses Survivor data from True Dork Times to simulate the entire game, including tribal councils, alliances, vote-outs, and challenges. The goal is to let fans explore different outcomes, make fantasy picks, and predict winners for fun while celebrating Survivor strategy and gameplay!

Notifications You must be signed in to change notification settings

kianils/SurvivorSimulator

Repository files navigation

Survivor Simulator 🏝️

A comprehensive Survivor game simulator that uses real data from True Dork Times to simulate entire seasons, including tribal councils, alliances, vote-outs, and challenges. The goal is to let fans explore different outcomes, make fantasy picks, and predict winners while celebrating Survivor strategy and gameplay!

Features

  • Data Fetching: Automatically fetches player data from True Dork Times for any season
  • Player Initialization: Processes Excel data to create players with realistic stats (challenge skill, intelligence, social skill, luck, morale)
  • Tribe Management: Organize players into tribes with dynamic stats tracking
  • Alliance System: Form and manage alliances based on social graphs and player relationships
  • Challenge System: Run tribal and individual immunity challenges with realistic outcomes
  • Tribal Councils: Simulate voting with strategic decision-making based on alliances and player attributes
  • Machine Learning: Educational ML models (Perceptron and MLP) for predicting game outcomes
  • Web Interface: Beautiful Flask-based web app to interact with the simulator
  • Full Game Simulation: Run complete season simulations from start to finish

Installation

  1. Clone the repository
  2. Create a virtual environment:
    python -m venv myenv
    source myenv/bin/activate  # On Windows: myenv\Scripts\activate
  3. Install dependencies:
    pip install -r requirements.txt

Usage

Running the Web Application

python app.py

Then navigate to http://localhost:5000 in your browser.

Running Simulations Programmatically

from game_engine import run_simulation

# Run a full simulation for season 32
results = run_simulation(season_number=32, num_tribes=2, max_rounds=20)
print(results)

Project Structure

SurvivorSimulator/
├── app.py                      # Flask web application
├── game_engine.py              # Main game simulation engine
├── game_mechanics.py           # Core game mechanics (challenges, voting)
├── alliance_sim.py             # Alliance formation algorithms
├── ml_models.py                # Machine learning models
├── initializePlayers.py        # Player initialization from Excel
├── SurvivorData.py             # Data fetching from True Dork Times
├── utils.py                    # Utility functions
├── class_Definitions/
│   ├── playerClass.py          # Player class definition
│   ├── tribeClass.py           # Tribe class definition
│   └── allianceClass.py        # Alliance class definition
├── templates/                  # Flask HTML templates
│   ├── index.html
│   ├── initializePlayer.html
│   ├── tribeSorter.html
│   └── simulation.html
├── jsonData/                   # JSON data storage
├── excel_data/                 # Excel files from True Dork Times
└── requirements.txt            # Python dependencies

How It Works

  1. Data Collection: Fetches season data from True Dork Times and processes it into player stats
  2. Tribe Formation: Players are randomly divided into tribes
  3. Alliance Formation: Alliances are formed based on social graphs and player compatibility
  4. Game Simulation:
    • Challenges determine immunity winners
    • Tribal councils determine who gets voted out
    • Player stats (morale, votes received) update dynamically
  5. Machine Learning: ML models can predict vote-out risk and game outcomes

API Endpoints

  • GET / - Homepage
  • POST /process_season - Process a season number and initialize players
  • GET /tribe_sorter/<season_number> - Tribe sorting interface
  • GET /simulate/<season_number> - Simulation interface
  • GET /api/simulate/<season_number> - Run full simulation (JSON API)
  • GET /api/simulate_round/<season_number> - Run single round (JSON API)

Machine Learning Models

The project includes educational implementations of:

  • Perceptron: Single-layer neural network for binary classification
  • MLP (Multi-Layer Perceptron): Deep neural network with hidden layers
  • SurvivorPredictor: High-level interface for predicting game outcomes

Contributing

Feel free to contribute by adding new features, improving the simulation logic, or enhancing the ML models!

License

This project is for educational and entertainment purposes.

About

This project uses Survivor data from True Dork Times to simulate the entire game, including tribal councils, alliances, vote-outs, and challenges. The goal is to let fans explore different outcomes, make fantasy picks, and predict winners for fun while celebrating Survivor strategy and gameplay!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published