An interactive detective game where you investigate a murder case against an AI-powered killer that uses advanced algorithms to deceive you!
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
- Backend: Python 3, Flask
- Frontend: HTML5, CSS3, JavaScript
- Styling: Tailwind CSS
Before you begin, make sure you have installed:
- Python 3.8 or higher (Download here)
- pip (comes with Python)
- Git (optional, for cloning)
- Click the green "Code" button on GitHub
- Click "Download ZIP"
- Extract the ZIP file
- Open terminal/command prompt in that folder
On Windows:
python -m venv venv
venv\Scripts\activateOn Mac/Linux:
python3 -m venv venv
source venv/bin/activateYou should see (venv) appear in your terminal.
pip install -r requirements.txt-
Make sure your virtual environment is activated (you should see
(venv)in terminal) -
Run the Flask server:
python app.py- Open your browser and go to:
http://127.0.0.1:5000
- Click "BEGIN INVESTIGATION" and start playing!
- Read the Case File: Review the victim, location, time, and weapon
- Interrogate Suspects: Ask about their alibi, other suspects, the weapon, or victim
- Search Locations: Look for physical evidence in different rooms
- Find Contradictions: The AI might slip up and contradict itself
- Make Your Accusation: When you're confident, accuse the killer!
- 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
This project demonstrates key AI concepts:
- Game theory and adversarial search
- Pathfinding algorithms
- Constraint satisfaction problems
- Probabilistic reasoning
Problem: "python is not recognized"
- Make sure Python is installed and added to PATH
- Try
pyinstead ofpython
Problem: "Module not found"
- Make sure virtual environment is activated
- Run
pip install -r requirements.txtagain
Problem: Port already in use
- Change port in
app.py:app.run(debug=True, port=5001)
This project is open source and available under the MIT License.
Muhammad Shozab - @muhammad-shozab
- Course: Introduction to Artificial Intelligence
- Inspired by classic murder mystery games like Clue
Happy Investigating, Detective! 🔍