Implementation of an AI agent performing belief revision (using belief base entrenchment contraction and expansion)
- Create virtual environment using python 3.12:
python -m venv .venv
(for windows:python -m venv C:\path\to\venv
) - Active the environment:
source ./.venv/bin/activate
(for windows:.\.venv\Scripts\activate.ps1
) - Install requirements:
pip install -r requirements.txt
To run the application use: python main.py
.
The Belief-Revision-Agent supports the following operations:
- Add a new discovery to the belief base - expansion BB + φ
- Remove a statement from the belief base - contraction BB ÷ φ
- Update the belief base with a reliable statement - revision BB * φ
- Check if a statement is consistent with the belief base - entailment BB ⊨ φ
- Run the AGM postulates
- Query the state of the belief base BB
Example of how to run a simple revision:
Select option to continue...1
§ Enter discovery to expand -> p
<> Belief base expanded with p
Select option to continue...1
§ Enter discovery to expand -> q
<> Belief base expanded with q
Select option to continue...1
§ Enter discovery to expand -> r
<> Belief base expanded with r
Select option to continue...3
§ Enter reliable statement to revise -> ~(q | r)
<> Belief base revised with ~(q | r)
Select option to continue...6
BeliefBase|
Belief| p
Belief| ~(q | r)