Logical Agents. CITS3001 Algorithms, Agents and Artificial Intelligence. 2018, Semester 2
|
|
- Roger Smith
- 5 years ago
- Views:
Transcription
1 Logical Agents CITS3001 Algorithms, Agents and Artificial Intelligence Tim French School of Computer Science and Software Engineering The University of Western Australia 2018, Semester 2
2 Summary We motivate and define knowledge-based agents We introduce the use of propositional logic to represent agents and agent functions We show the use of inference in logical agents using the principle of resolution We motivate and introduce the use of firstorder logic to represent agents We discuss issues in using logic to represent agents and their states We define unification and we generalise resolution to first-order logical agents 1
3 Knowledge The agents we have seen so far clearly have knowledge about their environment, about their actions, etc. This knowledge enables them to act intelligently But their knowledge is implicit: it is encoded In their representation In their agent function In their utility function etc. As such, it can be hard to Add to this knowledge Modify this knowledge Use this knowledge to infer new knowledge Apply general logic to different agents The knowledge and the way it is used are buried in the code for the agent 2
4 A knowledge centred approach In knowledge-based agents, an agent s knowledge is separated from its thinking The knowledge is represented explicitly as a database, usually held as a set of sentences in some formal language The thinking is implemented separately as an inference engine which can use the database to make decisions, and to infer new facts about the agent s situation Thus a knowledge-based agent is built (and operates) using a declarative approach Tell the agent what it needs to know initially Then the agent can ask itself questions, and make decisions And the agent can tell itself new facts, as its situation develops This is a higher level way of looking at agent design Less focus on representations, algorithms, etc. i.e. how things are done More focus on knowledge and its use i.e. what has to be done More commonality between different agents One inference engine can operate on different databases, and therefore different agents 3
5 Wumpus World Consider an agent exploring Wumpus World The agent starts in (1,1), facing right Utility: 1 for each step, 10 for shooting the arrow, +1,000 for exiting with the gold, 1,000 for dying The agent can sense each of the following: Squares adjacent to a pit are breezy Squares adjacent to the Wumpus are smelly The gold glitters Actions available are forward, turn, grab, release, shoot The arrow kills the Wumpus The (live) Wumpus can kill the agent Falling into a pit kills the agent Clearly the agent needs to explore! 4
6 Exploring Wumpus World Exploring the world adds to the agent s knowledge It experiences the world, and adds to its database It makes inferences about the world from this knowledge 5
7 Designing a knowledge-based agent We need A language that can represent knowledge A method of processing knowledge to make decisions, and to infer more knowledge For the former, we shall start with propositional logic and progress to first-order logic For the latter, we shall introduce various forms of combining facts and inferring new facts In general, languages have Syntax: what form can sentences take? Semantics: what do sentences mean? e.g. in the language of algebra x + 2 y is a sentence x2 + is not a sentence x + 2 y means true in a world where x = 7, y = 1 x + 2 y means false in a world where x = 0, y = 3 6
8 Propositional logic A sentence can be An atom: P1, P2, etc. A negation: S, where S is any sentence A conjunction: S1 Ù S2 A disjunction: S1 Ú S2 An implication or conditional: S1 S2 An equivalence or biconditional: S1 S2 A model assigns either true or false to each of the atoms in a sentence A sentence evaluates to either true or false in a given model, using the following definitions The truth of an atom is given directly by the model S is true iff S is false S1 Ù S2 is true iff both S1 and S2 are true S1 Ú S2 is false iff both S1 and S2 are false S1 S2 is false iff S1 is true and S2 is false S1 S2 is true iff S1 and S2 are the same If a sentence S is true in a model m, we say that m satisfies S m is a model of S We use M(S) to denote the set of all models of S e.g. M( A Ú B) = {[A = false, B = false], [A = false, B = true], [A = true, B = true]} 7
9 Propositional statements in Wumpus World Let Pij be true iff there is a pit in (i,j) P11 Ù P21 Ù P31 Ù P41 Ù Let Bij be true iff there is a breeze in (i,j) B11 Ù B21 Ù B31 Ù B41 Ù A pit causes breezes in the adjacent squares P31 B21 Ù B41 Ù B32 P44 B43 Ù B34 A square is breezy iff there is an adjacent pit B32 P31 Ú P22 Ú P42 Ú P33 B12 P11 Ú P22 Ú P13 What can we do with this information? 8
10 Some terminology A sentence is valid if it is true in all possible models e.g. true, A Ú A, A Ù (A B) B A valid sentence is called a tautology A sentence is satisfiable if it is true in some model e.g. A, B Ú C A sentence is unsatisfiable if it is true in no models e.g. A Ù A Two sentences are logically equivalent if they are true in the same set of models e.g. S1 Ù S2 and S2 Ù S1 e.g. S1 S2 and S1 Ú S2 9
11 Entailment An agent needs to be able to query its database, i.e. to ask questions about the world e.g. is there a pit in (2,3)? e.g. is it safe to move into (2,3)? It does this by asking whether the current state of the database entails a fact, written α β We say that α entails β if β follows logically from α e.g. {C, C D} D We can define entailment through looking at models α β iff M(α) Í M(β) e.g. {C Ù D} D M(C Ù D) = {[C = true, D = true]} M(D) = {[C = true,d = true], [C = false,d = true]} Determine which models are consistent with α If β is true in all of those models, then α β 10
12 Checking entailment via truth-tables We can check entailment via truth-tables To check whether α β: Determine which rows give α = true If β is true in all of those rows, then α β This is basically an operational way of saying the same thing! But a sentence with n atoms generates a truth-table with 2 n rows Not efficient Can we find a better method? Can we check entailment from syntax alone? Can we automate it? 11
13 Inference systems An inference system is a set of rules for deriving new sentences that are entailed by existing sentences AKA proof system, theorem-proving system Example inference rules include modus ponens: α, α β β modus tollens: β, α β α and-elimination: α Ù β α or-introduction: α α Ú β If an inference system can be used to derive β from α, we write α β An inference system is sound if it only does correct derivations i.e. if whenever α β, then also α β An inference system is complete if it does all correct derivations i.e. if whenever α β, then also α β If an agent has both A knowledge base, and A sound and complete inference system, Then if α follows from the agent s knowledge base, the knowledge base can be used to derive α But how do we get there? 12
14 Proof methodologies Three proof methodologies are commonly used Forward chaining: Work forwards from the known facts to try to derive the query Backward chaining: Work backwards from the query to see if it can be related to the known facts Resolution: Use the known facts to try to disprove the negation of the query, i.e. proof by contradiction All three methodologies are discussed in the text But we focus here on resolution, the most widely-used of the three 13
15 Resolution A proof by resolution has three steps Convert the agent s database to conjunctive normal form (CNF) Negate the query and (notionally) add it to the database (Repeatedly) apply the resolution principle to try to demonstrate a contradiction Proof by contradiction: If KB is true (assumed) And if KB Ù Q is false Then Q must be true! Resolution is sound and complete for propositional logic 14
16 Converting to CNF A clause is a disjunction of literals e.g. B Ú C Ú D e.g. C A sentence in CNF is a conjunction of clauses e.g. (A Ú B) Ù (B Ú C Ú D) Ù C Every propositional sentence can be converted to a logically-equivalent sentence in CNF by a simple recursive procedure Apply the following rules as required S1 S2 (S1 S2) Ù (S2 S1) S1 S2 S1 Ú S2 (S1 Ú S2) S1 Ù S2 (S1 Ù S2) S1 Ú S2 S1 Ú (S2 Ù S3) (S1 Ú S2) Ù (S1 Ú S3) S S Try this for A (B Ú C) (A B Ú C) Ù (B Ú C A) ( A Ú B Ú C) Ù ( (B Ú C) Ú A) ( A Ú B Ú C) Ù ( B Ù C Ú A) ( A Ú B Ú C) Ù ( B Ú A) Ù ( C Ú A) 15
17 The resolution principle If li and mj are complementary literals Then i.e. li = mj l1 Ú Ú lk Ù m1 Ú Ú mn l1 Ú Ú li 1 Ú li+1 Ú Ú lk Ú m1 Ú Ú mj 1 Ú mj+1 Ú Ú mn Essentially: li = mj, therefore one of li and mj is false If li, then l1 Ú Ú li 1 Ú li+1 Ú Ú lk is true If mj, then m1 Ú Ú mj 1 Ú mj+1 Ú Ú mn is true Hence their disjunction is true e.g. A Ú B Ù B A Ú B Ù B Ú false B and B are complementary Hence resolution gives us A Ú false Hence A 16
18 Resolution example KB = {B11 P12 Ú P21, B11} Query = P12 If there is no pit in (1,2), we can move there Convert the KB to CNF: ( B11 Ú P12 Ú P21) Ù ( P12 Ú B11) Ù ( P21 Ú B11) Ù B11 Add the negated query to the KB: ( B11 Ú P12 Ú P21) Ù ( P12 Ú B11) Ù ( P21 Ú B11) Ù B11 Ù P12 Each arrow in the figure represents one application of the resolution principle The fact that we can derive an empty clause denotes a contradiction The empty clause represents false 17
19 Practical systems using propositional logic DPLL[1962] performs a recursive, depth-first enumeration of all models, with backtracking and three heuristics to accelerate the process Early termination: a constant in a sentence allows the sentence to be simplified Pure symbol: if an atom always appears negated, it might as well be made false; or if it always appears un-negated, it might as well be made true Unit clause: any clause with only one symbol dictates the value of that symbol DPLL can handle problems with millions of literals WalkSAT[1993] performs a time-limited, partly-random search using two kinds of steps through the space Flip the symbol that maximises the number of satisfied clauses Flip a randomly-chosen symbol WalkSAT works well in spaces where solutions are dense But (due to the time limit) failure to find a proof for X does not definitively indicate that X is false 18
20 Pros and cons of propositional logic Pros: Declarative: syntax corresponds to facts Allows partial/disjunctive/negated information Compositional: e.g. the meaning of X Ù Y is derived solely from meanings of X and Y Meanings are context-independent BIG con: Limited expressive power e.g. we cannot make a general statement like pits cause breezes in adjacent squares We can only make statements about specific squares The principal issue is that we need a language with variables So we can make statements like if (x, y) has a pit, there will be breezes in (x 1, y), (x+1, y), etc. if (x, y) has a breeze, there must be a pit in at least one of (x, y 1), (x, y+1), etc. 19
21 First-order logic Whereas propositional logic has only binary facts and connectives, first-order logic has many different entities Objects/constants: People, houses, numbers, colours, etc. Predicates: isred, isround, isbrother, etc. Boolean-valued functions for describing properties of objects Functions: father, nextdoor, plus, etc, for relating objects to each other Variables: x, y, etc, for describing properties of sets of objects Connectives: As for propositional logic Equality: For identifying two (possibly partially-defined) objects Quantifiers: for all, ": something is true for every item in a set there exists, $: something is true for at least one item in a set 20
22 Syntax of first-order logic A term is one of A variable A constant function(term1,, termn) Sentences are Boolean-valued, as in propositional logic An atomic sentence is one of predicate(term1,, termn) term1 = term2 A complex sentence is built by recursive applications of connectives i.e. S, S Ù S, S Ú S, S S, S S A quantified sentence is an application of a quantifier all brothers are siblings "x "y brother(x,y) sibling(x,y) sibling is symmetric "x "y sibling (x,y) sibling(y,x) your mother is your female parent "x "y mother(x,y) female(x) Ù parent(x,y) everyone has a mother "x $y mother(y,x) no one has two mothers "x $y $z mother(y,x) Ù mother(z,x) Ù (y = z) "x "y "z mother(y,x) Ù mother(z,x) y = z everyone has two parents "x $y $z parent(y,x) Ù parent(z,x) Ù (y = z) i.e. "x S, $x S 21
23 Properties of quantifiers "x "y S = "y "x S $x $y S = $y $x S "x $y S $y "x S e.g. "x $y loves(x, y) Everyone loves someone e.g. $y "x loves(x, y) There is someone who is loved by everyone Quantifier duality: "x S = $x S If S is not true for everything, then there is something for which it is false $x S = "x S If S is not true for anything, then for everything it is false Basically generalisations of De Morgan s laws 22
24 Wumpus World with first order logic Logically, the agent needs four fundamental abilities The ability to describe its perceptions of the world The ability to infer knowledge about the world The ability to track changes in the world The ability to query the database about the world Assume three types of percepts for smell, breeze, glitter The predicate Percept([Smell, None, None], t) records directly what the agent perceives at time t The agent will receive a sequence of these We need to infer facts from these percepts We can summarise percepts as temporal observations: "tyz Percept([Smell,y,z], t) Smelt(t) "tyz Percept([y,Breeze,z], t) Felt(t) "tyz Percept([y,z,Glitter], t) AtGold (t) From these, we can infer some eternal facts: "xt Smelt(t) Ù At(x,t) Smelly(x) "xt Felt(t) Ù At(x,t) Breezy(x) 23
25 1 st order Wumpus World From these, we can infer the structure of the world Either infer causes: "y Breezy(y) [$x Pit(x) Ù Adjacent(x,y)] Or assert effects: "x Pit(x) ["y Adjacent(x,y) Breezy(y)] Combining these, we can also assert negative effects "y Breezy(y) [$x Pit(x) Ù Adjacent(x,y)] Negative effects are how the agent infers safety We also need to track the internal state of the agent e.g. At(x,t) is true iff the agent is in Square x at time t e.g. Holding(x,t) is true iff the agent is holding x (here, the gold or the arrow) at time t Obviously some actions will change the relevant value(s) of Holding, At, etc. So how best to record this internal state, and how it evolves? 24
26 Situation Calculus One approach is situation calculus Replace the time argument with a situation argument The situation argument basically captures everything about the current state of the agent Relate situations by the Result function e.g. whenever you are at the gold, grab it! "s AtGold(s) Holding(Gold,Result(Grab,s)) But this doesn t change anything arrow-wise "s Holding(Arrow,s) Holding(Arrow,Result(Grab,s)) The latter illustrates an important problem: we have to describe both what actions change: effect axioms what actions don t change: frame axioms The latter is the so-called frame problem We want a representation where we don t have to keep stating e.g. that moving to a new square doesn t change the values of Holding Also there is the qualification problem Actions don t always work And the ramification problem Actions often have secondary effects 25
27 Successor-state axioms One approach to solve these problems is with so-called successor-state axioms Axioms about predicates A predicate P is true now iff an action just made P true, or P was true previously, and no action made P false e.g. "as Holding(Gold,Result(a,s)) [AtGold(s) Ù a = Grab] Ú [Holding(Gold,s) Ù a Release] Using this set-up will typically require fewer axioms than situation calculus 26
28 Agent planning A plan is a sequence of actions What effect does executing Plan p have from Situation s? "s PlanResult([], s) s "s PlanResult([a p],s) PlanResult(p,Result(a,s)) Then the ultimate query is is there a plan that gets the gold? $p Holding(Gold,PlanResult(p,s0)) Where s0 describes the agent s initial situation 27
29 Models and interpretations The truth of a sentence in first-order logic is defined wrt a model and an interpretation The model defines the relevant objects and the relationships between them The interpretation provides definitions for the constants, predicates, and functions So e.g. brother(richard, John) is true if Richard = Lionheart and John = the evil king false if Richard = Dawkins and John = Farnham Entailment in propositional logic can be determined by enumerating models in a truthtable i.e. by testing all possible models In principle, entailment in first-order logic can be determined by enumerating All possible objects, and All possible constants, and All possible predicates, and All possible functions Obviously not realistic! Two alternatives are possible: Propositionalisation Inference 28
30 Propositionalisation Substitution in first-order logic simply means consistently replacing one variable name with another, or with a constant In principle, we can turn any first-order sentence into a propositional sentence by instantiating its quantifiers Universal instantiation: Every instantiation of a universally-quantified sentence is entailed by it "x S Þ subst({x/g}, S), for any ground term g e.g. "x red(x) Þ red(ball), red(dog), red(john), UI can be applied many times, and the new KB is logically-equivalent to the original Existential instantiation: One instantiation of an existentially-quantified sentence is implied by it $x S Þ subst({x/k}, S), for any constant k that does not appear elsewhere in the database Sometimes called a Skolem constant e.g. $x crown(x) Þ crown(c1) The fact that C1 occurs nowhere else means there can be nothing special about it EI can be applied once: the new KB is not equivalent, but is satisfiable if the original is 29
31 Propositionalisation Applying UI and EI as needed gives us a propositional database to which we can apply our previous techniques The problem is that function symbols can be nested indefinitely, giving an infinite database e.g. "x red(x) Þ red(house), red(nextdoor(house)), red(nextdoor(nextdoor(house))), One way around this is to test increasing nesting depths Try solving at depth = 0 If that fails, try at depth = 1 etc. This works if the query is entailed, but it loops if not Either way, it can be very inefficient Alternatively, we could try to extend propositional inference to first order sentences 30
32 Unification Unifying two first-order sentences means finding a (joint) substitution of their variables that makes them identical Unification is often preceded by standardising apart, where the variables in each sentence are made disjoint as far as possible Some examples are below. Usually we are interested in the most general unifier, e.g. U(K(John, x), K(John, y)) = {x/y} 31
33 Generalised modus ponens Unification is important, for example, in the inference rule generalised modus ponens p1 Ù p2 Ù Ù pn Ù (p1 Ù p2 Ù Ù pn q) qθ, where "i pi θ = piθ θ is the most general substitution that identifies all pi with pi θ is then applied to q e.g. King(John) Ù "y Greedy(y) Ù ("x King(x) Ù Greedy(x) Evil(x)) θ = {x/john, x/y} Evil(x)θ = Evil(John) 32
34 Generalised resolution Unification is also central to the way that resolution operates in first-order logic The three steps are the same as before, but each is enhanced to deal with firstorder sentences Converting the database to CNF is the same, except that Each variable is Skolemised before conversion EI is performed on each existential quantifier UI is used to eliminate each universal quantifier Then we negate the query and (notionally) add it to the database, as before Then we (repeatedly) apply the resolution principle, which is enhanced to unify terms instead of simply eliminating complementary literals 33
35 Converting 1 st order to CNF We illustrate the process by converting the sentence everyone who loves all animals is loved by someone "x ["y animal(y) loves(x, y)] [$y loves(y, x) ] Eliminate biconditionals and implications "x [ "y ( animal(y) Ú loves(x, y)) ] Ú [$y loves(y, x) ] Move inwards, using De Morgan and quantifier duality "x [$y ( animal(y) Ú loves(x, y)) ] Ú [$y loves(y, x) ] "x [$y ( animal(y) Ù loves(x, y)) ] Ú [$y loves(y, x) ] "x [$y (animal(y) Ù loves(x, y)) ] Ú [$y loves(y, x) ] Standardise variables apart "x [$y (animal(y) Ù loves(x, y)) ] Ú [$z loves(z, x) ] Skolemise the existential quantifiers Replace each with a function of the enclosing universal quantifiers e.g. g(x) denotes that different people love x "x [animal(f(x)) Ù loves(x, f(x)) ] Ú loves(g(x), x) Drop universal quantifiers [animal(f(x)) Ù loves(x, f(x)) ] Ú loves(g(x), x) Distribute Ú over Ù [animal(f(x)) loves(g(x), x)] Ú loves(g(x), x)] Ù [ loves(x, f(x)) Ú 34
36 The resoltuion principle If li and mj unify to give the substitution θ, then l1 Ú Ú lk Ù m1 Ú Ú mn e.g. (l1 Ú Ú li 1 Ú li+1 Ú Ú lk Ú m1 Ú Ú mj 1 Ú mj+1 Ú Ú mn)θ [animal(f(x)) Ú loves(g(x), x)] Ù [ loves(u, v) Ú kills(u, v)] U(loves(g(x), x), loves(u, v)) = {u/g(x), v/x}, leaving the resolvent animal(f(x)) Ú kills(g(x), x) Note that the complexity is likely to be higher than the propositional version The number of possible unifications is likely to be higher than the number of complementary literals 35
37 First order resolution example It is a crime for an American to sell weapons to a hostile nation "xyz American(x) Ù weapon(y) Ù hostile(z) Ù sells(x, y, z) criminal(x) Nono has some missiles owns(nono, M1) missile(m1) Nono got its missiles from Col. West "x missile(x) Ù owns(nono,x) sells(west,x,nono) Missiles are weapons "x missile(x) weapon(x) An enemy of America counts as hostile "x enemy(x, America) hostile(x) Col. West is American American(West) Nono is an enemy of America enemy(nono, America) Is Col. West a criminal? criminal(west)? 36
38 Yes, he is! Next up, turning knowledge into actions! 37
CSC242: Intro to AI. Lecture 13. Thursday, February 28, 13
CSC242: Intro to AI Lecture 13 Recap Rooms adjacent to pits will have breezes Socrates is a person All people are mortal Anybody s grandmother is either their mother s or their father s mother Elements
More informationCS 771 Artificial Intelligence. First Order Logic Inference
CS 771 Artificial Intelligence First Order Logic Inference Universal instantiation (UI) Notation: Subst({v/g}, α) means the result of substituting ground term g for variable v in sentence α Every instantiation
More informationEE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS
EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS Lecture 10, 5/9/2005 University of Washington, Department of Electrical Engineering Spring 2005 Instructor: Professor Jeff A. Bilmes Logical Agents Chapter 7
More informationLogical Agents. Chapter 7
Logical Agents Chapter 7 Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem
More informationIntroduction to Artificial Intelligence 2 nd semester 2016/2017. Chapter 9: Inference in First-Order Logic
Introduction to Artificial Intelligence 2 nd semester 2016/2017 Chapter 9: Inference in First-Order Logic Mohamed B. Abubaker Palestine Technical College Deir El-Balah 1 Outlines Reducing first-order inference
More informationIntelligent Agents. Pınar Yolum Utrecht University
Intelligent Agents Pınar Yolum p.yolum@uu.nl Utrecht University Logical Agents (Based mostly on the course slides from http://aima.cs.berkeley.edu/) Outline Knowledge-based agents Wumpus world Logic in
More informationArtificial Intelligence Chapter 7: Logical Agents
Artificial Intelligence Chapter 7: Logical Agents Michael Scherger Department of Computer Science Kent State University February 20, 2006 AI: Chapter 7: Logical Agents 1 Contents Knowledge Based Agents
More informationInference in first-order logic
Inference in first-order logic CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2014 Soleymani Artificial Intelligence: A Modern Approach, 3 rd Edition, Chapter 9 Outline
More informationProof Methods for Propositional Logic
Proof Methods for Propositional Logic Logical equivalence Two sentences are logically equivalent iff they are true in the same models: α ß iff α β and β α Russell and Norvig Chapter 7 CS440 Fall 2015 1
More informationOutline. Reducing first-order inference to propositional inference Unification. Forward chaining Backward chaining
Inference in First-Order Od Logic 1 Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward chaining Backward chaining Resolution 2 Universal instantiation
More informationLogical Agents. Outline
Logical Agents *(Chapter 7 (Russel & Norvig, 2004)) Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability
More informationInference in first-order logic
Inference in first-order logic Chapter 9 Chapter 9 1 Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward and backward chaining Logic programming
More informationInference in first-order logic
Revised by Hankui Zhuo, March 28, 2018 Inference in first-order logic Chapter 9 Chapter 9 1 Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward
More informationChapter 7 R&N ICS 271 Fall 2017 Kalev Kask
Set 6: Knowledge Representation: The Propositional Calculus Chapter 7 R&N ICS 271 Fall 2017 Kalev Kask Outline Representing knowledge using logic Agent that reason logically A knowledge based agent Representing
More informationIntroduction to Artificial Intelligence. Logical Agents
Introduction to Artificial Intelligence Logical Agents (Logic, Deduction, Knowledge Representation) Bernhard Beckert UNIVERSITÄT KOBLENZ-LANDAU Winter Term 2004/2005 B. Beckert: KI für IM p.1 Outline Knowledge-based
More informationInference in First-Order Logic
A brief history of reasoning 450B.C. Stoics propositional logic, inference (maybe) 322B.C. Aristotle syllogisms (inference rules), quantifi 1565 Cardano probability theory (propositional logic + uncertainty)
More informationInference in First-Order Predicate Calculus
Inference in First-Order Predicate Calculus Deepak Kumar November 2017 Knowledge Engineering in FOPC Identify the task Assemble relevant knowledge Decide on a vocabulary of predicates, functions, and constants
More informationLogical Agent & Propositional Logic
Logical Agent & Propositional Logic Berlin Chen 2005 References: 1. S. Russell and P. Norvig. Artificial Intelligence: A Modern Approach. Chapter 7 2. S. Russell s teaching materials Introduction The representation
More informationTitle: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5)
B.Y. Choueiry 1 Instructor s notes #12 Title: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5) Introduction to Artificial Intelligence CSCE 476-876, Fall 2018 URL: www.cse.unl.edu/ choueiry/f18-476-876
More informationClass Assignment Strategies
Class Assignment Strategies ì Team- A'ack: Team a'ack ì Individualis2c: Search for possible ì Poli2cal: look at others and make decision based on who is winning, who is loosing, and conversa;on ì Emo2on
More informationLogical Agent & Propositional Logic
Logical Agent & Propositional Logic Berlin Chen Department of Computer Science & Information Engineering National Taiwan Normal University References: 1. S. Russell and P. Norvig. Artificial Intelligence:
More informationKecerdasan Buatan M. Ali Fauzi
Kecerdasan Buatan M. Ali Fauzi Artificial Intelligence M. Ali Fauzi Logical Agents M. Ali Fauzi In which we design agents that can form representations of the would, use a process of inference to derive
More informationLecture 8: (Predicate) First Order Logic
Lecture 8: (Predicate) First Order Logic CS 580 (001) - Spring 2018 Amarda Shehu Department of Computer Science George Mason University, Fairfax, VA, USA April 04, 2018 Amarda Shehu (580) 1 1 Outline of
More informationFirst-order logic. Chapter 8. Chapter 8 1
First-order logic Chapter 8 Chapter 8 1 (Slides borrowed from Stuart Russel: http://aima.eecs.berkeley.edu/slides-tex/) Chapter 8 2 First-order logic Whereas propositional logic assumes world contains
More informationLogical Agents. Knowledge based agents. Knowledge based agents. Knowledge based agents. The Wumpus World. Knowledge Bases 10/20/14
0/0/4 Knowledge based agents Logical Agents Agents need to be able to: Store information about their environment Update and reason about that information Russell and Norvig, chapter 7 Knowledge based agents
More informationRevised by Hankui Zhuo, March 21, Logical agents. Chapter 7. Chapter 7 1
Revised by Hankui Zhuo, March, 08 Logical agents Chapter 7 Chapter 7 Outline Wumpus world Logic in general models and entailment Propositional (oolean) logic Equivalence, validity, satisfiability Inference
More informationInference in first-order logic
Inference in first-order logic Chapter 9 Chapter 9 1 Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward and backward chaining Logic programming
More informationCS 771 Artificial Intelligence. Propositional Logic
CS 771 Artificial Intelligence Propositional Logic Why Do We Need Logic? Problem-solving agents were very inflexible hard code every possible state E.g., in the transition of 8-puzzle problem, knowledge
More informationInference in first-order logic
Inference in first-order logic Chapter 9 Chapter 9 1 Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward and backward chaining Resolution Chapter
More informationLogical Agents. Chapter 7
Logical Agents Chapter 7 Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem
More informationArtificial Intelligence
Artificial Intelligence Propositional Logic Marc Toussaint University of Stuttgart Winter 2015/16 (slides based on Stuart Russell s AI course) Outline Knowledge-based agents Wumpus world Logic in general
More informationFirst-Order Logic. CS367 ARTIFICIAL INTELLIGENCE Chapter 8
First-Order Logic CS367 ARTIFICIAL INTELLIGENCE Chapter 8 2012 Semester 2 Patricia J Riddle Adapted from slides by Stuart Russell, http://aima.cs.berkeley.edu/instructors.html 1 Outline Why FOL? Syntax
More informationInf2D 11: Unification and Generalised Modus Ponens
Inf2D 11: Unification and Generalised Modus Ponens School of Informatics, University of Edinburgh 08/02/18 Slide Credits: Jacques Fleuriot, Michael Rovatsos, Michael Herrmann Outline Reducing first-order
More information7. Logical Agents. COMP9414/ 9814/ 3411: Artificial Intelligence. Outline. Knowledge base. Models and Planning. Russell & Norvig, Chapter 7.
COMP944/984/34 6s Logic COMP944/ 984/ 34: rtificial Intelligence 7. Logical gents Outline Knowledge-based agents Wumpus world Russell & Norvig, Chapter 7. Logic in general models and entailment Propositional
More informationArtificial Intelligence
Artificial Intelligence Propositional Logic Marc Toussaint University of Stuttgart Winter 2016/17 (slides based on Stuart Russell s AI course) Motivation: Most students will have learnt about propositional
More informationInference in first-order logic
Inference in first-order logic Chapter 9 Chapter 9 1 Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward and backward chaining Logic programming
More informationLogical agents. Chapter 7. Chapter 7 1
Logical agents Chapter 7 Chapter 7 Outline Knowledge-based agents Wumpus world Logic in general models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules
More informationTDT4136 Logic and Reasoning Systems
TDT436 Logic and Reasoning Systems Chapter 7 - Logic gents Lester Solbakken solbakke@idi.ntnu.no Norwegian University of Science and Technology 06.09.0 Lester Solbakken TDT436 Logic and Reasoning Systems
More informationLogical Agents: Propositional Logic. Chapter 7
Logical Agents: Propositional Logic Chapter 7 Outline Topics: Knowledge-based agents Example domain: The Wumpus World Logic in general models and entailment Propositional (Boolean) logic Equivalence, validity,
More informationINF5390 Kunstig intelligens. Logical Agents. Roar Fjellheim
INF5390 Kunstig intelligens Logical Agents Roar Fjellheim Outline Knowledge-based agents The Wumpus world Knowledge representation Logical reasoning Propositional logic Wumpus agent Summary AIMA Chapter
More informationLogic. Stephen G. Ware CSCI 4525 / 5525
Logic Stephen G. Ware CSCI 4525 / 5525 Logic How can we represent knowledge about the world in a general, reusable way? How can we use existing knowledge to gain new knowledge? Problem Solving Approaches
More informationFirst-order logic. First-order logic. Logics in general. Outline. Syntax of FOL: Basic elements. Pros and cons of propositional logic
First-order logic Whereas propositional logic assumes world contains facts, first-order logic (like natural language) assumes the world contains First-order logic Chapter 8 Objects: people, houses, numbers,
More informationCS 4700: Foundations of Artificial Intelligence
CS 4700: Foundations of Artificial Intelligence Bart Selman selman@cs.cornell.edu Module: Knowledge, Reasoning, and Planning Part 2 Logical Agents R&N: Chapter 7 1 Illustrative example: Wumpus World (Somewhat
More informationFirst Order Logic (FOL) and Inference
First Order Logic (FOL) and Inference CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2018 Soleymani Artificial Intelligence: A Modern Approach, 3 rd Edition, Chapter
More informationIntroduction to Intelligent Systems
Logical Agents Objectives Inference and entailment Sound and complete inference algorithms Inference by model checking Inference by proof Resolution Forward and backward chaining Reference Russel/Norvig:
More informationLogic. proof and truth syntacs and semantics. Peter Antal
Logic proof and truth syntacs and semantics Peter Antal antal@mit.bme.hu 10/9/2015 1 Knowledge-based agents Wumpus world Logic in general Syntacs transformational grammars Semantics Truth, meaning, models
More informationPlanning and search. FOL and situation calculus. FOL and situation calculus 1
Planning and search FOL and situation calculus FOL and situation calculus 1 Outline First-order logic continued Situation calculus Logic and planning FOL and situation calculus 2 Fun with sentences Brothers
More informationFirst-order logic. AI Slides (5e) c Lin
First-order logic 6 AI Slides (5e) c Lin Zuoquan@PKU 2003-2018 6 1 6 First-Order Logic 2.1 First-order logic Syntax Semantics 2.2 Representation in FOL 2.3 Agents in first-order case AI Slides (5e) c Lin
More informationInf2D 06: Logical Agents: Knowledge Bases and the Wumpus World
Inf2D 06: Logical Agents: Knowledge Bases and the Wumpus World School of Informatics, University of Edinburgh 26/01/18 Slide Credits: Jacques Fleuriot, Michael Rovatsos, Michael Herrmann Outline Knowledge-based
More informationLogical Agents (I) Instructor: Tsung-Che Chiang
Logical Agents (I) Instructor: Tsung-Che Chiang tcchiang@ieee.org Department of Computer Science and Information Engineering National Taiwan Normal University Artificial Intelligence, Spring, 2010 編譯有誤
More informationLogical Agents. Santa Clara University
Logical Agents Santa Clara University Logical Agents Humans know things Humans use knowledge to make plans Humans do not act completely reflexive, but reason AI: Simple problem-solving agents have knowledge
More informationCS 188: Artificial Intelligence Spring 2007
CS 188: Artificial Intelligence Spring 2007 Lecture 8: Logical Agents - I 2/8/2007 Srini Narayanan ICSI and UC Berkeley Many slides over the course adapted from Dan Klein, Stuart Russell or Andrew Moore
More information7 LOGICAL AGENTS. OHJ-2556 Artificial Intelligence, Spring OHJ-2556 Artificial Intelligence, Spring
109 7 LOGICAL AGENS We now turn to knowledge-based agents that have a knowledge base KB at their disposal With the help of the KB the agent aims at maintaining knowledge of its partially-observable environment
More informationCS 380: ARTIFICIAL INTELLIGENCE INFERENCE IN PROPOSITIONAL LOGIC
CS 380: ARTIFICIAL INTELLIGENCE INFERENCE IN PROPOSITIONAL LOGIC 11/11/2013 Santiago Ontañón santi@cs.drexel.edu https://www.cs.drexel.edu/~santi/teaching/2013/cs380/intro.html Summary of last day: Logic:
More informationCS 380: ARTIFICIAL INTELLIGENCE PREDICATE LOGICS. Santiago Ontañón
CS 380: RTIFICIL INTELLIGENCE PREDICTE LOGICS Santiago Ontañón so367@drexeledu Summary of last day: Logical gents: The can reason from the knowledge they have They can make deductions from their perceptions,
More informationIntroduction to Intelligent Systems
Logical Agents Objectives Inference and entailment Sound and complete inference algorithms Inference by model checking Inference by proof Resolution Forward and backward chaining Reference Russel/Norvig:
More informationCS 380: ARTIFICIAL INTELLIGENCE FIRST ORDER LOGIC. Santiago Ontañón
CS 380: ARTIFICIAL INTELLIGENCE FIRST ORDER LOGIC Santiago Ontañón so367@drexel.edu Pros and cons of propositional logic Propositional logic is declarative: pieces of syntax correspond to facts Propositional
More informationKnowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):
Logic Knowledge-based agents Inference engine Knowledge base Domain-independent algorithms Domain-specific content Knowledge base (KB) = set of sentences in a formal language Declarative approach to building
More informationFoundations of Artificial Intelligence
Foundations of Artificial Intelligence 7. Propositional Logic Rational Thinking, Logic, Resolution Joschka Boedecker and Wolfram Burgard and Frank Hutter and Bernhard Nebel Albert-Ludwigs-Universität Freiburg
More information7.5.2 Proof by Resolution
137 7.5.2 Proof by Resolution The inference rules covered so far are sound Combined with any complete search algorithm they also constitute a complete inference algorithm However, removing any one inference
More informationThe Wumpus Game. Stench Gold. Start. Cao Hoang Tru CSE Faculty - HCMUT
The Wumpus Game Stench Stench Gold Stench Start 1 The Wumpus Game Stench in the square containing the wumpus and in the directly adjacent squares in the squares directly adjacent to a pit Glitter in the
More informationAgenda. Artificial Intelligence. Reasoning in the Wumpus World. The Wumpus World
Agenda Artificial Intelligence 10. Propositional Reasoning, Part I: Principles How to Think About What is True or False 1 Introduction Álvaro Torralba Wolfgang Wahlster 2 Propositional Logic 3 Resolution
More informationLogic. Introduction to Artificial Intelligence CS/ECE 348 Lecture 11 September 27, 2001
Logic Introduction to Artificial Intelligence CS/ECE 348 Lecture 11 September 27, 2001 Last Lecture Games Cont. α-β pruning Outline Games with chance, e.g. Backgammon Logical Agents and thewumpus World
More informationFirst-Order Logic. Language of FOL: Grammar. 22c:145 Artificial Intelligence. Norvig. Universal quantification. A common mistake to avoid
Language of FOL: Grammar 22c:145 Artificial Intelligence Sentence ::= AtomicS ComplexS AtomicS ::= True False RelationSymb(Term,...) Term = Term ComplexS ::= (Sentence) Sentence Connective Sentence Sentence
More informationRational Agents. Paolo Turrini. Introduction to Artificial Intelligence 2nd Part. Department of Computing, Imperial College London
Rational Agents Department of Computing, Imperial College London Introduction to Artificial Intelligence 2nd Part What you have seen You have seen procedures for computational problem-solving: searching
More informationInference in first-order logic
Inference in first-order logic Chapter 9 Chapter 9 1 Ch. 9 Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward and backward chaining Resolution
More informationFoundations of Artificial Intelligence
Foundations of Artificial Intelligence 7. Propositional Logic Rational Thinking, Logic, Resolution Wolfram Burgard, Maren Bennewitz, and Marco Ragni Albert-Ludwigs-Universität Freiburg Contents 1 Agents
More informationFoundations of Artificial Intelligence
Foundations of Artificial Intelligence 7. Propositional Logic Rational Thinking, Logic, Resolution Joschka Boedecker and Wolfram Burgard and Bernhard Nebel Albert-Ludwigs-Universität Freiburg May 17, 2016
More informationCSCI 5582 Artificial Intelligence. Today 9/28. Knowledge Representation. Lecture 9
CSCI 5582 Artificial Intelligence Lecture 9 Jim Martin Today 9/28 Review propositional logic Reasoning with Models Break More reasoning Knowledge Representation A knowledge representation is a formal scheme
More informationPrice: $25 (incl. T-Shirt, morning tea and lunch) Visit:
Three days of interesting talks & workshops from industry experts across Australia Explore new computing topics Network with students & employers in Brisbane Price: $25 (incl. T-Shirt, morning tea and
More informationArtificial Intelligence. Propositional logic
Artificial Intelligence Propositional logic Propositional Logic: Syntax Syntax of propositional logic defines allowable sentences Atomic sentences consists of a single proposition symbol Each symbol stands
More informationPropositional Logic: Logical Agents (Part I)
Propositional Logic: Logical Agents (Part I) This lecture topic: Propositional Logic (two lectures) Chapter 7.1-7.4 (this lecture, Part I) Chapter 7.5 (next lecture, Part II) Next lecture topic: First-order
More informationLogical Inference. Artificial Intelligence. Topic 12. Reading: Russell and Norvig, Chapter 7, Section 5
rtificial Intelligence Topic 12 Logical Inference Reading: Russell and Norvig, Chapter 7, Section 5 c Cara MacNish. Includes material c S. Russell & P. Norvig 1995,2003 with permission. CITS4211 Logical
More informationCS 561: Artificial Intelligence
CS 561: Artificial Intelligence Instructor: TAs: Sofus A. Macskassy, macskass@usc.edu Nadeesha Ranashinghe (nadeeshr@usc.edu) William Yeoh (wyeoh@usc.edu) Harris Chiu (chiciu@usc.edu) Lectures: MW 5:00-6:20pm,
More informationSet 8: Inference in First-order logic. ICS 271 Fall 2013 Chapter 9: Russell and Norvig
Set 8: Inference in First-order logic ICS 271 Fall 2013 Chapter 9: Russell and Norvig Universal instantiation (UI) Every instantiation of a universally quantified sentence is entailed by it: v α Subst({v/g},
More informationArtificial Intelligence
Artificial Intelligence First-Order Logic Marc Toussaint University of Stuttgart Winter 2015/16 (slides based on Stuart Russell s AI course) First-order logic (FOL) is exactly what is sometimes been thought
More informationCS 380: ARTIFICIAL INTELLIGENCE
CS 380: RTIFICIL INTELLIGENCE PREDICTE LOGICS 11/8/2013 Santiago Ontañón santi@cs.drexel.edu https://www.cs.drexel.edu/~santi/teaching/2013/cs380/intro.html Summary of last day: Logical gents: The can
More informationChapter 8 First Order Logic
1 Chapter 8 First Order Logic BBM 405 Artificial Intelligence Pinar Duygulu Slides are mostly adapted from AIMA and MIT Open Courseware CS461 Artificial Intelligence Pinar Spring Pros and cons of propositional
More informationLogic-based agents. Logic Summary
Artificial Intelligence Programming Inference Chris Brooks Department of Computer Science University of San Francisco Logic-based agents The big picture: our agent needs to make decisions about what to
More information7. Propositional Logic. Wolfram Burgard and Bernhard Nebel
Foundations of AI 7. Propositional Logic Rational Thinking, Logic, Resolution Wolfram Burgard and Bernhard Nebel Contents Agents that think rationally The wumpus world Propositional logic: syntax and semantics
More informationPropositional Logic: Methods of Proof (Part II)
Propositional Logic: Methods of Proof (Part II) You will be expected to know Basic definitions Inference, derive, sound, complete Conjunctive Normal Form (CNF) Convert a Boolean formula to CNF Do a short
More informationOutline. Logical Agents. Logical Reasoning. Knowledge Representation. Logical reasoning Propositional Logic Wumpus World Inference
Outline Logical Agents ECE57 Applied Artificial Intelligence Spring 007 Lecture #6 Logical reasoning Propositional Logic Wumpus World Inference Russell & Norvig, chapter 7 ECE57 Applied Artificial Intelligence
More informationFoundations of Artificial Intelligence
Foundations of Artificial Intelligence 9. Predicate Logic Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution Wolfram Burgard, Bernhard Nebel and Martin Riedmiller Albert-Ludwigs-Universität
More informationSet 8: Inference in First-order logic. ICS 271 Fall 2017 Chapter 9: Russell and Norvig
Set 8: Inference in First-order logic ICS 271 Fall 2017 Chapter 9: Russell and Norvig Universal instantiation (UI) Every instantiation of a universally quantified sentence is entailed by it: v α Subst({v/g},
More informationFirst Order Logic (FOL)
First Order Logic (FOL) CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2013 Soleymani Course material: Artificial Intelligence: A Modern Approach, 3 rd Edition, Chapter
More informationLast update: March 4, Logical agents. CMSC 421: Chapter 7. CMSC 421: Chapter 7 1
Last update: March 4, 00 Logical agents CMSC 4: Chapter 7 CMSC 4: Chapter 7 Outline Knowledge-based agents Wumpus world Logic in general models and entailment Propositional (oolean) logic Equivalence,
More informationArtificial Intelligence Chapter 9: Inference in First-Order Logic
Artificial Intelligence Chapter 9: Inference in First-Order Logic Andreas Zell After the Textbook: Artificial Intelligence, A Modern Approach by Stuart Russell and Peter Norvig (3 rd Edition) 9 Inference
More informationLecture 7: Logical Agents and Propositional Logic
Lecture 7: Logical Agents and Propositional Logic CS 580 (001) - Spring 2018 Amarda Shehu Department of Computer Science George Mason University, Fairfax, VA, USA March 07, 2018 Amarda Shehu (580) 1 1
More informationLogical Agents. Outline
ogical gents Chapter 6, Ie Chapter 7 Outline Knowledge-based agents Wumpus world ogic in general models and entailment ropositional (oolean) logic Equivalence, validity, satisfiability Inference rules
More informationLogic & Logic Agents Chapter 7 (& background)
Lecture Notes, Advanced Artificial Intelligence (SCOM7341) Sina Institute, University of Birzeit 2 nd Semester, 2012 Advanced Artificial Intelligence (SCOM7341) Logic & Logic Agents Chapter 7 (& background)
More informationFirst-Order Logic and Inference
First-Order Logic and Inference Berlin Chen Department of Computer Science & Information Engineering National Taiwan Normal University References: 1. S. Russell and P. Norvig. Artificial Intelligence:
More informationOutline. Inference in first- order logic: just a taste. Universal instan8a8on (UI) Inference with Quan8fiers. Reduc8on to proposi8onal inference
Outline Inference in first- order logic: just a taste Dr. Melanie Mar8n CS 4480 Based on slides from hap://aima.eecs.berkeley.edu/2nd- ed/slides- ppt/ Reducing first- order inference to proposi8onal inference
More informationInference Methods In Propositional Logic
Lecture Notes, Artificial Intelligence ((ENCS434)) University of Birzeit 1 st Semester, 2011 Artificial Intelligence (ENCS434) Inference Methods In Propositional Logic Dr. Mustafa Jarrar University of
More informationAI Programming CS S-09 Knowledge Representation
AI Programming CS662-2013S-09 Knowledge Representation David Galles Department of Computer Science University of San Francisco 09-0: Overview So far, we ve talked about search, which is a means of considering
More informationReasoning. Inference. Knowledge Representation 4/6/2018. User
Reasoning Robotics First-order logic Chapter 8-Russel Representation and Reasoning In order to determine appropriate actions to take, an intelligent system needs to represent information about the world
More informationOutline. Logical Agents. Logical Reasoning. Knowledge Representation. Logical reasoning Propositional Logic Wumpus World Inference
Outline Logical Agents ECE57 Applied Artificial Intelligence Spring 008 Lecture #6 Logical reasoning Propositional Logic Wumpus World Inference Russell & Norvig, chapter 7 ECE57 Applied Artificial Intelligence
More informationCS 331: Artificial Intelligence Propositional Logic I. Knowledge-based Agents
CS 331: Artificial Intelligence Propositional Logic I 1 Knowledge-based Agents Can represent knowledge And reason with this knowledge How is this different from the knowledge used by problem-specific agents?
More informationKnowledge-based Agents. CS 331: Artificial Intelligence Propositional Logic I. Knowledge-based Agents. Outline. Knowledge-based Agents
Knowledge-based Agents CS 331: Artificial Intelligence Propositional Logic I Can represent knowledge And reason with this knowledge How is this different from the knowledge used by problem-specific agents?
More informationFirst Order Logic (FOL)
First Order Logic (FOL) CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2015 Soleymani Artificial Intelligence: A Modern Approach, 3 rd Edition, Chapter 8 Why FOL?
More informationCS 188: Artificial Intelligence Spring 2007
CS 188: Artificial Intelligence Spring 2007 Lecture 9: Logical Agents 2 2/13/2007 Srini Narayanan ICSI and UC Berkeley Many slides over the course adapted from Dan Klein, Stuart Russell or Andrew Moore
More information