Giter Site home page Giter Site logo

backwardchaining's Introduction

BackwardChaining

** The executable (BackwardChaining.class) file should already be included in the submission, so Step 2 is optional. In case there are any issues, the entire project can be re-compiled and executable regenerated. Please compile this program with Java 1.8.

  1. In command prompt, navigate to folder containing source files. cd code

  2. Compile all .java files. javac *.

  3. Run the main class. java BackwardChaining

    Some sample data is included, named "data1.txt", "data2.txt", and "data3.txt". The file should contain the data to be evaluated. The first line is expected to be the query, while the rest of the file are the rules in the knowledge base (read line-by-line).

  4. Output is printed to console and can be inspected.

    You can first see that the program derives the rules given in the sample data and prints them. It will then display the ultimate goal (first query) to prove, which was the first line in the file. As the program evaluates each subgoal, the following diagnostics are printed: the list of goals, the current goal being evaluated, whether or not the current goal has been found as a conclusion/head within a clause/body in the KB, and goals visited so far.

    Finally, if the result of proving the ultimate goal is successful, it will print TRUE and the order of entailments to reach the query. If the result is unsuccessful, it will print FALSE.

backwardchaining's People

Contributors

naauuz avatar

Watchers

 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.