Git Product home page Git Product logo

expert-system's Introduction

Expert-System

An expert system for propositional calculus.

The program accepts one parameter, which is the input file. It will contain a list of rules, a list of initial facts and a list of queries. For each of these queries, the program will tell if the fact is true, false, or undetermined.

Symbols

The following symbols are defined, in order of decreasing priority:

  • '(' and ')' work like normal parentheses . Example : A + (B | C) => D

  • '!' means NOT. Example : !B

  • '+' means AND. Example : A + B

  • '|' means OR. Example : A | B

  • 'ห†' means XOR. Example : A ห† B

  • '=>' means "implies". Example : A + B => C

  • '<=>' means "if and only if". Example : A + B <=> C

  • '?' stands for the query

  • '=' stands for the initial fact

  • '#' opens a commentary

Example

C => E # C implies E

A + B + C => D # A and B and C implies D

A | B => C # A or B implies C

A + !B => F # A and not B implies F

C | !G => H # C or not G implies H

V ^ W => X # V xor W implies X

A + B => Y + Z # A and B implies Y and Z

C | D => X | V # C or D implies X or V

E + F => !V # E and F implies not V

A + B <=> C # A and B if and only if C

A + B <=> !C # A and B if and only if not C

=ABG # Initial facts : A, B and G are true. All others are false.

?GVX # Queries : What are G, V and X ?

expert-system's People

Contributors

gdannay avatar

Watchers

James Cloos avatar

Forkers

fagan2888

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.