1 / 20

AI – Week 16 Machine Learning Applied to AI Planning

AI – Week 16 Machine Learning Applied to AI Planning. Lee McCluskey, room 2/09 Email lee@hud.ac.uk http://scom.hud.ac.uk/scomtlm/cha2555/. Machine Learning applied to AI Planning. 2 main ways --- Refining the knowledge you already have

kennan
Download Presentation

AI – Week 16 Machine Learning Applied to AI Planning

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. AI – Week 16 Machine Learning Applied to AI Planning Lee McCluskey, room 2/09 Email lee@hud.ac.uk http://scom.hud.ac.uk/scomtlm/cha2555/

  2. Machine Learning applied to AI Planning 2 main ways --- • Refining the knowledge you already have Automated Skill Acquisition - learning heuristics / macros. Make planners generate plans more quickly, generate better plans, solve problems they couldn’t solve before. • Gaining new knowledge from the environment Automated Knowledge Acquisition: learning the domain model. Make planners be able to plan in new environments by eg inducing operator schema from example plans

  3. Part 1: Refining the knowledge you already have • Learning macros cf week 13 – RECALL Example.. move(R,A,B) pre: at(R,A), A \= B eff+: at(R,B) eff-: at(R,A)   load(R,C,L) pre: at(R,L), at(C,L) eff+: in(C,R) eff-: at(C,L) unload(R,C,L) pre: at(R,L), in(C,R) eff+: at(C,L) eff-: in(C,R) Planning problem and solution: initial state = at(r1, london), at(r2, london), at(c1,paris), at(c2,paris) goal = in(c1,r1), in(c2,r1) Solution = [move(r1, london, paris), load(r1, c1,paris), load(r1, c1,paris)]

  4. WP Technique – cf week 13 WP( T, G) = WP'(reverse(T),G) WP'( empty list, G) = G WP'(T,G) = WP'( tail(T),  pre(head(T)) U (G \ eff+(head(T))). head(T) = load(r1, c1,paris)] G = in(c1,r1), in(c2,r1)

  5. WP Technique – cf week 13 WP( T, G) = WP'(reverse(T),G) WP'( empty list, G) = G WP'(T,G) = WP'( tail(T),  pre(head(T)) U (G \ eff+(head(T))). head(T) = load(r1, c1,paris)] G = in(c1,r1), in(c2,r1) at(r1,paris),  at(c1,paris), in(c2,r1)

  6. WP Technique – cf week 13 WP( T, G) = WP'(reverse(T),G) WP'( empty list, G) = G WP'(T,G) = WP'( tail(T),  pre(head(T)) U (G \ eff+(head(T))). head(T) = load(r, c1,paris)] [load(r1, c1,paris), move(r1,london,paris)] G = in(c1,r1), in(c2,r1) …. at(r1,paris),  at(c1,paris), in(c2,r1)

  7. WP Technique – cf week 13 WP( T, G) = WP'(reverse(T),G) WP'( empty list, G) = G WP'(T,G) = WP'( tail(T),  pre(head(T)) U (G \ eff+(head(T))). head(T) = load(r1, c1,paris)] [load(r1, c1,paris), move(r1,london,paris)] G = in(c1,r1), in(c2,r1) at(r1,london), london =/ paris,  at(c1,paris), at(c2,paris) …. at(r1,paris),  at(c1,paris), in(c2,r1)

  8. Macro Creation Assemble Macro: (G, WP(T,G), T) Means “to solve G when WP(T,G) is in the initial state, use T” ( {in(c1,r1), in(c2,r1)}, {at(r1,london), london =/ paris,  at(c1,paris), at(c2,paris)}, [  move(r1, london, paris), load(r1, c1,paris), load(r1, c1,paris) ] )Generalised Macro: ( {in(?c1,?r1), in(?c2,?r1)}, {at(?r1,?1l), ?l1 =/ ?l2,  at(?c1,?l2), at(?c2,?l2)}, [  move(?r1, ?l1, ?l2), load(?r1, ?c1,?l2), load(?r1, ?c1,?l2) ] )

  9. FORWARD, STATE SPACE SEARCH A3 SOLUTION NODE INITIAL STATE A2 A1 Artform Research Group

  10. MACRO USE : FORWARD, STATE SPACE SEARCH WITH MACROS A3 SOLUTION NODE INITIAL STATE A2 X Could get to a solution in a one step!! = macro X provides the steps in [A1,A2,A3] So no need for long search. A1 Artform Research Group

  11. MACRO USE : FORWARD, STATE SPACE SEARCH WITH MACROS - PROBLEMS A3 SOLUTION NODE INITIAL STATE A2 X BUT number of instances of (generalised) macros may be huge  This called the UTILITY problem. Machine Learning systems much be CAREFUL in what is learned. A1 Artform Research Group

  12. Part 2: Gaining New Knowledge From the Environment • Knowledge Acquisition and Knowledge Engineering are processes of eliciting and encoding knowledge in a way that intelligent processes can use effectively. KA/KE are normally done by people. • Some AI programs need an explicit KB and some don’t Before we look at programs that learn by acquiring knowledge for themselves, lets consider what KA/KE mean.

  13. KA/KE for AI Planning: Terminology Real or Conceptualised World Symbolic World DOMAIN = APPLICATION AREA Knowledge Acquisition Domain Model Domain Model Language Knowledge Engineering (KE)

  14. General KB created by “manual” KA/KE [(one_or_both_of Segment1 and Segment2 are_flown_at_subsonic_speed) & ( the_Aircraft_on(Segment1) and the_Aircraft_on(Segment2) meet_mnps) & ( the_Aircraft_on(Segment1) and the_Aircraft_on(Segment2) are_jets & (the_Profile_containing(Segment1) & the_Profile_containing(Segment2) are_wholly_or_partly_in_the_ mnps_airspace) ] => [(the_basic_min_longitudinal_sep _Val_in_mins_required_for Segment1 and Segment2) = 10 <=> …. ETC

  15. Planning KB created by “manual” KA/KE Eg PDDL domain model and problem spec files …………… (:action stack :parameters ( ?P - block ?A - block) :precondition (and (clear ?A) (holding ?P)) :effect (and (not (holding ?P)) (not (clear ?A))(on ?P ?A) )) …………… ……………

  16. KA/KE in AI Planning KA/KE for planning is hard because: • Its knowledge about CHANGE, rather than static or purely descriptive knowledge i.e. its hard to represent knowledge about time, events, actions, processes etc • Planning is a synthetic task i.e. it puts together or creates something – harder than e.g. diagnosis • KE different from SE because we are trying to encode “rich” data to be acted on by reasoning processes which rely on heuristics or approximation to work.

  17. Using Machine Learning for KA/KE One Way: Give a learning system a number of PLANS, or let it “observe” plans e.g. fetch_jack jack1 boot1 remove_wheel wheel0 hub0 jack0 jack_up hub1 jack1 Get the learning system to learn the details of the actions by “inducing” the operator schema

  18. Workflow Example Trace of Changing a Car Wheel fetch_jack jack1 boot1 remove_wheel wheel0 hub0 jack0 jack_up hub1 jack1 put_on_wheel wheel2 hub0 jack0 fetch_wrench wrench0 boot0 jack_down hub1jack1 putaway_wrench wrench1 boot0 ………………..etc (:action remove_wheel :parameters (?Wheel1 - wheel ?Hub2 - hub ?Jack3 - jack) :precondition (and (wheel_state2 ?Wheel1 ?Hub2) (hub_state1 ?Hub2 ?Jack3 ?Wheel1) (jack_state1 ?Jack3 ?Hub2)) :effect (and (wheel_state1 ?Wheel1) (not (wheel_state2 ?Wheel1 ?Hub2)) (hub_state0 ?Hub2 ?Jack3) (not (hub_state1 ?Hub2 ?Jack3 ?Wheel1)) (jack_state0 ?Jack3 ?Hub2) (not (jack_state1 ?Jack3 ?Hub2))) ) Induction Meaning of “remove_wheel” Action in Planning-ready format

  19. Inducing Domain Models - Game Example Trace of FreeCell Game Send to home .. Move to Free cell .... Move to Free Cell .... Move to column .... Send to home ... (:action sendtohome : parameters (?card - card ?suit - suitsort ?vcard - denomination ?homecard - card ?vhomecard ?cols ?ncols - denomination) :precondition (and (clear ?card) (bottomcol ?card) (home ?homecard) (suit ?card ?suit) (suit ?homecard ?suit) (value ?card ?vcard) (value ?homecard ?vhomecard) (successor ?vcard ?vhomecard) (colspace ?cols) (successor ?ncols ?cols)) : effect (and (home ?card) (colspace ?ncols) (not (home ?homecard)) (not (clear ?card)) (not (bottomcol ?card)) (not (colspace ?cols)))) Induction Meaning of “Send to home” Action in Planning-ready format

  20. Conclusion • Learning can be classed as Knowledge Refinement (eg learning to perform better) or Knowledge Acquisition (eg learning new domains, new knowledge) • This can be applied to planning: -Knowledge Refinement: Learning macros (this week) -Knowledge Acquisition: Learning PDDL operator schema (next week) [-- or how you can get a program to do your coursework ]

More Related