Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5955929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:11:03+00:00 2026-05-22T18:11:03+00:00

What will be the best approach to implement forward chaining and backward chaining for

  • 0

What will be the best approach to implement forward chaining and backward chaining for reasoning process in java?

We have been given Horn-form knowledge base which has set of statements.

I have tried to search on internet but I was unable to find any description regarding how to implement these sort of Artificial Intelligence concept into coding.

My understanding :

I have thought so far that I will read each sentence(Horn-Form) and create an object of it. Each Sentence class object will have relationship variables and when I will ask knowledge bases for Backward or Forward chain, It will check array of those objects and constructs my desired chain.

 public class Sentence{

    private String impliedBy;
    private String implementedVar;

    public Sentence(String sentence){
       String[] relation = sentence.split("=>");
       this.impliedBy = relation[0];
       this.implementedVar = relation[1];
    }
    ...
 }

Calling above class by saying…

Sentence s = new Sentence("a&b=>c");

Am I on right track of sorry I am noob for these sort of complicated programming and as per my prediction I might need lots of optimisation to run these sort of reasoning at very high level. But it seems like I need good understanding by someone thank you if some of you can help…

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T18:11:03+00:00Added an answer on May 22, 2026 at 6:11 pm

    I’d use a rules engine like Drools or JESS before I’d try writing this for myself.

    Unless your purpose is to learn how to write a Rete rules engine, in which case I’ll withdraw my answer. I’d go and look for Charles Forgy’s papers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What's the best approach/pattern I should use for the following? Have a C# UI
My application will have different strategies for my objects. What is the best way
I'm thinking how to implement the producer/consumer pattern in Java. Assume that I have
Which threading model is best for this scenario: I have a process can take
I wanted to ask you what is the best approach to implement a cache
With the best will in the world, whatever software you (and me) write will
What will the best way to pass a datatable data to unmanaged environments? (c++)
This question will expand on: Best way to open a socket in Python When
I got this question from my cousin: What will be the best way to
Okay, so this one may be difficult but I will do my best to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.