1 / 42

Intelligent Systems

Intelligent Systems. Lecture 4 Rohan Sinclair. Knowledge Representation. Terms. knowledge representation : the study of how knowledge about the world can be represented and what kinds of reasoning can be done with that knowledge

mari-mccall
Download Presentation

Intelligent Systems

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Intelligent Systems Lecture 4 Rohan Sinclair

  2. Knowledge Representation

  3. Terms • knowledge representation : the study of how knowledge about the world can be represented and what kinds of reasoning can be done with that knowledge • knowledge representation language : Formalism used to represent knowledge. Also known as knowledge representation formalism. • knowledge base: The collection of knowledge used by the system

  4. Where is it used? • medical informatics, • decision support systems, • medical vocabularies, • data coding and transfer, • guidelines and protocols development, • database design and • electronic patient records.

  5. Knowledge Representation Language • A knowledge representation language has two aspects, namely syntactic and inferentialaspect. • The syntactic or notational aspect concerns the way in which one stores information in an explicit format. • The inferential aspect concerns the way in which the explicitly stored information can be used to derive information that is implicit in it.

  6. Knowledge Representation Language A knowledge representation language has four levels, namely: • implementational, • logical, • epistemological and • conceptual level. The most popular include production rules, scripts, semantic networks and frames.

  7. Semantic Nets • The major idea is that the meaning of a concept comes from its relationship to other concepts, and that the information is stored by interconnecting nodes with labelled arcs.

  8. Semantic Networks • A semantic network is a simple representation scheme that uses a graph of labeled nodes and labeled, directed arcs to encode knowledge. • Usually used to represent static, taxonomic, concept dictionaries • Semantic networks are typically used with a special set of accessing procedures that perform “reasoning” • e.g., inheritance of values and relationships

  9. Semantic Networks • Semantic networks were very popular in the ‘60s and ‘70s but are less frequently used today. • Often much less expressive than other KR formalisms • The graphical depiction associated with a semantic network is a significant reason for their popularity.

  10. Nodes and Arcs • Arcs define binary relationships that hold between objects denoted by the nodes. mother age Sue john 5 wife age father husband mother(john,sue) age(john,5) wife(sue,max) age(max,34) ... 34 Max age

  11. Animal isa hasPart Bird isa Wing Robin isa isa Rusty Red Semantic Networks • The ISA (is-a) or AKO (a-kind-of) relation is often used to link instances to classes, classes to superclasses • Some links (e.g. hasPart) are inherited along ISA paths. • The semantics of a semantic net can be relatively informal or very formal • often defined at the implementation level

  12. Reification • Non-binary relationships can be represented by “turning the relationship into an object” • This is an example of what logicians call “reification” • reify v : consider an abstract concept to be real • We might want to represent the generic give event as a relation involving three things: a giver, a recipient and an object, give(john,mary,book32) giver john give recipient object mary book32

  13. Representation in a Semantic Net

  14. Representation in a Semantic Net • These values can also be represented in logic as: isa(person, mammal), instance(Mike-Hall, person) team(Mike-Hall, Cardiff)

  15. Representation in a Semantic Net • We have already seen how conventional predicates such as lecturer(dave) can be written as instance (dave, lecturer) Recall that isa and instance represent inheritance and are popular in many knowledge representation schemes. But we have a problem: How we can have more than 2 place predicates in semantic nets?E.g. score(Cardiff, Llanelli, 23-6)

  16. Representation in a Semantic Net • Solution: • Create new nodes to represent new objects either contained or alluded to in the knowledge, game and fixture in the current example. • Relate information to nodes and fill up slots (see figure below).

  17. Representation in a Semantic Net

  18. Representation in a Semantic Net • As a more complex example consider the sentence: John gave Mary the book. Here we have several aspects of an event. instance Person instance

  19. EXAMPLE • Bilbo, the hobbit, found the magic ring in Gollum’s cave. Hobbits are little people with large, hairy feet.

  20. Example • Five cars are currently placed at the yard of Mack D Auto Sales. Three of the dealer’s cars are Japanese makes and the other two European. The Japanese models are Toyota Corolla (2.5L Automatic PJ6127 Brown), Honda Civic (1.3L Manual MN2323 Red) and Nissan Bluebird Sylphy (2.0L Automatic YK1234 Green) respectively whereas the European models are BMW S-1 (3.0L Automatic MN3456 Blue) and Jaguar (1.3L Manual TR2317 Red). The four pieces of data within the brackets are engine size, mode of transmission, registration number and color respectively.

  21. Solution

  22. Frames • Frames are structures that represent knowledge about a limited aspect of the world. Like the concepts in many of the semantic network representations, frames are descriptions of objects. The descriptions in a frame are called slots.

  23. Frames • Frames implement semantic networks. • They add procedural attachment • A frame has slots and slots have values • A frame may be generic i.e. it describes a class of objects • A frame may be an instance • Frames can inherit properties from generic frames

  24. Example

  25. Propositional Logics • Terms to be discussed • Consistency • Validity • Problem Solving using Semantic Tableaux (Truth Trees, truth tables)

  26. Logics • A logic statement is one that can only be expressed as True or False. • Expressed as an Inference that can only be one of two values. • Critical to the ability of a computer to reason. • Eg. The Wumpus is dead • The Wumpus is not dead • Statements can be a conjunction of many statements. • Logics consists of Syntax • Describes how to make statements • Semantics • Specify the constraints on how statements relates to each other • Proof Theory • Set of rules for evaluating the outcome of a set of statements.

  27. Propositional Logics • The term proposition is synonymous with statement. • also known as sentential logic and Statement Logic. • studies ways of combining proposition to form more complicated proposition • Eg. Paris is the capital of France • Paris has a population of over two million. • Paris is the capital of France and Paris has a population of over two million. • Use uppercase symbols to represent proposition, facts etc, which may be either true or false.

  28. Language Syntax • The logical signs • ‘^’ - And, • 'v‘ - Or, • '→‘ – Implies, (If…. Then…) • '↔‘ – equivalent (Biconditional, If and only if), • '¬' - Not • Paris is the capital of France and Paris has a population of over two million. • Can be written as C ^ P • The order of precedence in propositional logic is (from highest to lowest): ¬ , And, V, →, and ↔. • Hence ¬P V Q ^ R → S is equivalent to ((¬ P) V (Q ^R)) → S.

  29. Eg represent in Propositional Logic statements. • If the violinist plays the concerto then crowds will come if prices are not too high. If the violinist plays the concerto the prices will not be too high. Therefore if the violinist plays the concerto crowds will come. • P = “The violinist plays the piano” • C = “Crowds will come” • H = “Prices are too high”

  30. Language Semantics • Truth Table • Describe the meanings of the symbols used in the language. • P Q ¬P P and Q P V Q P → Q P ↔ Q F F T F F T T F T T F T T F T F F F T F F T T F T T T T • Truth tables define the semantics of the PL sentences. • propositional logic does not require any relation of causation or relevance between sentences P andQ.

  31. Consistency • A collection of statements is considered consistent if the statements can all be true simultaneously. • Anding all statements results in a true outcome. • Eg. Prove if consistent • If the violinist plays the concerto then crowds will come if prices are not too high. If the violinist plays the concerto the prices will not be too high. Therefore if the violinist plays the concerto crowds will come.

  32. Consistency • Eg. Prove if consistent • Sales of houses fall off if interest rates rise. Auctioneers are not happy if sales of houses fall off. Interest rates are rising. Auctioneers are happy.

  33. Soln. • S = “Sales of houses fall off • R = “Interest Rates rise • H = “Auctioneer are happy” • R -> S, S -> -H, R, H • To see if the statements are consistent, we check if the conjunction results in true.

  34. Validity • Statements are valid if the conjunction (AND) of the statements implies the conclusion. • Can the conclusion follows logically from the statements. • Different methods of proving Validity. • Truth Tree • Refutation Strategy • CounterModel Approach

  35. Validity • How to check • Use Truth table • Eg prove validity of the following statements: • P V H, -H, =>P

  36. Refutation Strategy • To check whether an argument is valid we need to find if the negation (opposite) of the conclusion is incompatible with the premises using a truth table. • Ie, does the conjunction of the negated conclusion and the premise results in a false

  37. Example 1 • If the violinist plays the concerto then crowds will come if prices are not too high. If the violinist plays the concerto the prices will not be too high. Therefore if the violinist plays the concerto crowds will come. • Statements are : • P -> (-H -> C) • P -> -H • P -> C (Conclusion) • Negate conclusion and test if conjunction of all three results in a false

  38. Example 2 • IF the Reggae Boyz win the match then their supporters will be happy. The supporters will drink too much if they are not happy. Therefore if the supporters do not drink too much the Reggae Boyz will win the match. • Prove Consistency and Validity

  39. R = “Reggae Boyz will win the match” • H = “The supporters will be happy” • D = “The supporters will drink too much” • Statements would be: • W -> H • -H -> D • Therefore –D -> W

  40. Exercise 5 • If Jamaica reached the World Cup Finals then either Brazil slipped up o France played very well. Brazil did not slip up unless Jamaica reached the World Cup Finals. France did not play very well. Therefore Jamaica reached the World Cup Finals if and only if Brazil slipped up.

  41. Exercise 4 • Convert the following sentences in propositional logic and determine whether or not the conclusions are valid by the use of a truth tree • “If Alice wins the nomination, she will be happy. If she is happy, she is not a good campaigner. But if she loses the nomination, she will lose the confidence of the party. She is not a good campaigner if she loses the confidence of the party. If she is not a good campaigner, then she should resign from the party. Therefore, she should resign from the party.” • Using the following propositional symbols N;H;C; P;R). N - Alice wins the nomination; H - Alice is happy; C - Alice is a good campaigner; P - Alice loses the confidence of the party; R - Alice should resign.

  42. Example 5 • If the teller had pushed the alarm button, the vault would have locked automatically and the police would have arrived within three minutes. Had the police arrived within three minutes, the robbers' car would have been overtaken. But the robbers' car was not overtaken. Therefore the teller did not push the alarm button.

More Related