Git Product home page Git Product logo

expert_system's Introduction

Expert System

École 42 assignment - an expert system for propositional calculus using backward-chaining algorithm

About the project

  • This is a group project of École 42.
  • My teammate is keatchut.
  • The objective of this project is to create a program that can take logical statements, their initial value and use backward chaining algorithm to find the value of the queried facts.

System Requirements

  • Compiler that support C++17
  • CMake 3.10+
  • Boost library 1.68+

Installation

Requirements

  • MacOS
    brew install cmake
    brew install boost
    
  • Ubuntu 18.04
    sudo apt update
    sudo apt install cmake
    sudo apt install libboost-all-dev
    

Expert System

mkdir build
cd build
cmake ..
cmake -build .
cd ..

The executable will be at bin/expert_system.

Usage

To run in normal mode

./bin/expert_system [filename]

Options

Shorthand Full Mode Description
-h --help show help message
-f --facts interactive facts mode user can change initial facts without having to rerun the program
-q --query interactive query mode user can change query without having to rerun the program
-v --visualisation reasoning visualisation mode display step-by-step backward chaining reasoning process
-d --debug debug mode display all values after evaluation
-c --color color mode display with color
-p --print print mode print input file

Input

Below is an example of an input.

A + B => C
C => D

=AB

?D

The input are seperated into 3 sequential parts:

  • rules

    Format: condition => conclusion.

    A condition contains one or more facts and operators on the list below (ordered by priority of execution).

    • NOT !
    • AND +
    • OR |
    • XOR ^

    A conclusion has one or more facts and can have only operator AND +

  • initial facts

    Format: =[facts]

    All fact values are default to FALSE. The initial facts declaration will change the fact values to TRUE.

  • query

    Format: ?[facts] The program will do backward chaining on the facts and print the result.

expert_system's People

Contributors

keatchut avatar terngkub avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.