Download presentation
Presentation is loading. Please wait.
Published byAshley Johnson Modified over 9 years ago
1
CHA2555 Week2: Knowledge Representation, Logic and Planning Lee McCluskey Email lee@hud.ac.uklee@hud.ac.uk First term: http://scom.hud.ac.uk/scomtlm/cha2555/
2
Artform Research Group Introduction n What is Knowledge Representation? u Does a book represent knowledge? u Does a database represent knowledge? n What are the requirements for representing knowledge? u Separation of behaviour and knowledge – implement ‘generic’ behaviours u Maintaining knowledge needs to be easy - add more knowledge and behaviour improves n Which ways are used to represent knowledge? n Why do we want to represent knowledge? Can we have AI without it?
3
Artform Research Group Symbolic Knowledge Representation n Databases – represent sets of facts n “Knowledge” tends to be represented using “Logic”, where facts are considered as simple assertions n E.g. current law on marriage / gender etc male(fred), married(fred,hilary) [FACTS] For all people x,y : married(x,y) and male(x) => female(y) male(x) v female(y) not (male(x) and female(x)) [LOGIC about people – properties and relations] Encode “reasoning” into programs => hilary is female
4
Artform Research Group Deeper example of Knowledge Representation: Representing an Action in “PDDL” Example - moving a block from x to z PDDL uses an “operator schema” or simply operator: (:action move :parameters (?x – block ?y – block ?z - block) :precondition (and (clear ?x) (clear ?z) (on ?x ?y) (not (= ?x ?z))) :effect (and (not (clear ?z)) (clear ?y) (not (on ?x ?y)) (on ?x ?z)))
5
Artform Research Group Implementing “AI” behaviour Languages for implementing behaviours Symbolic Conceptualisation and/or Model Including knowledge representation Application Domain Prolog C++ Java “Semantic difference” LISP Haskell
6
Artform Research Group Automated (AI) Planning The scope of ‘AI Planning’ is the synthesis (generation) and execution of PLANS. That is, AI Planners reason with actions and generate plans.
7
Artform Research Group Automated Planning i/o definition Input: a Goal or Task, Current Situation Process: Reasoning with [knowledge representations] of Actions, Objects Goal, States, Constraints, Resources etc Output: an ordering of specific actions [= plan] which achieves/solves/enacts the Goal or Task
8
Artform Research Group Planning: Example Applications n AUTOMATIC CONTROL: of industrial processes, traffic, industrial robots, spacecraft, underwater robots n Eg NASA’s Remote Agent Experiment n CRISIS MANAGEMENT: in military applications, accidents, evacuations, forest fire fighting n USER SUPPORT: for project planning, web search, web service composition n SIMULATION: games software AI Planning has to be cost effective - n makes plans more quickly than people? more reliable plans? more efficient plans?
9
Artform Research Group r1 r3 r5 r7 r4 r2 bracelet locket ring +Sword +Cudgel Key-1 r6 p45 Key-2 troll orc p57 p25 p35 p24 p47 Sample Goal = Boromir kills Troll Aragorn acquiresThe Ring p56 Aragorn Boromir +Knife shield spell golem lock-2 lock-1 p67 p12 8: MOVE_INTO_ROOM P67 BOROMIR R6 R7 9: MOVE_TO_PASSAGE P67 BOROMIR R7 10: EXCHANGE BOROMIR R7 P67 LOCKET KEY1 11: MOVE_INTO_ROOM P67 BOROMIR R7 R6 12: MOVE_TO_PASSAGE P56 BOROMIR R6 13: MOVE_INTO_ROOM P56 BOROMIR R6 R5 14: UNLOCK_PASSAGE BOROMIR R5 P25 KEY1 15: MOVE_TO_PASSAGE P25 ARAGORN R5 16: MOVE_INTO_ROOM P25 ARAGORN R5 R2 17: FIGHT_AND_KILL_MONSTER ARAGORN R2 P12 SHIELD SWORD ORC 18: MOVE_TO_PASSAGE P12 ARAGORN R2 19: MOVE_INTO_ROOM P12 ARAGORN R2 R1 20: PICK_UP_TREASURE ARAGORN R1 RING 0: MOVE_TO_PASSAGE P67 BOROMIR R7 1: MOVE_TO_PASSAGE P45 ARAGORN R4 2: MOVE_INTO_ROOM P45 ARAGORN R4 R5 3: GET_PROTECTION ARAGORN R5 SHIELD 4: MOVE_INTO_ROOM P67 BOROMIR R7 R6 5: KILL_SLEEPING_MONSTER BOROMIR R6 P56 KNIFE TROLL 6: PICK_UP_TREASURE BOROMIR R6 LOCKET 7: MOVE_TO_PASSAGE P67 BOROMIR R6 PLAN generated by AI is shown opposite (its not optimal!)
10
Artform Research Group Usual (abstract) Architecture of Planners DOMAIN MODEL PLANNING ENGINE INTERFACE Knowledge representation“Behaviour” generation
11
Artform Research Group Simple Planning Domain Models n Domain models typically contain Types or classes of objects + Actions (represented by Operators) that change state of objects A TASK associated with a domain model is defined by: An INITIAL STATE + a GOAL CONDITION or STATE (:action move :parameters (?x – block ?y – block ?z - block) :precondition (and (clear ?x) (clear ?z)(on ?x ?y) (not (= ?x ?z))) :effect (and (not (clear ?z)) (clear ?y) (not (on ?x ?y)) (on ?x ?z)))
12
Artform Research Group Simple Planning Domain Models n Domain models typically contain 1. Types or classes of objects 2. Actions (represented by Operators) that change state of objects A TASK associated with a domain model is defined by: 1. An INITIAL STATE 2. GOAL(S)
13
Artform Research Group Environmental Assumptions n In simple ‘applications’ we ASSUME: finite world (rather than infinite) deterministic actions (rather than non- deterministic) completely observable (rather than partially observable) instantaneous (rather than durative actions) unchanging, closed world (rather than open, dynamic world) infinite resources
14
Artform Research Group Environmental Assumptions n The “FRAME PROBLEM” is a source of concern in AI planning – the logic of stating what is not affected by an action n Often we assume an action satisfies the RULE of DEFAULT PERSISTENCE: If an action specification does not specify that a fact / object changes then it does not change.. things persist by default
15
Artform Research Group PLANS in AI Planning Are what planners generate. They are partial orders or sequences of instantiated operator schemas. They should be: n CORRECT - preconditions are satisfied n COMPLETE - achieve the final goal n OPTIMAL - no shorter or more efficient plan exists
16
Artform Research Group Summary Knowledge Representation – encoding knowledge so that it can be updated and used by reasoning processes Planning is an important subarea of AI. Planning programs input “domain models” (often lists of operator schema), problem specifications (often initial states and goal conditions) and generate plans.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.