GithubHelp home page GithubHelp logo

alifiazahra12 / expert-system-shell Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mdkearns/expert-system-shell

0.0 0.0 0.0 6 KB

This is a rule-based logic system that uses forward- and backward-chaining algorithms to do two things: 1.) learn new rules and variable values based on those previously learned by the system, and 2.) explain its reasoning back to the user.

Python 100.00%

expert-system-shell's Introduction

Halal-Bot Is Smarter Than You!

Authors: Matthew Kearns and Ahmed Youssef.


Brief Explanation:

This is a simple expert system that learns information to answer questions
about its behavior. It uses forward-chaining to learn new rules given 
user-supplied rules and variables (either root or learned), and it uses 
backward-chaining to create explanations for its behavior given the values 
of the variables in the system and the learned rules.

The difference between a root variable and a learned variable:

A root variable is a variable whose truth value is known by the
user, and the user can set its value to either true or false. The
truth value of a learned variable, however, depends on the rules of
the system and the values of the root variables that it depends on.


Usage Instructions:

	1. Teach [-R/-L] Var = String
	
		Teaches the system the type and value of a variable.
		
	2. Teach Var = [True/False]
	
		Teaches the system the truth value of the variable.
		
	3. Teach Expression -> Var
	
		Teaches the system a new rule.
		
	4. List
	
		Lists the values of all root and learned variables, and
		lists all of the current rules and learned rules in the
		system.
		
	5. Learn
	
		Creates new rules based on rules already supplied in the system
		and updates the truth values of the variables based on the rules.
		
	6. Query Expression
	
		Query returns the truth value of the expression based on all of 
		the current rules and variables in the system.
		
	7. Why Expression
	
		Why gives an explanation of why the user-supplied expression is true
		or false given the current rules and variable values held by the
		system.
		
	Key:
	
	-R = root variable
	-L = learned variable
	Var = user-defined variable name
	String = A string of the form "Today is Monday" or "Matt likes ice cream"
	Expression = Any valid expression of the form A&B->C or (!((A|B))&C)->D

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.