Trending Technology Machine Learning, Artificial Intelligent, Block Chain, IoT, DevOps, Data Science

Recent Post

Codecademy Code Foundations

Search This Blog

Rules based Organizing of the Knowledge in AI

  • In computer science, rule-based systems are used as a way to store and manipulate knowledge to interpret information in a useful way. They are often in artificial intelligence applications and research.
  • In computer science, a rule-based system is a set of "if-then" statement that uses a set of assertions, to which rules on how to act upon those assertions are created.
  • In software development, rule-based systems can be used to create software that will provide an answer to a problem in place of a human expert. 
  • The human mental process is internal, and it is too complex to be represented as an algorithm.However, most experts are capable of expressing their knowledge in the from of rules for problem solving.
              IF            the 'traffic light' is green
              THEN     the action is go
              
              IF            the 'traffic light' is red
              THEN     the action is stop

Rules as a knowledge representation technique
  1. The term rule in AI, which is the most commonly used type of knowledge representation, can be defined as an IF-THEN structure that relates given information or facts in the IF part to some action in the THEN part.
  2. A rule provides some description of how to solve a problem.Rules are relatively easy to create and understand.
- Any rule consists of two parts:
- the IF part, called  the antecedent (premise or condition)
- and the THEN part called the consequent (conclusion or action).
            IF            <antecedent>
            THEN     <consequent>
     3. A rule can have multiple antecedents joined by the keywords AND (conjunction), OR (disjunction) or a combination of both. 

             IF              <antecedent 1>      IF      <antecedent 1>
             AND         <antecedent 2>      OR    <antecedent 2>
                                       .                                          .
                                       .                                          .
                                       .                                          .
            AND           <antecedent n>      OR      <antecedent n>
             THEN        <consequent>        THEN  <consequent>
  • The antecedent of a rule incorporates two parts: an object (linguistic object) and its value. The object and its value are linked by an operator.
  • The operator identifies the object and assigns the value. Operators such as is, are, is not, are not are used to assign a symbolic value to a linguistic object. 
  • Systems can also use mathematical operators to define an object as numerical and assign it to the numerical value.
              IF                  'age of the customer' <18
                     AND      ' cash withdrawal' > 1000
                     THEN      'signature of the parent' is required
Rules can represent relations, recommendations, directives, strategies and heuristics:
  • Relation 
        IF             the 'fuel tank' is empty
        THEN      the car is dead
  • Recommendation
         IF             the season is autumn
         AND        the sky is cloudy
         AND        the forecast is drizzle
         THEN      the advice is 'take an umbrella'
  • Directive
          IF            the car is dead
          AND       the 'fuel tank' is empty
          THEN     the action is 'refuel the car'
  • Strategy
           IF           the car is dead
           THEN    the action is 'check the fuel tank'; step 1 is complete

           IF           step 1 is complete
           AND      the 'fuel tank' is full
           THEN    the action is 'check the battery'; step 2 is complete
  • Heuristic
           IF           the spill is liquid
           AND      the 'spill pH'  < 6
           AND      the 'spill smell' is vinegar
           THEN    the 'spill material' is 'acetic acid'

There's If Then, and Then There's If Then
  • It is very tempting to store if-then logical relationships in procedural code, especially since procedural code has if-then statements.
  • In fact, not only is it tempting, it can work reasonably well up to a point.
  • It's the road bit that cause the trouble.
  • A logical relationship can be coded as a procedural if-then, but must be placed somewhere along the road of execution of the procedure it is in.
  • It makes a difference which rule gets placed first, and if there are branches from previous rules, and which branch a following rule is placed on.

No comments:

Post a Comment

Popular Posts