Artificial Intelligence: Knowledge Representation and Reasoning - Study Guide
Course Outcomes and Curriculum Objectives\n\n* Formulating and Solving Search Problems: At the end of the course, students should be able to formulate and solve sequences of actions for an agent by framing them as search problems.\n* Reasoning from Represented Knowledge: Students will infer conclusions from represented knowledge using both logical and probabilistic reasoning methods.\n* Agent Decision Making: Students must solve agent decision problems utilizing probability theory.\n* Comprehension of Learning Forms: Students will comprehend various forms of learning and demonstrate their working mechanisms.\n* Logic and Representation: The course covers Logic, Propositional logic, and First Order Logic (FOL), including their representation, syntax, semantics, and models. This includes symbols, interpretation, terms, atomic and complex sentences, and quantifiers.\n* Ontological Engineering: Focus on categories, objects, and events within the engineering of ontologies.\n\n# Fundamentals of Ontology\n\n* Etymology and Definition: The word \"Ontology\" originates from two Greek words: \"Onto\" (meaning existence or being real) and \"Logia\" (meaning science or study). It is a data model that represents knowledge as a set of concepts within a domain and the relationships between these concepts.\n* Settings of Use: Ontology is utilized in two primary settings:\n * Philosophical: Used by philosophers to signify the most \"Essential Existence\" in the universe (e.g., human life). Parmenides was the first to propose an ontological characterization of reality's fundamental nature. It provides a definitive and exhaustive classification of entities in all spheres of life.\n * Non-Philosophical/Computer Science: Encompasses a representation or formal naming and definition of categories, properties, and relationships between concepts. It deals with knowledge representation in machines and refers to a shared vocabulary for researchers.\n* Ontology in Artificial Intelligence: Ontology-based AI allows systems to use contents and relationships to make inferences that emulate human behavior. It produces targeted results and does not require training sets to become functional.\n* Formal Definitions:\n * Peter Karp (2000): \"An ontology is a specification of conceptualization that is designed for reuse across multiple applications and implementations. A specification of conceptualization written, formal description of a set of concepts and relationships in a domain of interest.\"\n * Passin (2004): \"The arrangement of kinds of things into types and categories with a well-defined structure.\"\n* Ontology vs. Knowledge Base:\n * Ontology: An abstract entity that is a formal representation of a domain. It defines vocabulary and relationships but does not specify how knowledge is physically stored (e.g., database or file) or accessed.\n * Knowledge Base (KB): A physical artifact, such as a database or repository, that can be accessed and manipulated. Information in a KB is modeled according to an ontology.\n* Classification of Ontologies:\n * Upper Level (Top Level): Describes the most general concepts that remain consistent across all knowledge domains (e.g., Entities).\n * General Ontologies: Represents knowledge at an intermediate level of detail, independent of specific tasks (e.g., Theories of Time and Space).\n * Domain Level (Application Ontologies): Designed for specific tasks. For example, a University ontology might branch into Engineering (Civil, CSE, ENTC, Mech) or Commerce (BBA, MBA).\n\n# Knowledge Representation and Reasoning (KR&R)\n\n* Definition: The field of AI dedicated to representing information about the world in a computer-utilizable form to solve complex tasks (e.g., medical diagnosis or natural language dialog). It incorporates findings from psychology (human problem solving) and logic (automated reasoning).\n* Categorization of Knowledge to be Represented:\n * Object: Facts about objects in a domain (e.g., \"Guitars contain strings\").\n * Events: Actions occurring in the world.\n * Performance: Behavior involving knowledge of how to perform tasks.\n * Meta-knowledge: Knowledge about what we already know.\n * Facts: Truths about the real world.\n * Knowledge Base (KB): The central component of knowledge-based agents, consisting of a group of \"Sentences\" (technical term for represented facts).\n* Types of Knowledge Representation:\n 1. Logic / Logical representation\n 2. Rules / Production Rules\n 3. Semantic Net\n 4. Frames\n 5. Script\n\n# Methodologies of Representation and Reasoning\n\n* Logic: A language with concrete rules dealing with propositions with no ambiguity. It includes precisely defined syntax (rules for constructing legal sentences and symbols) and semantics (rules for interpreting meaning).\n * Propositional Logic (PL): Statements are either true or false.\n * Predicate Logic: Uses quantifiers like \"for all\" and \"there exists.\"\n* Production Rules (Rules): Consists of pairs (\"If condition then action\"). It operates on a \"recognize-act-cycle\" featuring a set of rules and a working memory. These are highly modular and expressed in natural language, but they lack learning capabilities and can be inefficient if many rules are active.\n * Example: \n* Semantic Network Representation: Knowledge represented as graphical networks where nodes are objects and arcs represent relationships. It uses IS-A (inheritance) and Kind-of relations. While natural and transparent, it is computationally expensive (requires tree traversal) and lacks quantifiers.\n* Frames (Slot-Filter Representation): A record-like structure dividing knowledge into substructures representing stereotypical situations. It consists of slots (attributes) and slot values (facets). It is flexible and supports default data but inference mechanisms are difficult to process.\n * Book Example Slots: Title, Genre, Author, Edition, Year, Page.\n * Person Example (Peter): Name, Profession (Engineer), Age (25), Marital status, Weight.\n* Script: A structured representation of a stereotyped sequence of events in a particular context (e.g., eating in a restaurant). Ingredients include:\n * Entry Conditions: Must be fulfilled before the script begins.\n * Results: Verified after events occur.\n * Props: Slots for objects involved.\n * Roles: Actions performed by participants.\n * Track: Variations on the script.\n * Scenes: The sequence of actual events.\n\n# Propositional Logic (PL) Foundations\n\n* Terms: A declarative statement that is either true or false. Also called Boolean logic (working on and ).\n* Formula Types:\n * Tautology (Valid Sentence): Formula that is always true.\n * Contradiction: Formula that is always false.\n * Contingency: Formula that has both true and false values.\n* Non-Propositions: Questions, commands, or opinions (e.g., \"How are you?\") are not propositions.\n* Syntax of PL:\n * Atomic Propositions: Simple, single-symbol propositions (e.g., ).\n * Compound Propositions: Combined atomic propositions using parentheses and logical connectives.\n* Logical Connectives:\n * Negation: (Not P).\n * Conjunction: (P and Q).\n * Disjunction: (P or Q).\n * Implication (If-Then): (If P, then Q).\n * Biconditional (If and only If): .\n* Truth Table Outcomes for Implication ():\n * \n * \n * \n * \n\n# Rules of Inference in Artificial Intelligence\n\n* Inference: Generating new conclusions from evidence and facts. Rules serve as templates for generating valid arguments.\n* Logical Variants of Implication ():\n * Converse: \n * Contrapositive: \n * Inverse: \n* Standard Rules :\n 1. Modus Ponens: (If I am sleepy then I go to bed; I am sleepy; therefore I go to bed).\n 2. Modus Tollens: (If I am sleepy then I go to bed; I do not go to bed; therefore I am not sleepy).\n 3. Hypothetical Syllogism: .\n 4. Disjunctive Syllogism: .\n 5. Addition: .\n 6. Simplification: or .\n 7. Resolution: .\n 8. Unit Resolution: Resolving and to get .\n\n# The Wumpus World Problem Case Study\n\n* Description: A grid cave. The agent begins at . Pits and the Wumpus are placed randomly (excluding ). Each square has a pit probability of .\n* PEAS (Performance, Environment, Actuators, Sensors):\n * Performance: for gold, for death, per action, for using an arrow.\n * Environment: Partially observable, Deterministic, Sequential, Static, Discrete, One agent.\n * Actuators: Left turn, Right turn, Move forward, Grab, Release, Shoot.\n * Sensors: Stench (adjacent to Wumpus), Breeze (adjacent to Pit), Glitter (in Gold room), Bump (walking into wall), Scream (Wumpus hit by arrow).\n* Knowledge Representation in Wumpus World:\n * : Pit in room .\n * : Breeze in room .\n * : Wumpus in room .\n * : Stench in room .\n * : Room is safe.\n* Logical Reasoning Example: To prove Wumpus is in , use rules like combined with existing knowledge of safe squares (Checked via visited rooms and ) and Modus Ponens.\n\n# First Order Logic (FOL)\n\n* Advantage over PL: PL has limited expressive power and cannot represent complex sentences or relationships (e.g., \"Some humans are intelligent\"). FOL is more powerful and extensions focus on objects, relations, and functions.\n* FOL Elements:\n * Objects: Pits, Wumpus, People, Colors.\n * Relations: Unary (Red, Round) or n-ary (Sister Of, Adjacent To).\n * Function: Father Of, Sqrt, Sin.\n* Quantifiers:\n * Universal Quantifier : \"For all,\" \"Every,\" \"Each.\" Example: . Main connective is usually Implication .\n * Existential Quantifier (egin{smallmatrix} ext{inverted} \ ext{E}\ ext{end}{smallmatrix}): \"For some,\" \"There exists.\" Example: . Main connective is usually And .\n* FOL Syntax: Atomic sentences are formed by . Complex sentences combine atomic ones with connectives.\n* Knowledge Engineering Process: (1) Identify task, (2) Assemble knowledge, (3) Decide vocabulary (ontology), (4) Encode general knowledge/axioms, (5) Encode specific problem, (6) Pose queries, (7) Debug.\n\n# Specialized Logic Systems\n\n* Situation Calculus: Formalism for representing dynamical domains (McCarthy, 1963; Reiter, 1991). Main elements are Actions, Situations (histories of actions), and Fluents (statements whose truth changes over time or functions returning situation-dependent values).\n* Description Logics (DL): A family of KR languages expressive enough for definitions but more tractable than FOL. They focus on concepts (categories), roles (binary relations), and individuals. Inference tasks include Subsumption (checking subset relations) and Classification (checking object membership).\n * CLASSIC Language: Uses syntax like . Example: .\n\n# Monotonic vs. Non-monotonic Reasoning\n\n* Monotonic Reasoning: Conclusions remain valid even if new facts are added. Used in theorem proving. Cannot represent real-world changes efficiently.\n* Non-monotonic Reasoning: Conclusions can be invalidated by adding more knowledge (e.g., \"Birds fly\"; \"Alex is a bird\"; conclusion: \"Alex flies\". New fact \"Alex is a penguin\"; invalidates earlier conclusion). Useful for robot navigation and uncertain models.\n* Non-monotonic Logics:\n * Circumscription: Assumes certain predicates are \"as false as possible\" (e.g., ).\n * Default Logic (Reiter): Uses default rules formatted as (If A is provable and it is consistent to assume B, then conclude C). Example: .","title":"Artificial Intelligence: Knowledge Representation and Reasoning"} ```