Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Monty Hall Game AI Agent Simulator

This project simulates the famous Monty Hall Problem using Python and adds an intelligent twist by introducing a strategy-aware AI agent. The simulation compares the effectiveness of two strategies: switching and not switching. A randomly selected guest plays the game, and the outcome is analyzed with both statistics and visuals.


What is the Monty Hall Problem?

The Monty Hall Problem is a probability puzzle based on a game show scenario:

  1. A player is shown 3 doors.
  2. Behind one door is a car (the prize), and behind the other two are goats.
  3. The player selects one door.
  4. The host (Monty) opens one of the other two doors, always revealing a goat.
  5. The player is given a choice: stick with the original door or switch to the remaining unopened door.

Mathematically, switching gives a ~66.7% chance to win, while sticking with the original door gives only ~33.3%.


💡 Project Features

  • ✅ Simulates the Monty Hall game logic over multiple trials
  • 🤖 Includes a guest AI agent that plays using the switching strategy
  • 🔁 Implements both switching and non-switching strategies
  • 📊 Calculates win percentage for both strategies
  • 👤 Randomly selects a guest to demonstrate the decision-making process
  • 📈 Displays results using a matplotlib bar chart
  • 💬 Provides a final result and a custom message based on whether the guest wins or loses

About

This Python project simulates the famous Monty Hall Problem, but with a twist — it introduces an AI-powered strategy decision layer and a random guest agent that adds realism and interactivity. The simulation evaluates both switching and non-switching strategies and determines how smart decision-making affects winning chances.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages