The Mystery Solver application utilizes Bayesian networks to assist users in solving fictional mystery scenarios. Developed as a web application with Django, the project includes a Bayesian inference model designed to evaluate and process clues and evidence provided by users.
Key features of the application include:
- Bayesian Inference Model: A robust Bayesian network engine that calculates the probabilities of guilty suspects based on the provided evidence.
- Web Application Interface: Built with Django, the web app allows users to input clues and evidence seamlessly. Database Integration: Mysterious data and user inputs are securely stored and managed within the web app's database.
- Real-time Inference: Users receive immediate feedback on the likelihood of each suspect being the murderer based on their inputs.
This project provides an engaging platform for users to test their deductive reasoning and analytical skills through interactive mystery-solving.
-
Install Python. The project was built with python 3.11. All the installed libraries for the project are aligned with this version.
-
Get the code for the project. Use git clone or download the zip file of the code from GitHub.
-
Open the terminal or command prompt in the code directory and create a Python virtual environment in the code directory.
python -m venv .venv
- Activate the Virtual Environment now in the terminal or command prompt by running:
.venv\Scripts\activate
- Now install all the dependencies to run the project.
pip install -r requirements.txt
All the dependencies will now be installed. Please don't close the terminal or command prompt for future usage.
-
To run the model file, open the code directory in VSCode. Open the bayesian_model_final.ipynb file. Select the virtual environment you created to run the file with. Install the Jupyter Notebook extension in VSCode if you don't have it installed.
-
To run the Web app, go to the terminal or command prompt where the virtual environment is active. Change the directory now to mystery_solver_webapp
cd mystery_solver_webapp
- Run the following commands in the terminal or command prompt to start the Django server
python manage.py runserver
- When the server starts, you will see a link in the terminal or command prompt of this type: "http://127.0.0.1:8000.". Copy and paste that into your browser to see the web app running.