Skip to content

PunksB1602/Rock_Paper_Scissors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rock-Paper-Scissors Multi-Agent Simulation

This project simulates a closed environment where multiple Rock-Paper-Scissors agents with different AI strategies compete, learn, and evolve over time. The simulation visualizes agent movements, interactions, and strategy adaptations using Pygame, while tracking wins, energy levels, and providing detailed statistics and plots.


Features

  • Diverse Agent Types:

    • RandomAgent: Chooses moves randomly.
    • QLearnAgent: Uses Q-learning to adapt based on opponents' previous moves.
    • PredictiveAgent: Analyzes opponents’ move patterns to predict and counter.
    • GeneticAgent: Employs genetic algorithms to evolve strategy probabilities over generations.
  • Energy & Survival: Agents have energy levels that increase on wins and decrease on losses or draws, simulating stamina and survival dynamics.

  • Visual Simulation: Real-time visualization of agents moving and interacting in a 2D environment, showing their current moves with icons or colors.

  • Leaderboard: Displays the top agents by wins and energy in a sidebar for easy tracking during simulation.

  • Recording: Optionally record the entire simulation as a GIF.

  • Customizable Settings: Configure agent counts, simulation duration, screen size, FPS, and agent-specific parameters via command-line prompts.

  • Post-Simulation Analysis: Generates plots for wins and move frequencies for deeper insights.


Installation

  1. Clone the repository:

    git clone https://github.com/PunksB1602/Rock_Paper_Scissors.git
    cd Rock_Paper_Scissors
    
  2. Install dependencies:

    pip install -r requirements.txt
    

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages