Skip to content

muhammad-shozab/shadow-detective

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔍 Shadow Detective - AI Murder Mystery Game

An interactive detective game where you investigate a murder case against an AI-powered killer that uses advanced algorithms to deceive you!

image image image image

🎮 About

This is an AI-powered murder mystery game built for an Introduction to Artificial Intelligence course. The game features an intelligent adversary that uses:

  • Minimax Algorithm - For optimal deception strategies
  • A Pathfinding* - To generate believable fake alibis
  • Constraint Satisfaction - To maintain story consistency
  • Probability Scoring - For risk-based decisions

🛠️ Technologies Used

  • Backend: Python 3, Flask
  • Frontend: HTML5, CSS3, JavaScript
  • Styling: Tailwind CSS

📋 Prerequisites

Before you begin, make sure you have installed:

  • Python 3.8 or higher (Download here)
  • pip (comes with Python)
  • Git (optional, for cloning)

🚀 Installation & Setup

Step 1: Download the Project

  • Click the green "Code" button on GitHub
  • Click "Download ZIP"
  • Extract the ZIP file
  • Open terminal/command prompt in that folder

Step 2: Create Virtual Environment

On Windows:

python -m venv venv
venv\Scripts\activate

On Mac/Linux:

python3 -m venv venv
source venv/bin/activate

You should see (venv) appear in your terminal.

Step 3: Install Dependencies

pip install -r requirements.txt

🎮 Running the Game

  1. Make sure your virtual environment is activated (you should see (venv) in terminal)

  2. Run the Flask server:

python app.py
  1. Open your browser and go to:
http://127.0.0.1:5000
  1. Click "BEGIN INVESTIGATION" and start playing!

🎯 How to Play

  1. Read the Case File: Review the victim, location, time, and weapon
  2. Interrogate Suspects: Ask about their alibi, other suspects, the weapon, or victim
  3. Search Locations: Look for physical evidence in different rooms
  4. Find Contradictions: The AI might slip up and contradict itself
  5. Make Your Accusation: When you're confident, accuse the killer!

⚠️ Warning: You only get ONE accusation. Choose wisely!

📊 Game Mechanics

  • 5 Days to solve the case
  • 5 Actions per day (interrogations, searches)
  • AI Threat Level increases as you close in
  • Suspicion Meter for each suspect
  • Evidence Board to track clues

🎓 Educational Purpose

This project demonstrates key AI concepts:

  • Game theory and adversarial search
  • Pathfinding algorithms
  • Constraint satisfaction problems
  • Probabilistic reasoning

🐛 Troubleshooting

Problem: "python is not recognized"

  • Make sure Python is installed and added to PATH
  • Try py instead of python

Problem: "Module not found"

  • Make sure virtual environment is activated
  • Run pip install -r requirements.txt again

Problem: Port already in use

  • Change port in app.py: app.run(debug=True, port=5001)

📝 License

This project is open source and available under the MIT License.

👤 Author

Muhammad Shozab - @muhammad-shozab

🙏 Acknowledgments

  • Course: Introduction to Artificial Intelligence
  • Inspired by classic murder mystery games like Clue

Happy Investigating, Detective! 🔍

About

AI-powered murder mystery detective game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors