300 likes | 490 Views
Planning Techniques. Planning: The problem of finding some action to achieve some goal System’s Plan: The sequence of such actions is called System’s Plan. Means – Ends Analysis (MEA). MEA is a simple planning method in AI.
E N D
Planning Techniques Planning: The problem of finding some action to achieve some goal System’s Plan: The sequence of such actions is called System’s Plan
Means – Ends Analysis (MEA) • MEA is a simple planning method in AI. • “It is a technique which, rather than blindly searching through all possible actions, focuses on actions that reduce the difference between the current state an the target state”
Algorithm: • To find-plan (initial state, Target state) • If all the goals in target state are true in initial state then succeed • Otherwise • Select an unresolved goals fro target state • Find an action that adds goal to the current-state • Enable action by finding a plan (PREPLAN) that activeness its pre conditions i.e., find-plan (initial state, pre conditions.) Let Mid-state 1 be the result of applying that plan to initial state. • Apply action to Mid state 1 to give Mid state 1 to give Mid state 2 • Find a plan (post plan) from Mid state 2 to target state • Return a plan consisting of Preplan, Action, and Post Plan
Preplan • • • Action PostPlan Initial State Mid State ‘1’ Mid State ‘2’ Target State Example: “To pick a book from the Cupboard” Preplan: To walk to the Cupboard Action: To pick the book from Cupboard Post Plan: To walk back to the Original place.
A B Sarah Sarah’s Robot Box • Example • Target: Box with Sarah in Room A, with her ROBOT • Initial State: • Sarah and Robot in Room A • Door between A and B closed • Box in Room B • Problem Representation As a List: (All are true) • [at(robot, Room A), at (Box, Room B), at (Sarah, Room A), door-closed(Room A, Room B)] • [T ,T ,T .T] • (All are true)
Target: • [at(Box, Room A), at (Sarah, Room A), at (robot,( Room A), door-closed(Room A, Room B)] • We need to define certain actions: • Operators • Open(Room B, Room A), move (Room A, Room B), • Carry(Room B, Room A, Box), close(Room B, Room A). A B move Box pick break Open the door
Each Operator will have certain • Pre conditions to be applied • And will have have certain effects Example Pre-conditions Effects Open(Room A, Room B at(Robot, Room A door-closed(Room A, Room B) door-open (Room A, Room B). Move(Room A, Room B) at(Robot, Room A) door-open(Room A, Room B) at(Robot, Room B)
Production Systems • Important Tool for: - search algo • - modeling human problem solving • Consist of: - production rules • - working memory • - recognise-act control Cycle.
Production Rules (Productions) • Is a Condition – Action Pair Defines the associated problem-solving Step. Pattern that Determines when To apply rule
Working Memory • Contains the description of current state • This is compared with the production to determine the type of action required. • (Always changes when productions are applied)
Recognise – Act Cycle Initialise Working Memory • Productions - Conditions (if the two match) (Enabled) Conflict Set (one pattern taken at a time) Production - (Fired) Conflict Resolution
Conflict Set Productions can only fire when conditions in production-conditions are matched in the working memory (WM). If they match a subset of productions is formed called Conflict Set. ”Part of Production That Are Enabled” Conflict Resolution: It chooses a rule from conflict set for firing. Selection of any rule may be based on complex rule selection heuristics.
Pure Production Systems G A1 G A2 - - - - Pattern Action WM Patterns Systems in which no conflict resolution remains. All conflicts are resolved A Production System
Example: • Production Set: • ba ab • ca ac • cb bc The methods condition # 3 • Working Memory = acbcc • Pattern • Conflict Set = ‘3’ • Rule fired = 3 • abccc
Data Driven Search in Production System • Production Set: • p ^ q goal • r ^ s p • w ^ r q • t ^ u q • V s • Start v ^ y ^ q
Predicate Calculus and Planning • Functions of Robot Arm:- • goto (X,Y,Z) • pickup (W) • Put down (W) • Stack (U,V) • Unstack (U,V) b e a c d Block World • State: • location (A, X,Y,Z) • on (b, a) • clear (b) • gripping ( ) • On table (c)
b e a c d State 1 b e a c d State 2 State of the World Representation • Ontable(a) on(b,a) clear(b) • Ontable(c) on(e,d) clear(c) • Ontable(d) gripping(\) clear(e) Ontable(a) on(b,a) clear(b) Ontable(c) on(c) clear(d) Ontable(d) gripping(e) clear(e)
Using Production System • We define • Pre conditions (P) • Add (A) • Delete (D) • e.g., Pick up(X) P: gripping()^clear(x) ^ on table(x) may not be necessary A: gripping(x) D: on table(x)^ gripping(). may be replaced by on (X,Y)
b e a c d State 1 b e a c d State 2 State of the World Representation • Ontable(a) on(b,a) clear(b) • Ontable(c) on(e,d) clear(c) • Ontable(d) gripping(\) clear(e) Ontable(a) on(b,a) clear(b) Ontable(c) on(c) clear(d) Ontable(d) gripping(e) clear(e)
Program of Incompatible Sub goals b e a c d If in order to achieve some goal, other increases the computation sub goals are distributed load may send misleading signals to the control section Goals 1 On(b,a)^ on(a,c)^ on*d,e) Already true true Note: In order to reach goal on (b,a) has to be undone and then done again b a e Goal c d Incompatible Goals
Black Board Architecture • This extends production systems • Organises Working Memory in to Modules • It lumps separate “Production Rules” into single AGENTS
Black Board Architecture • Is used when coordination of multiple processes or knowledge sources is required • Example • Multiple Sensing Problem • Sensor S1: Alone does not significant information
Black Board: • Is a central global database for the communication of independent asynchronous knowledge sources focusing on related aspects of a particular problem. • Knowledge Source: (KS) • Gets data from the black board • Processes the data • Returns it to the black board
Summary Of The System • Knowledge Sources: Contains a set of independent modules called knowledge sources that contains the system domain special knowledge • Black Board: A Black Board, which is the shared data structure through which the knowledge sources communicate with each other • Control System: A control system which determines the order in which KSs will operate on the entries o the Board
Hearsay – II (Erman et.al 1980) • One of the first developed project • AIMED at speech recognition system