https://github.com/mboy29/expertsystem_42
Expert system in proposal calculation that can reason on a set of rules and initial facts to deduce other facts.
https://github.com/mboy29/expertsystem_42
42 expert-system propositional-calculus python
Last synced: over 1 year ago
JSON representation
Expert system in proposal calculation that can reason on a set of rules and initial facts to deduce other facts.
- Host: GitHub
- URL: https://github.com/mboy29/expertsystem_42
- Owner: mboy29
- Created: 2024-10-18T08:48:18.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-10T16:28:32.000Z (over 1 year ago)
- Last Synced: 2025-01-11T05:17:49.979Z (over 1 year ago)
- Topics: 42, expert-system, propositional-calculus, python
- Language: Python
- Homepage:
- Size: 113 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# EXPERT SYSTEM
Validated at 125%
The goal of this project is to make a propositional calculus expert system by implementing a backward-chaining inference engine.
## Usage
### Virtualenv
First of all, setup virtualenv using the following command:
```sh
source ./setup.sh
```
The script will automatically install all dependencies listed in the requirements.txt file. You can also deactivate the virtualenv by executing the script as so :
```sh
source ./setup.sh --deactivate
```
### Expert system
To execute the main program, execute the following script
```sh
python3 -B main.py [-v] [-h] file
```
Where:
- `file` is the path to the input file to read and parse from.
- `-v` or `--verbose` to enables verbose mode (outputs details information on the logic)
- `-h` or `--help` do display a help message concerning the usage of the script
### Unit testing
To perform unit tests on the privously mentioned programe:
```sh
python3 -B test.py
```
Where:
- `-v` or `--valid` to perfom tests only on valid cases
- `-i` or `--invalid` to perfom tests only on error cases
- `-h` or `--help` do display a help message concerning the usage of the script
By default the program runs both valid and error cases.