Artificial intelligence lecture no 13
Download
1 / 32

Artificial Intelligence Lecture No. 13 - PowerPoint PPT Presentation


  • 102 Views
  • Uploaded on

Artificial Intelligence Lecture No. 13 . Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science,  COMSATS Institute of Information Technology (CIIT) Islamabad, Pakistan. Summary of Previous Lecture. Organizing the Knowledge Knowledge Representation using Frames

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Artificial Intelligence Lecture No. 13' - odeda


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Artificial intelligence lecture no 13

Artificial IntelligenceLecture No. 13

Dr. Asad Ali Safi

Assistant Professor,

Department of Computer Science, 

COMSATS Institute of Information Technology (CIIT) Islamabad, Pakistan.


Summary of previous lecture
Summary of Previous Lecture

  • Organizing the Knowledge

  • Knowledge Representation using Frames

  • Inheritance in Frames

  • Semantic network

  • Common kinds of semantic networks

  • Semantic Networks Advantages/disadvantages


Today s lecture
Today’s Lecture

  • Organizing the Knowledge

  • Rules based Organizing of the Knowledge

  • Rules can representation

  • Propositional logic


Organizing the knowledge
Organizing the Knowledge

  • Representing the knowledge

    • Frames

    • Semantic Networks

    • Rules

    • Propositional and Predicate Logic


Rules based organizing of the knowledge
Rules based Organizing of the Knowledge

  • 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 used in artificial intelligence applications and research.


Artificial intelligence lecture no 13

  • In computer science, a rule-based system is a set of "if-then" statements 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. 


Artificial intelligence lecture no 13

IF the ‘traffic light’ is green

THEN the action is go

IF the ‘traffic light’ is red

THEN the action is stop


Artificial intelligence lecture no 13

Rules as a knowledge representation technique to be represented as an algorithm. However, most experts are capable of expressing their knowledge in the form of

  • 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.

  • A rule provides some description of how to solve a problem. Rules are relatively easy to create and understand.


Artificial intelligence lecture no 13

  • Any rule consists of two parts: to be represented as an algorithm. However, most experts are capable of expressing their knowledge in the form of

  • the IF part, called the antecedent (premise or condition)

  • and the THEN part called the consequent (conclusion or action).


Artificial intelligence lecture no 13

A rule can have multiple antecedents joined by the keywords to be represented as an algorithm. However, most experts are capable of expressing their knowledge in the form of AND (conjunction), OR (disjunction) or a combination of both.IF <antecedent 1>AND <antecedent 2>

IF <antecedent>THEN <consequent>

IF <antecedent 1>

OR <antecedent 2>

. . . . . .

AND <antecedent n> THEN <consequent>

OR < antecedent n>

THEN < consequent>


Artificial intelligence lecture no 13

  • The antecedent of a rule incorporates two parts: an to be represented as an algorithm. However, most experts are capable of expressing their knowledge in the form of 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.


Artificial intelligence lecture no 13

  • Systems to be represented as an algorithm. However, most experts are capable of expressing their knowledge in the form of 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


Artificial intelligence lecture no 13

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’


Artificial intelligence lecture no 13

  • Directive strategies and heuristics: IF the car is dead AND the ‘fuel tank’ is empty THEN the action is ‘refuel the car’


Artificial intelligence lecture no 13

  • Strategy IF the car is dead THEN the action is ‘check the fuel tank’; step1 is complete

    IF step1 is complete

    AND the ‘fuel tank’ is full

    THEN the action is ‘check the battery’; step2 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
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.

  • However there is a big difference between a logical relationship and a procedural if-then. A procedural if-then is really a branching statement, controlling the flow of execution of a procedure. If the condition is true, control goes one way, and if not control goes a different way. It's a fork in the road.


Artificial intelligence lecture no 13

  • It's the road bit that causes 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.

  • Furthermore, if there are more logical relationships, they too must be placed at some point in the procedural path—and, by necessity, the placement of one affects the behaviour of another.

  • 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.


Artificial intelligence lecture no 13


Databases for rules
Databases for Rules tree, but in that case the knowledge is really procedural.

  • It is possible, in some cases, to shoehorn logical relationships into a database. If the relationships can be represented in a tabular form, then a database table can be used to encode the rule.

  • So for example, if the amount of discount a customer got was dependent on the amount of previous sales at a few different levels, this could be represented as a table and stored in a database.


Artificial intelligence lecture no 13


A mixed approach
A Mixed Approach is limited in that it only works for very clean sorts of logical relationships.

  • Sometimes applications use a mixture of both the procedural and database approaches. Logical relationships that can be expressed in tables are stored in a database, and the remaining relationships are coded as procedural if-then statements.

  • This can simplify the coding task, but it makes maintenance harder because the logical knowledge is now spread across two different vehicles.

  • Despite these difficulties, there is a strong appeal to using data, procedure or both to encode logical knowledge, and that is that they are familiar techniques, and there are numerous individuals skilled in their use.


