Docsity

Understanding Entailment, Models, and Inference in Propositional Logic: Logic & Reasoning , Study notes of Computer Science

Partial preview of the text

Download Understanding Entailment, Models, and Inference in Propositional Logic: Logic & Reasoning and more Study notes Computer Science in PDF only on Docsity!

Last update: October 9, 2008

Logical agents

CMSC 421: Chapter 7

Outline

♦ Knowledge-based agents

♦ Wumpus world

♦ Logic in general—models and entailment

♦ Propositional (Boolean) logic

♦ Equivalence, validity, satisfiability

♦ Inference rules and theorem proving

  • forward chaining
  • backward chaining
  • resolution

A simple knowledge-based agent

function KB-Agent( percept) returns an action static: KB, a knowledge base t, a counter, initially 0, indicating time Tell(KB, Make-Percept-Sentence( percept, t)) action ← Ask(KB, Make-Action-Query(t)) Tell(KB, Make-Action-Sentence(action, t)) t ← t + 1 return action

The agent must be able to: Represent states, actions, etc. Incorporate new percepts Update internal representations of the world Deduce hidden properties of the world Deduce appropriate actions

Wumpus World PEAS description

Environment One wumpus, one heap of gold P (pit) = 0. 2 for each square 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

Breeze Breeze

Breeze

Breeze Breeze

Stench

Stench

Breeze PIT

PIT

PIT 1 2 3 4

1

2

3

4

START

Gold

Stench

Performance measure gold +1000, death − 1000 , − 1 per step, − 10 for using the arrow

Actuators Left turn, Right turn, Forward, Grab, Release, Shoot

Sensors Breeze, Glitter, Smell

Wumpus world characterization

Fully observable? No—only local perception

Deterministic?

Wumpus world characterization

Fully observable? No—only local perception

Deterministic? Yes—outcomes exactly specified

Episodic?

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, pits, and gold do not move

Discrete?

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, pits, and gold do not move

Discrete? Yes

Single-agent?

Exploring a wumpus world

A

OK

OK OK

Exploring a wumpus world

OK

OK OK

A

A

B

Exploring a wumpus world

OK

OK OK

A

A

B

P?

P?

A

S

Exploring a wumpus world

OK

OK OK

A

A

B

P?

P?

A

S

OK

P

W

Exploring a wumpus world

OK

OK OK

A

A

B

P?

P?

A

S

OK

P

W

A

OK

OK

Exploring a wumpus world

OK

OK OK

A

A

B

P?

P?

A

S

OK

P

W

A

OK

OK

A

BGS