This repository contains Python programs for logical reasoning and inference using propositional logic. It includes a custom logic engine implemented in logic.py and two example problems: harry.py and murder_mystery.py.
logic.py: A Python module defining logical operations and model evaluation functions.harry.py: A logic puzzle involving characters from the Harry Potter universe.murder_mystery.py: A Clue-style murder mystery solver using logical inference.
Ensure you have Python 3 installed. Additionally, install the termcolor(optional) package for colored output:
pip install termcolorRun the example scripts using:
python harry.py
python murder_mystery.pyEach script will output logical deductions based on the provided knowledge base.