AI 笔记 Week 13 Logic & Planni

2018-09-24  本文已影响65人  我的名字叫清阳

This week you should do Lesson 9, Logic & Planning ,
and read Chapters 7-10 in Russell & Norvig. Additional readings can be found on the course schedule.

Readings on Logic and Planning
AIMA: Chapter 7-10 (Logic), Chapter 11-12 (Planning)

Introduction

Intro to Logic and Planning

Situation Calculus

Situation Calculus

Background and Expert Systems

historical perspective on the topic:

How is logic used today?

A: Eliminating much of the uncertainty of the real world and solving significant problems using logic. E.g., FedEx planning all the deliveries of its packages using its huge fleet of vehicles.

What directions do you think we will be seeing for planning algorithms in the future?

A: 1) learning from examples would be an important area. 2) Transfer learning across domains, 3) interactive planning.

In this section, we will cover:

  1. the resolution algorithm, an elegant way of inferring new knowledge from a knowledge base.
  2. Graphplan, and
  3. value iteration, which is a key concept for Markov decision processing.

Intro to Logic

How AI managing complexity and uncertainty?

This unit will concentrate on that third aspect of representation, showing how the tools of logic can be used by an agent to better model the world.

Propositional Logic

How to write logic statement

Truth table

Truth table

Truth Table Question

Given the truth table above, choose the box where the proposition sentence is True


Answer to the Truth Table Question

Quiz: Propositional Logic Question

In a particular model of the world, we know the following sentences are true. (E V B) => A, A => (J ^ M), and B. Of the propositional symbols, is that symbol true or false, or unknown in this model?

Answer to the Propositional Logic Question

Terminology

Propositional Logic Limitations

Propositional Logic Limitations

First-Order Logic

The content of the part: first-order logic and its relation to the other logics ( propositional logic and probability theory).

  1. what they say about the world, which we call the ontological commitment of these logics;
  2. what types of beliefs agents can have using these logics, which we call the epistemological commitments.
World and belief

Logics vary both in what you can say about the world and what you can believe about what's been said about the world.

Logic World Belief
first order logic relations about things in the world, objects, and functions on those objects. true or false or unknown.
Propositional logic facts facts are true or false or unknown
Probability theory facts (the symbols or variables) real number {0, 1}

How does first-order logic work? What does it do?

Models

Model in First-order logic

Syntax

image.png

Vaccum world

Vacuum World

Quiz: FOL Question

For each sentences, tell if it is 1) valid: O is true; 2)satisfiable, but not valid: that is, there's some models for which it is true; or 3) unsatisfiable: there are no models for which it is true.

FOL Question 2

Can the sentences represents: 1) "Sam has 2 jobs," 2) I want to represent the idea of set membership. And 3), define the notion of adjacent squares on, say, a checkerboard, where the squares are numbered with x and y coordinates and we want to just talk about adjacency in the horizontal and vertical direction.

Answer: the first one is but the second and third ones are not. Both the second and the third are incomplete. Second defines what is a member but did not define what is not. The third only defined adjacency in one direction.

Planning

Problem Solving Vs Planning

Planning Vs Execution

Now why do we have to interleave planning and execution?

Vacuum Cleaner Example

State space diagram: a room with 2 locations(A, and B), a vacuum cleaner, and dirt, and so that gives us 8 total states. 3 possible actions (moving right, moving left, and sucking up dirt)

Sensorless Vacumm Cleaner Problem

  1. belief states: contain multiple possible states. but if we execute actions, we can gain knowledge about the world even without sensing. E.g.: moving right will take the robot to the right-hand location; sucking can make the current location clear.
  2. in the belief state world going right and going left are not inverses.
  3. it's possible to form a plan that reaches a goal without ever observing the world. they are conform-it plans.
  4. quiz question, How to get from the state my current square is clean, but know nothing else, to the belief state where I know that I'm in the right-hand side location and that that location is clean?

Partially Observable Vacuum Cleaner Example (still in a deterministic world)

Stochastic Environment Problem

quize

Infinite Sequences


Continue with the example above, if we observe after the move action, and if the location is not changed after the "Right" action, it will repeat the action, until we observe the location is successfully changed. Then we suck. this uses finite symbols to represent an infinite sequence of action. It guaranteed success but we don't know how many steps the process will take.

Finding A Successful Plan

The process to find a plan is to establish a tree structure of the sequence and do a search from the start state to the target state.

Problem Solving Via Mathematical Notation

We could use Mathematical Notation to see if a sequence of questions can lead to goals.

Classical Planning 1

Classical Planning 2

image.png

Progression Search

Forward or progression state space search: Just like problem solving. Start in an initial state, and then start branching on the possible actions, and continue branching out like that until we hit a state which satisfied the goal predicate.

Regression Search

In Regression Search or backward search, we can start with the goal state, search the action schema to find out what action can lead to the goal, and then search which schema can lead to that schema, then repeat until we reach the initial state.

Regression Vs Progression (an example of book buying)

Plan Space Search

Searching through the space of plans:
In a forward search, we were searching through concrete world states. In a backward search, we were searching through abstract states in which some of the variables were unspecified.

Sliding Puzzle Example

16 and 8 puzzle example

Situation Calculus 1


Another planning called situation calculus. often for FOL. It's regular first order logic with a set of conventions for how to represent states and actions.

Situation Calculus 2

fluents: In situation calculus, predicates like At(p,x,s) which can vary from 1 situation to another are called fluents. They refer to a specific situation (the situation argument should be the last in the predicate).

2018-12-01 初稿
上一篇下一篇

猜你喜欢

热点阅读