Skip to content

bloomer1/InfrenceEngine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Infrence Engine using Backward Chaining

The engine accepts knowledge in terms of FOL(First order Logic) sentences having up to two arguments.The KB(knowlede base) is all the sentences put together. Then you can ask a question to the engine, if the question is answerable given the knwoledge then engine will give the ouptput as TRUE or FALSE, accordingly.

To Run the program use following I/O format

Input: 1st line consists of the question to be asked in terms of FOL. Followed by the no of senteneces (n) the KB needs to have. Then n sentences in the form of FOL follow. Output: Consist of single line stating answer is True or False.

eg: Input: Diagnosis(John,Infected) 6 Works(x,Aidagency)&HasTraveled(x,Timbuktu)=>Diagnosis(x,Infected) Diagnosis(x,Fever)=>HasSymptom(John,Fever) HasSymptom(x,Fever)&HasTraveled(x,Timbuktu)=>Works(Alice,Aidagency) Works(John,Aidagency) Diagnosis(John,Fever) HasTraveled(John,Timbuktu)

Output: TRUE

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages