Notes 7: Knowledge Representation, The Propositional Calculus ICS 271 Fall 2008

Notes 7: Knowledge Representation, The Propositional Calculus ICS 271 Fall 2008 www.phwiki.com

Notes 7: Knowledge Representation, The Propositional Calculus ICS 271 Fall 2008

Taylor, Leo, Morning Show Host has reference to this Academic Journal, PHwiki organized this Journal Notes 7: Knowledge Representation, The Propositional Calculus ICS 271 Fall 2008 Outline Representing knowledge using logic Agent that reason logically A knowledge based agent Representing in addition to reasoning with logic Propositional logic Syntax Semantic validity in addition to models Rules of inference as long as propositional logic Resolution Complexity of propositional inference. Reading: Russel in addition to Norvig, Chapter 7 Knowledge bases Knowledge base = set of sentences in a as long as mal language Declarative approach to building an agent (or other system): Tell it what it needs to know Then it can Ask itself what to do – answers should follow from the KB Agents can be viewed at the knowledge level i.e., what they know, regardless of how implemented Or at the implementation level i.e., data structures in KB in addition to algorithms that manipulate them

University of East London GB www.phwiki.com

This Particular University is Related to this Particular Journal

Why knowledge-base The state of the world may require lots of in as long as mation The agent knowledge of the state of the world: If s is world state K(s) is what the agent knows. For economy: Not everything explicitly specified. Some facts can be inferred. Agent may infer whatever he does not know explicitly. Nillson: Constraints on feature values Block A is not on the floor Issues: In what language to express what the agent knows about the world. How explicit to make this knowledge. How to infer. Description of the world Agent knowledge of state Agent explicit specification of what he knows Knowledge Representation Defined by: syntax, semantix Assertions Conclusions (knowledge base) Facts Facts Inference Imply Computer Real-World Semantics Reasoning: in the syntactic level Example: The party example If Alex goes, then Beki goes: A B If Chris goes, then Alex goes: C A Beki does not go: not B Chris goes: C Query: Is it possible to satisfy all these conditions Should I go to the party

Example of languages Programming languages: Formal languages, not ambiguous, but cannot express partial in as long as mation. Not expressive enough. Natural languages: Very expressive but ambiguous: ex: small dogs in addition to cats. Good representation language: Both as long as mal in addition to can express partial in as long as mation, can accommodate inference Main approach used in AI: Logic-based languages. Wumpus World test-bed Per as long as mance measure gold +1000, death -1000 -1 per step, -10 as long as using the arrow Environment Squares adjacent to wumpus are smelly Squares adjacent to pit are breezy Glitter iff gold is in the same square Shooting kills wumpus if you are facing it Shooting uses up the only arrow Grabbing picks up gold if in same square Releasing drops the gold in same square Sensors: Stench, Breeze, Glitter, Bump, Scream Actuators: Left turn, Right turn, Forward, Grab, Release, Shoot Wumpus world characterization Fully Observable No – only local perception Deterministic Yes – outcomes exactly specified Episodic No – sequential at the level of actions Static Yes – Wumpus in addition to Pits do not move Discrete Yes Single-agent Yes – Wumpus is essentially a natural feature

Exploring a wumpus world Exploring a wumpus world Exploring a wumpus world

Exploring a wumpus world Exploring a wumpus world Exploring a wumpus world

Exploring a wumpus world Exploring a wumpus world Logic in general Logics are as long as mal languages as long as representing in as long as mation such that conclusions can be drawn Syntax defines the sentences in the language Semantics define the “meaning” of sentences; i.e., define truth of a sentence in a world E.g., the language of arithmetic x+2 y is a sentence; x2+y > {} is not a sentence x+2 y is true iff the number x+2 is no less than the number y x+2 y is true in a world where x = 7, y = 1 x+2 y is false in a world where x = 0, y = 6

Entailment Entailment means that one thing follows from another: KB Knowledge base KB entails sentence if in addition to only if is true in all worlds where KB is true E.g., the KB containing “the Giants won” in addition to “the Reds won” entails “Either the Giants won or the Reds won” E.g., x+y = 4 entails 4 = x+y Entailment is a relationship between sentences (i.e., syntax) that is based on semantics Models Logicians typically think in terms of models, which are as long as mally structured worlds with respect to which truth can be evaluated We say m is a model of a sentence if is true in m M() is the set of all models of Then KB iff M(KB) M() E.g. KB = Giants won in addition to Reds won = Giants won

Entailment in the wumpus world Situation after detecting nothing in [1,1], moving right, breeze in [2,1] Consider possible models as long as KB assuming only pits 3 Boolean choices 8 possible models Wumpus models Wumpus models KB = wumpus-world rules + observations

Taylor, Leo WAGG-AM Morning Show Host www.phwiki.com

Wumpus models KB = wumpus-world rules + observations 1 = “[1,2] is safe”, KB 1, proved by model checking Wumpus models KB = wumpus-world rules + observations Wumpus models KB = wumpus-world rules + observations 2 = “[2,2] is safe”, KB 2

Propositional logic: Syntax Propositional logic is the simplest logic – illustrates basic ideas The proposition symbols P1, P2 etc are sentences If S is a sentence, S is a sentence (negation) If S1 in addition to S2 are sentences, S1 S2 is a sentence (conjunction) If S1 in addition to S2 are sentences, S1 S2 is a sentence (disjunction) If S1 in addition to S2 are sentences, S1 S2 is a sentence (implication) If S1 in addition to S2 are sentences, S1 S2 is a sentence (biconditional) Propositional logic: Semantics Each model specifies true/false as long as each proposition symbol E.g. P1,2 P2,2 P3,1 false true false With these symbols, 8 possible models, can be enumerated automatically. Rules as long as evaluating truth with respect to a model m: S is true iff S is false S1 S2 is true iff S1 is true in addition to S2 is true S1 S2 is true iff S1is true or S2 is true S1 S2 is true iff S1 is false or S2 is true i.e., is false iff S1 is true in addition to S2 is false S1 S2 is true iff S1S2 is true in addition to S2S1 is true Simple recursive process evaluates an arbitrary sentence, e.g., P1,2 (P2,2 P3,1) = true (true false) = true true = true

Inference-based agents in the wumpus world A wumpus-world agent using propositional logic: P1,1 W1,1 Bx,y (Px,y+1 Px,y-1 Px+1,y Px-1,y) Sx,y (Wx,y+1 Wx,y-1 Wx+1,y Wx-1,y) W1,1 W1,2 W4,4 W1,1 W1,2 W1,1 W1,3 64 distinct proposition symbols, 155 sentences

Taylor, Leo Morning Show Host

Taylor, Leo is from United States and they belong to WAGG-AM and they are from  Birmingham, United States got related to this Particular Journal. and Taylor, Leo deal with the subjects like Christian (non-Catholic); Religion

Journal Ratings by University of East London

This Particular Journal got reviewed and rated by University of East London and short form of this particular Institution is GB and gave this Journal an Excellent Rating.