Computing & Information Sciences Kansas State University Lecture 10 of 42 CIS 530 / 730 Artificial Intelligence Lecture 10 of 42 William H. Hsu Department.

Slides:



Advertisements
Similar presentations
Russell and Norvig Chapter 7
Advertisements

Computing & Information Sciences Kansas State University Lecture 20 of 42 CIS 530 / 730 Artificial Intelligence Lecture 20 of 42 Introduction to Classical.
Artificial Intelligence Knowledge-based Agents Russell and Norvig, Ch. 6, 7.
Knowledge Representation & Reasoning.  Introduction How can we formalize our knowledge about the world so that:  We can reason about it?  We can do.
Class Project Due at end of finals week Essentially anything you want, so long as its AI related and I approve Any programming language you want In pairs.
1 Problem Solving CS 331 Dr M M Awais Representational Methods Formal Methods Propositional Logic Predicate Logic.
Logical Agents Chapter 7. Why Do We Need Logic? Problem-solving agents were very inflexible: hard code every possible state. Search is almost always exponential.
Computing & Information Sciences Kansas State University Lecture 11 of 42 CIS 530 / 730 Artificial Intelligence Lecture 11 of 42 William H. Hsu Department.
Logical Agents Chapter 7. Why Do We Need Logic? Problem-solving agents were very inflexible: hard code every possible state. Search is almost always exponential.
Carla P. Gomes CS4700 CS 4700: Foundations of Artificial Intelligence Carla P. Gomes Module: Intro to Logic (Reading R&N: Chapter.
Logical Agents Chapter 7 Feb 26, Knowledge and Reasoning Knowledge of action outcome enables problem solving –a reflex agent can only find way from.
A Brief Survey of Machine Learning
Logical Agents Chapter 7 (based on slides from Stuart Russell and Hwee Tou Ng)
Artificial Intelligence Lecture No. 9 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 9 of 42 Wednesday, 13 September.
Propositional Logic: Logical Agents (Part I) This lecture topic: Propositional Logic (two lectures) Chapter (this lecture, Part I) Chapter 7.5.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 9 of 14 Friday, 10 September.
Computing & Information Sciences Kansas State University Lecture 9 of 42 CIS 530 / 730 Artificial Intelligence Lecture 9 of 42 William H. Hsu Department.
Computing & Information Sciences Kansas State University Wednesday, 15 Oct 2008CIS 530 / 730: Artificial Intelligence Lecture 20 of 42 Wednesday, 15 October.
1 Logical Agents CS 171/271 (Chapter 7) Some text and images in these slides were drawn from Russel & Norvig’s published material.
Dr. Shazzad Hosain Department of EECS North South Universtiy Lecture 04 – Part A Knowledge Representation and Reasoning.
Logical Agents Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence,
Class Project Due at end of finals week Essentially anything you want, so long as its AI related and I approve Any programming language you want In pairs.
Well Posed Learning Problems Must identify the following 3 features –Learning Task: the thing you want to learn. –Performance measure: must know when you.
Computing & Information Sciences Kansas State University Wednesday, 20 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 12 of 42 Wednesday, 20 September.
Computing & Information Sciences Kansas State University Wednesday, 12 Sep 2007CIS 530 / 730: Artificial Intelligence Lecture 9 of 42 Wednesday, 12 September.
An Introduction to Artificial Intelligence – CE Chapter 7- Logical Agents Ramin Halavati
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 11 of 41 Wednesday, 15.
Computing & Information Sciences Kansas State University Lecture 8 of 42 CIS 530 / 730 Artificial Intelligence Lecture 8 of 42 William H. Hsu Department.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 13 of 41 Monday, 20 September.
Computing & Information Sciences Kansas State University Lecture 13 of 42 CIS 530 / 730 Artificial Intelligence Lecture 13 of 42 William H. Hsu Department.
CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes Jan 17, 2012.
Logical Agents Chapter 7. Knowledge bases Knowledge base (KB): set of sentences in a formal language Inference: deriving new sentences from the KB. E.g.:
1 Logical Agents CS 171/271 (Chapter 7) Some text and images in these slides were drawn from Russel & Norvig’s published material.
1 Logical Agents Chapter 7. 2 A simple knowledge-based agent The agent must be able to: –Represent states, actions, etc. –Incorporate new percepts –Update.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 12 Friday, 17 September.
Computing & Information Sciences Kansas State University Lecture 14 of 42 CIS 530 / 730 Artificial Intelligence Lecture 14 of 42 William H. Hsu Department.
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 9 of 42 Wednesday, 14.
Computing & Information Sciences Kansas State University Monday, 25 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 14 of 42 Monday, 25 September.
Computing & Information Sciences Kansas State University Monday, 11 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 8 of 42 Monday, 11 September.
Introduction to Artificial Intelligence CS 438 Spring 2008 Today –AIMA, Ch. 13 –Reasoning with Uncertainty Tuesday –AIMA, Ch. 14.
Computing & Information Sciences Kansas State University Monday, 23 Oct 2006CIS 490 / 730: Artificial Intelligence Lecture 25 of 42 Monday, 23 October.
Computing & Information Sciences Kansas State University Friday, 20 Oct 2006CIS 490 / 730: Artificial Intelligence Lecture 24 of 42 Friday, 20 October.
Computing & Information Sciences Kansas State University Lecture 12 of 42 CIS 530 / 730 Artificial Intelligence Lecture 12 of 42 William H. Hsu Department.
Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 10 of 42 Wednesday, 13 September.
Well Posed Learning Problems Must identify the following 3 features –Learning Task: the thing you want to learn. –Performance measure: must know when you.
Logical Agents Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence,
Computing & Information Sciences Kansas State University CIS 530 / 730: Artificial Intelligence Lecture 09 of 42 Wednesday, 17 September 2008 William H.
Logical Agents Chapter 7 Part I. 2 Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic.
Computing & Information Sciences Kansas State University Wednesday, 04 Oct 2006CIS 490 / 730: Artificial Intelligence Lecture 17 of 42 Wednesday, 04 October.
Computing & Information Sciences Kansas State University Monday, 22 Sep 2008CIS 530 / 730: Artificial Intelligence Lecture 11 of 42 Monday, 22 September.
Computing & Information Sciences Kansas State University Friday, 13 Oct 2006CIS 490 / 730: Artificial Intelligence Lecture 21 of 42 Friday, 13 October.
Computing & Information Sciences Kansas State University Monday, 18 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 11 of 42 Monday, 18 September.
Supervise Learning Introduction. What is Learning Problem Learning = Improving with experience at some task – Improve over task T, – With respect to performance.
Artificial Intelligence Logical Agents Chapter 7.
Logical Agents. Inference : Example 1 How many variables? 3 variables A,B,C How many models? 2 3 = 8 models.
LOGICAL AGENTS CHAPTER 7 AIMA 3. OUTLINE  Knowledge-based agents  Wumpus world  Logic in general - models and entailment  Propositional (Boolean)
Propositional Logic: Logical Agents (Part I)
Spring 2003 Dr. Susan Bridges
EA C461 – Artificial Intelligence Logical Agent
Artificial Intelli-gence 1: logic agents
Logical Agents Reading: Russell’s Chapter 7
Logical Agents Chapter 7.
Artificial Intelligence
Artificial Intelligence: Logic agents
Logical Agents Chapter 7.
Knowledge Representation I (Propositional Logic)
Logical Agents Prof. Dr. Widodo Budiharto 2018
Presentation transcript:

Computing & Information Sciences Kansas State University Lecture 10 of 42 CIS 530 / 730 Artificial Intelligence Lecture 10 of 42 William H. Hsu Department of Computing and Information Sciences, KSU KSOL course page: Course web site: Instructor home page: Reading for Next Class: Section 7.5 – 7.7, p , Russell & Norvig 2 nd edition Introduction to Knowledge Representation and Logic

Computing & Information Sciences Kansas State University Lecture 10 of 42 CIS 530 / 730 Artificial Intelligence Lecture Outline Reading for Next Class: Sections 7.5 – 7.7 (p. 211 – 232), R&N 2 e  Propositional calculus (aka propositional logic)  Syntax and semantics  Proof rules  Properties of sentences: entailment and provability  Properties of proof rules: soundness and completeness  Elements of logic: ontology and epistemology Last Class: Game Trees, Search Concluded  Minimax with alpha-beta (α-β) pruning  Expectiminimax: dealing with nondeterminism and imperfect information  “Averaging over clairvoyance” and when/why it fails  Quiescence and the horizon effect Today: Intro to KR and Logic, Sections 7.1 – 7.4 (p. 194 – 210), R&N 2 e  Wumpus world and need for knowledge representation  Syntax and (possible worlds) semantics of logic Coming Week: Propositional and First-Order Logic (7.5 – 9.1)

Computing & Information Sciences Kansas State University Lecture 10 of 42 CIS 530 / 730 Artificial Intelligence © 2004 S. Russell & P. Norvig. Reused with permission. Games: Review WarGames © 1983 MGM : A Space Odyssey © 1968 MGM.

Computing & Information Sciences Kansas State University Lecture 10 of 42 CIS 530 / 730 Artificial Intelligence © 2004 S. Russell & P. Norvig. Reused with permission. Nondeterministic Games: Review

Computing & Information Sciences Kansas State University Lecture 10 of 42 CIS 530 / 730 Artificial Intelligence Adapted from slides © 2004 S. Russell & P. Norvig. Reused with permission. Commonsense Example – Statement: Review Day 1 Day 2 Day 3

Computing & Information Sciences Kansas State University Lecture 10 of 42 CIS 530 / 730 Artificial Intelligence © 2004 S. Russell & P. Norvig. Reused with permission. Commonsense Example – Analysis: Review

Computing & Information Sciences Kansas State University Lecture 10 of 42 CIS 530 / 730 Artificial Intelligence Learning = Improving with Experience at Some Task  Improve over task T,  with respect to performance measure P,  based on experience E. Example: Learning to Play Checkers  T: play games of checkers  P: percent of games won in tournament  E: opportunity to play against self Refining the Problem Specification: Issues  What experience?  What exactly should be learned?  How shall it be represented?  What specific algorithm to learn it? Defining the Problem Milieu  Performance element: How shall the results of learning be applied?  How shall performance element be evaluated? Learning system? Segue: From Games to Knowledge Representation & Learning Adapted from materials © 1997 T. M. Mitchell. Reused with permission.

Computing & Information Sciences Kansas State University Lecture 10 of 42 CIS 530 / 730 Artificial Intelligence Type of Training Experience  Direct or indirect?  Teacher or not?  Knowledge about the game (e.g., openings/endgames)? Problem: Is Training Experience Representative (of Performance Goal)? Software Design  Assumptions of the learning system: legal move generator exists  Software requirements: generator, evaluator(s), parametric target function Choosing a Target Function  ChooseMove: Board  Move (action selection function, or policy)  V: Board  R (board evaluation function)  Ideal target V; approximated target  Goal of learning process: operational description (approximation) of V Learning to Play Checkers: Experience and Target Function Adapted from materials © 1997 T. M. Mitchell. Reused with permission.

Computing & Information Sciences Kansas State University Lecture 10 of 42 CIS 530 / 730 Artificial Intelligence Possible Definition  If b is a final board state that is won, then V(b) = 100  If b is a final board state that is lost, then V(b) = -100  If b is a final board state that is drawn, then V(b) = 0  If b is not a final board state in the game, then V(b) = V(b’) where b’ is best final board state according to Minimax (optimal play to end of game)  Correct values, but not operational Choosing Representation for Target Function  Collection of rules?  Neural network?  Polynomial function (e.g., linear, quadratic combination) of board features?  Other? Representation for Learned Function   bp/rp = number of black/red pieces; bk/rk = number of black/red kings; bt/rt = number of black/red pieces threatened (can be taken next turn) Learning to Play Checkers: Representation of Evaluation Function Adapted from materials © 1997 T. M. Mitchell. Reused with permission.

Computing & Information Sciences Kansas State University Lecture 10 of 42 CIS 530 / 730 Artificial Intelligence Obtaining Training Examples  the target function  the learned function  the training value One Rule For Estimating Training Values:  Choose Weight Tuning Rule  Least Mean Square (LMS) weight update rule: REPEAT  Select a training example b at random  Compute the error(b) for this training example  For each board feature f i, update weight w i as follows: where c is small, constant factor to adjust learning rate Learning to Play Checkers: Training Procedure, Gradient Function Adapted from materials © 1997 T. M. Mitchell. Reused with permission.

Computing & Information Sciences Kansas State University Lecture 10 of 42 CIS 530 / 730 Artificial Intelligence Completed Design Determine Representation of Learned Function Polynomial Linear function of six features Artificial neural network Determine Learning Algorithm Gradient descent Linear programming Determine Type of Training Experience Games against experts Games against self Table of correct moves Determine Target Function Board  value Board  move Learning to Play Checkers: Design Choices Adapted from materials © 1997 T. M. Mitchell. Reused with permission.

Computing & Information Sciences Kansas State University Lecture 10 of 42 CIS 530 / 730 Artificial Intelligence Section III: Knowledge and Reasoning

Computing & Information Sciences Kansas State University Lecture 10 of 42 CIS 530 / 730 Artificial Intelligence © 2004 S. Russell & P. Norvig. Reused with permission. Chapter 7: Overview

Computing & Information Sciences Kansas State University Lecture 10 of 42 CIS 530 / 730 Artificial Intelligence Knowledge base = set of sentences in a formal 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 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 and algorithms that manipulate them Adapted from slide © 2004 S. Russell & P. Norvig. Reused with permission. Knowledge bases

Computing & Information Sciences Kansas State University Lecture 10 of 42 CIS 530 / 730 Artificial Intelligence © 2004 S. Russell & P. Norvig. Reused with permission. Simple Knowledge-Based Agent

Computing & Information Sciences Kansas State University Lecture 10 of 42 CIS 530 / 730 Artificial Intelligence Performance measure  gold +1000, death  -1 per step, -10 for 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 Actuators: Left turn, Right turn, Forward, Grab, Release, Shoot Sensors: Stench, Breeze, Glitter, Bump, Scream Adapted from slides © 2004 S. Russell & P. Norvig. Reused with permission. Wumpus World [1]: Peas Description

Computing & Information Sciences Kansas State University Lecture 10 of 42 CIS 530 / 730 Artificial Intelligence Adapted from slides © 2004 S. Russell & P. Norvig. Reused with permission. Wumpus World Xtreme!

Computing & Information Sciences Kansas State University Lecture 10 of 42 CIS 530 / 730 Artificial Intelligence Fully Observable? No – only local perception Deterministic? Yes – outcomes exactly specified Episodic? No – sequential at the level of actions Static? Yes – Wumpus and Pits do not move Discrete? Yes Single-agent? Yes – Wumpus is essentially a natural feature Wumpus World [2]: Characterization Based on slide © 2004 S. Russell & P. Norvig. Reused with permission.

Computing & Information Sciences Kansas State University Lecture 10 of 42 CIS 530 / 730 Artificial Intelligence Adapted from slides © 2004 S. Russell & P. Norvig. Reused with permission. Exploring Wumpus OK S W P

Computing & Information Sciences Kansas State University Lecture 10 of 42 CIS 530 / 730 Artificial Intelligence Other Safe Actions © 2004 S. Russell & P. Norvig. Reused with permission.

Computing & Information Sciences Kansas State University Lecture 10 of 42 CIS 530 / 730 Artificial Intelligence Logic in General © 2004 S. Russell & P. Norvig. Reused with permission.

Computing & Information Sciences Kansas State University Lecture 10 of 42 CIS 530 / 730 Artificial Intelligence Entailment © 2004 S. Russell & P. Norvig. Reused with permission.

Computing & Information Sciences Kansas State University Lecture 10 of 42 CIS 530 / 730 Artificial Intelligence Models (Possible Worlds Semantics) Based on slide © 2004 S. Russell & P. Norvig. Reused with permission.

Computing & Information Sciences Kansas State University Lecture 10 of 42 CIS 530 / 730 Artificial Intelligence Entailment in Wumpus World Based on slide © 2004 S. Russell & P. Norvig. Reused with permission.

Computing & Information Sciences Kansas State University Lecture 10 of 42 CIS 530 / 730 Artificial Intelligence Wumpus Models [1] © 2004 S. Russell & P. Norvig. Reused with permission.

Computing & Information Sciences Kansas State University Lecture 10 of 42 CIS 530 / 730 Artificial Intelligence Wumpus Models [2] © 2004 S. Russell & P. Norvig. Reused with permission.

Computing & Information Sciences Kansas State University Lecture 10 of 42 CIS 530 / 730 Artificial Intelligence Terminology Game Trees  Expectiminimax: Minimax with alpha-beta (α-β) pruning and chance nodes  “Averaging over clairvoyance”: expectation applied to hidden info  Quiescence: state of “calmness” in play PEAS (Performance, Environment, Actuators, Sensors) Specifications Wumpus World: Toy Domain Intro to Knowledge Representation (KR) and Logic  Logic  Formal language for representing information  Supports reasoning and learning  Sentences: units of logic Models: Interpretation (Denotation, Meaning) of Sentences  Possible worlds semantics: assigns sets of models to all sentences  Entailment: all models of left-hand side (LHS) are models of right (RHS) Next: Propositional Logic

Computing & Information Sciences Kansas State University Lecture 10 of 42 CIS 530 / 730 Artificial Intelligence Last Class: Game Trees, Search Concluded  Minimax with alpha-beta (α-β) pruning  Expectiminimax: dealing with nondeterminism and imperfect information  “Averaging over clairvoyance” and when/why it fails  Quiescence and the horizon effect Today: Intro to Knowledge Representation (KR) and Logic  Logic as formal language  Representation: foundation of reasoning and learning  Logical entailment Wumpus World: PEAS Specification and Logical Description Reasoning Examples Possible Worlds Semantics: Models and Meaning Next Week: Propositional and First-Order Logic  Propositional logic  Resolution theorem proving in propositional logic  First-order predicate calculus (FOPC) aka first order logic (FOL) Summary Points