Rules in artificial intelligence
Rules in Artificial Intelligence is limited in that it only works for very clean sorts of logical relationships.

  • The problems with encoding logical relationships were first explored back in the 1970s by researchers at Stanford University. They were trying to build a system that advised physicians on courses of antibiotics for treating bacterial infections of the blood and meningitis. They found that the medical knowledge consists mainly of logical relationships that can be expressed as if-then rule.

  • They attempted many times to encode the knowledge using conventional tools, and failed because of the problems described previously.


Artificial intelligence lecture no 13

  • If the problem with coding logical knowledge is that the nature of a computer is not well-suited to expressing logical relationships, then clearly the answer is to create a machine that is. Building specialized hardware is not very practical, but it turns out a computer is a good tool for creating virtual computers.

  • This is what the researchers at Stanford did. They effectively created a virtual machine that was programmed using logical rules. This type of virtual machine is often called a rule engine.


Artificial intelligence lecture no 13

  • Why is a computer good at building a rule engine, but not the rules themselves? It is because behaviour of a rule engine can be expressed in a procedural algorithm, along the lines of:

  • Search for a rule that matches the pattern of data

  • Execute that rule

  • Go to top

  • Forward chaining and backward chaining


Heuristic programming rule based programm ing
Heuristic programming/ rule-based programm the rules themselves? It is because ing

  • The Stanford researchers who were working on the first rule-based systems had originally called their work 'heuristic programming,' which is, of course, a fancy way of saying rule-based programming.

  • Because a large amount of human thought seems to involve the dynamic applying of pattern-matching rules stored in our brains, the idea surfaced that this was somehow 'artificial intelligence'.

  • However the real reason for the growth of the term was pure and simple marketing—it was easier to get Department of Defence funding for advanced research on Artificial Intelligence (AI) than it was for heuristic programming. The term 'expert system' was also invented at about this time for the same reasons.


Artificial intelligence lecture no 13

  • The media too, was very excited about the idea of Artificial Intelligence and expert systems, and the software industry went through a cycle of tremendous hype about AI, followed by disillusionment as the technology simply couldn't live up to the hype.

  • Those companies that survived and continue to market and sell the technology have found the term AI to be a detriment, so they looked for a different term. Now it is most often called rule-based programming


Rule knowledge representation language
Rule Knowledge Representation Language Intelligence and expert systems, and the software industry went through a cycle of tremendous hype about AI, followed by disillusionment as the technology simply couldn't live up to the hype.

  • Knowledge representation is the syntax of a particular tool. Each tool allows the entering of logical knowledge in a certain format, which might be simple if-then statements referencing simple entities, or complex if-then statements that reference complex objects and properties.

  • They can be in and English like syntax or more closely resemble formal logic. The classic design tradeoffs of ease-of-use versus expressive power apply.

  • A tool might provide other means for expressing logical knowledge as well, such as hierarchical structures,, and might include capabilities for expressing uncertainty.

  • Uncertainty is useful for some types of applications, like diagnosis where there isn't a clear right answer, but just gets in the way for something like pricing where there is only one right answer.

  • CLIPS


Organizing the knowledge1
Organizing the Knowledge Intelligence and expert systems, and the software industry went through a cycle of tremendous hype about AI, followed by disillusionment as the technology simply couldn't live up to the hype.

  • Representing the knowledge

    • Frames

    • Semantic Networks

    • Rules

    • Propositional and Predicate Logic


Propositional logic
Propositional logic Intelligence and expert systems, and the software industry went through a cycle of tremendous hype about AI, followed by disillusionment as the technology simply couldn't live up to the hype.

  • Propositional logic consists of:

    • The logical values true and false (T and F)

    • Propositions: “Sentences,” which

      • Are atomic (that is, they must be treated as indivisible units, with no internal structure), and

      • Have a single logical value, either true or false

    • Operators, both unary and binary; when applied to logical values, yield logical values

      • The usual operators are and, or, not, and implies


Truth tables
Truth tables Intelligence and expert systems, and the software industry went through a cycle of tremendous hype about AI, followed by disillusionment as the technology simply couldn't live up to the hype.

  • Logic, like arithmetic, has operators, which apply to one, two, or more values (operands)

  • A truth table lists the results for each possible arrangement of operands

    • Order is important: x op y may or may not give the same result as y op x

  • The rows in a truth table list all possible sequences of truth values for n operands, and specify a result for each sequence

    • Hence, there are 2n rows in a truth table for n operands


Artificial intelligence lecture no 13

  • Propositional and Predicate Logic Intelligence and expert systems, and the software industry went through a cycle of tremendous hype about AI, followed by disillusionment as the technology simply couldn't live up to the hype.

  • Predicate Logic


  • Summery of today s lecture
    Summery of Today’s Intelligence and expert systems, and the software industry went through a cycle of tremendous hype about AI, followed by disillusionment as the technology simply couldn't live up to the hype. Lecture

    • Organizing the Knowledge

    • Rules based Organizing of the Knowledge

    • Rules can representation

    • Propositional logic