Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

Forward Chaining: Fundamentals and Applications
Forward Chaining: Fundamentals and Applications
Forward Chaining: Fundamentals and Applications
Ebook113 pages1 hour

Forward Chaining: Fundamentals and Applications

Rating: 0 out of 5 stars

()

Read preview

About this ebook

What Is Forward Chaining


When employing an inference engine, one of the two primary methods of reasoning is called forward chaining. Forward chaining can be logically stated as the repeated application of the modus ponens argument. The implementation method known as forward chaining is quite common for use in expert systems, as well as in business and production rule systems. Backward chaining is the antonym of forward chaining in this context.


How You Will Benefit


(I) Insights, and validations about the following topics:


Chapter 1: Forward Chaining


Chapter 2: Production System in Computer Science


Chapter 3: Expert System


Chapter 4: Inference Engine


Chapter 5: Rete Algorithm


Chapter 6: Backward Chaining


Chapter 7: Rule-Based Systems


Chapter 8: Pattern Matching


Chapter 9: Artificial Intelligence


Chapter 10: Opportunistic Reasoning


(II) Answering the public top questions about forward chaining.


(III) Real world examples for the usage of forward chaining in many fields.


(IV) 17 appendices to explain, briefly, 266 emerging technologies in each industry to have 360-degree full understanding of forward chaining' technologies.


Who This Book Is For


Professionals, undergraduate and graduate students, enthusiasts, hobbyists, and those who want to go beyond basic knowledge or information for any kind of forward chaining.

LanguageEnglish
Release dateJun 29, 2023
Forward Chaining: Fundamentals and Applications

Read more from Fouad Sabry

Related to Forward Chaining

Titles in the series (100)

View More

Related ebooks

Intelligence (AI) & Semantics For You

View More

Related articles

Reviews for Forward Chaining

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Forward Chaining - Fouad Sabry

    Chapter 1: Forward chaining

    When employing an inference engine, one of the two primary types of reasoning is called forward chaining, which is also known as forward reasoning. Forward reasoning may be logically stated as the repetitive application of modus ponens. The implementation method known as forward chaining is very common for use in expert systems, as well as in business and production rule systems. Chaining in the reverse direction is referred to as backward chaining.

    In forward chaining, one begins with the data that is already accessible and then applies inference rules to gather further data (for example, from an end user) until one reaches their objective. An inference engine that uses forward chaining will search through all of the inference rules until it locates one in which the antecedent (the sentence that begins with If) is known to be accurate. When such a rule is discovered, the engine is able to draw the conclusion, also known as the inference, that the consequent (Then clause) is true. This results in the engine adding new information to its data.

    Iterating through this process using inference engines will continue until a goal is achieved.

    Let's say that the objective is to determine the color of a pet called Fritz, given the information that he croaks and eats flies, and that the rule set consists of the four rules listed below:

    If thing X eats flies and thing x croaks, then thing x is a frog.

    If X is a bird that both chirps and sings, then X is a canary.

    If X is a frog, then it is a given that X is green.

    If X is a canary, then it follows that X is a blue bird.

    Let's go through an example of forward chaining by following the pattern that a computer makes while it's evaluating the rules. Take into account the items listed below:

    Fritz croaks

    Fritz eats flies

    The inference engine may, via the use of forward reasoning, determine, through a sequence of stages, that Fritz is a green color:

    1. Because the initial facts suggest that Fritz croaks and Fritz eats flies, the antecedent of rule #1 is met when the word Fritz is substituted for X, and the inference engine arrives at the following conclusion::

    Fritz is a frog

    2. The antecedent of rule #3 is thus met by replacing X with Fritz, and the inference engine comes to the conclusion that:

    Fritz is green

    As opposed to backward chaining, which operates in the other direction, forward chaining gets its name from the fact that the inference engine begins with the data and then argues its way to the solution. Backward chaining does things in the opposite order. In contrast to the order in which they are used in backward chaining, the rules are utilized in an entirely different order in the derivation. In this particular illustration, criteria #2 and #4 were disregarded in order to arrive at the conclusion that Fritz is green.

    The phrase data-driven refers to this approach as opposed to goal-driven backward chaining inference, which gets its name from the fact that the rules that are picked and applied are determined by the data. The forward chaining methodology is often used by expert systems like CLIPS.

    The fact that the receiving of fresh data might generate new inferences makes the engine more adapted to dynamic circumstances in which conditions are expected to change. This is one of the benefits of forward-chaining versus backward-chaining.

    {End Chapter 1}

    Chapter 2: Production system (computer science)

    A computer program is referred to as a production system (or a production rule system) when it is used to provide some form of artificial intelligence. This type of program consists primarily of a set of rules about behavior, but it also includes the mechanism necessary to follow those rules as the system reacts to states in the world. These rules, which are also known as products, are a fundamental representation that may be helpful in automated planning, expert systems, and action selection.

    A sensory precondition (also known as a IF statement) is the first component of a production, followed by an action (or THEN). It is claimed that a production has been triggered when the precondition of the production meets the state that the world is in at the time. When the activity of a production is carried out, we say that the production has fired. A database, sometimes known as working memory, is part of a production system. Its purpose is to store information on the current state or knowledge, and it also includes an interpreter for rules. When more than one production is triggered at the same time, the rule interpreter is required to offer a method for prioritizing the productions.

    Rule interpreters will often carry out a forward chaining algorithm when choosing which productions to carry out in order to achieve the objectives at hand. This may include bringing the system's data or beliefs up to date. The left-hand side, often known as the LHS, of each rule is used to compare the current state of the working memory with the conditional section of the rule.

    There is an assumption that any triggered circumstances should be performed in data-oriented or idealized production systems. The subsequent actions (right-hand side or RHS) will update the agent's knowledge by deleting or adding data to the working memory. The operation of the system comes to a halt when one of the following conditions is met: the user interrupts the forward chaining loop; a predetermined number of cycles have been completed; a halt RHS instruction is carried out; or there are no more rules with LHSs that are true.

    Real-time and expert systems, on the other hand, are often forced to pick between products that are incompatible with one another. This is because actions cost time, and hence only one action may be done or, in the case of an expert system, advised. In these kinds of computer systems, the rule interpreter, also known as the inference engine, goes through a cycle consisting of two steps. First, it compares the production rules with the database. Then, it decides which of the matched rules should be applied and carries out the actions that have been chosen.

    The degree to which circumstances in production rules are able to represent meaning might differ from production system to production system. Accordingly, the pattern matching algorithm that collects production rules with matched conditions can range from the naive—trying all rules in sequence, stopping at the first match—to the optimized, in which rules are compiled into a network of inter-related conditions. The naive algorithm collects production rules with matched conditions and stops at the first match.

    The latter is shown by the RETE algorithm, which was invented in 1974 by Charles L. Forgy. It is used in a series of production systems known as OPS, which were first developed at Carnegie Mellon University and culminated in OPS5 in the early 1980s. It is possible to consider OPS5 to be a fully-fledged programming language for use in production system programming.

    The production rules that are ultimately chosen to be carried out, or fired, by a system might also vary from one system to the next. The group of rules that were produced as a consequence of the prior matching algorithm is referred to as the conflict set, and the method of rule selection is also referred to as a conflict resolution technique.

    Again, these strategies can range from being extremely simple, such as use the order in which production rules were written, to being extremely complex, such as sort the conflict set according to the times at which production rules were previously fired, or "according to the extent of the

    Enjoying the preview?
    Page 1 of 1