Planning and Theorem Proving
Slides by Svetlana Lazebnik, 9/2016 with modifications by Mark Hasegawa-Johnson, 2/2020
CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=18656684
Planning and Theorem Proving Slides by Svetlana Lazebnik, 9/2016 - - PowerPoint PPT Presentation
Planning and Theorem Proving Slides by Svetlana Lazebnik, 9/2016 with modifications by Mark Hasegawa-Johnson, 2/2020 CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=18656684 Planning and Theorem Proving Examples Automatic
Slides by Svetlana Lazebnik, 9/2016 with modifications by Mark Hasegawa-Johnson, 2/2020
CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=18656684
https://en.wikipedia.org/wiki/River_crossing_puzzle
bag of beans to get across the river
goat
bag of beans
https://en.wikipedia.org/wiki/River_crossing_puzzle
fgb -----(farmer, goat)----à fGb fGb ß-----(farmer)-----------
Fgb ß--(farmer,goat)------
FgB ß-------(farmer)--------
Denver, Edmonton, and Fairbanks
Moines, El Paso, and Frisco
time.
”Simultaneous Selective Disassembly and End-of-Life Decision Making for Multiple Products That Share Disassembly Operations,” Sara Behdad, Minjung Kwak, Harrison Kim and Deborah Thurston. J. Mech. Des 132 132(4), 2010, doi:10.1115/1.4001207
sequence in which you can disassemble a product at the end of its life
product in order to make disassembly as cheap as possible
https://en.wikipedia.org/wiki/Tower_of_Hanoi
Description English: This is a visualization generated with the walnut based on my implementation at [1] of the iterative algorithm described in Tower of Hanoi Date 30 April 2015 Source I designed this using http://thewalnut.io/ Author Trixx
𝑇𝑓𝑜𝑢𝑓𝑜𝑑𝑓 → 𝐺𝑣𝑜𝑑𝑢𝑗𝑝𝑜 𝑈𝑓𝑠𝑛, … | ¬ 𝑇𝑓𝑜𝑢𝑓𝑜𝑑𝑓 | 𝑇𝑓𝑜𝑢𝑓𝑜𝑑𝑓 ∧ 𝑇𝑓𝑜𝑢𝑓𝑜𝑑𝑓 | 𝑇𝑓𝑜𝑢𝑓𝑜𝑑𝑓 ∨ 𝑇𝑓𝑜𝑢𝑓𝑜𝑑𝑓 | 𝑇𝑓𝑜𝑢𝑓𝑜𝑑𝑓 ⟹ 𝑇𝑓𝑜𝑢𝑓𝑜𝑑𝑓 | 𝑇𝑓𝑜𝑢𝑓𝑜𝑑𝑓 ⟺ 𝑇𝑓𝑜𝑢𝑓𝑜𝑑𝑓 | 𝑅𝑣𝑏𝑜𝑢𝑗𝑔𝑗𝑓𝑠 𝑊𝑏𝑠𝑗𝑏𝑐𝑚𝑓, … 𝑇𝑓𝑜𝑢𝑓𝑜𝑑𝑓 𝑈𝑓𝑠𝑛 → 𝐺𝑣𝑜𝑑𝑢𝑗𝑝𝑜 𝑈𝑓𝑠𝑛 𝑊𝑏𝑠𝑗𝑏𝑐𝑚𝑓 𝐷𝑝𝑜𝑡𝑢𝑏𝑜𝑢 𝑅𝑣𝑏𝑜𝑢𝑗𝑔𝑗𝑓𝑠 → ∃ | ∀
A “sentence” is
A “term” is an evaluated function, or a variable, or a constant. A “quantifier” is “there exists,” or “for all.”
English First-Order Logic Notation It is a crime for Americans to sell weapons to hostile nations. 𝐵𝑛𝑓𝑠𝑗𝑑𝑏𝑜 𝑦 ∧ 𝑋𝑓𝑏𝑞𝑝𝑜 𝑧 ∧ 𝑇𝑓𝑚𝑚𝑡 𝑦, 𝑧, 𝑨 ∧ 𝐼𝑝𝑡𝑢𝑗𝑚𝑓 𝑨 ⟹ 𝐷𝑠𝑗𝑛𝑗𝑜𝑏𝑚(𝑦) Colonel West sold missiles to Ganymede. ∃𝑦, 𝑁𝑗𝑡𝑡𝑗𝑚𝑓(𝑦) ∧ 𝑇𝑓𝑚𝑚𝑡(𝑋𝑓𝑡𝑢, 𝑦, 𝐻𝑏𝑜𝑧𝑛𝑓𝑒𝑓) Colonel West is American. 𝐵𝑛𝑓𝑠𝑗𝑑𝑏𝑜(𝑋𝑓𝑡𝑢) Ganymede is an enemy of America. 𝐹𝑜𝑓𝑛𝑧(𝐻𝑏𝑜𝑧𝑛𝑓𝑒𝑓, 𝐵𝑛𝑓𝑠𝑗𝑑𝑏) Missiles are weapons. 𝑁𝑗𝑡𝑡𝑗𝑚𝑓(𝑦) ⟹ 𝑋𝑓𝑏𝑞𝑝𝑜(𝑦) An enemy of America is a hostile nation. 𝐹𝑜𝑓𝑛𝑧(𝑦, 𝐵𝑛𝑓𝑠𝑗𝑑𝑏) ⟹ 𝐼𝑝𝑡𝑢𝑗𝑚𝑓(𝑦)
Can we prove the theorem: 𝐷𝑠𝑗𝑛𝑗𝑜𝑏𝑚(𝑋𝑓𝑡𝑢)? First-Order Logic Notation 𝐵𝑛𝑓𝑠𝑗𝑑𝑏𝑜 𝑦 ∧ 𝑋𝑓𝑏𝑞𝑝𝑜 𝑧 ∧ 𝑇𝑓𝑚𝑚𝑡 𝑦, 𝑧, 𝑨 ∧ 𝐼𝑝𝑡𝑢𝑗𝑚𝑓 𝑨 ⟹ 𝐷𝑠𝑗𝑛𝑗𝑜𝑏𝑚(𝑦) ∃𝑦, 𝑁𝑗𝑡𝑡𝑗𝑚𝑓(𝑦) ∧ 𝑇𝑓𝑚𝑚𝑡(𝑋𝑓𝑡𝑢, 𝑦, 𝐻𝑏𝑜𝑧𝑛𝑓𝑒𝑓) 𝐵𝑛𝑓𝑠𝑗𝑑𝑏𝑜(𝑋𝑓𝑡𝑢) 𝐹𝑜𝑓𝑛𝑧(𝐻𝑏𝑜𝑧𝑛𝑓𝑒𝑓, 𝐵𝑛𝑓𝑠𝑗𝑑𝑏) 𝑁𝑗𝑡𝑡𝑗𝑚𝑓(𝑦) ⟹ 𝑋𝑓𝑏𝑞𝑝𝑜(𝑦) 𝐹𝑜𝑓𝑛𝑧(𝑦, 𝐵𝑛𝑓𝑠𝑗𝑑𝑏) ⟹ 𝐼𝑝𝑡𝑢𝑗𝑚𝑓(𝑦)
and 𝑁𝑗𝑡𝑡𝑗𝑚𝑓(𝑦) ⟹ 𝑋𝑓𝑏𝑞𝑝𝑜(𝑦)
and 𝐹𝑜𝑓𝑛𝑧(𝑦, 𝐵𝑛𝑓𝑠𝑗𝑑𝑏) ⟹ 𝐼𝑝𝑡𝑢𝑗𝑚𝑓(𝑦)
and 𝐵𝑛𝑓𝑠𝑗𝑑𝑏𝑜 𝑋𝑓𝑡𝑢 , 𝑋𝑓𝑏𝑞𝑝𝑜 𝑁 , 𝑇𝑓𝑚𝑚𝑡 𝑋𝑓𝑡𝑢, 𝑁, 𝐻𝑏𝑜𝑧𝑛𝑓𝑒𝑓 , 𝐼𝑝𝑡𝑢𝑗𝑚𝑓(𝐻𝑏𝑜𝑧𝑛𝑓𝑒𝑓)
(Question to ponder: how do you disprove a target sentence?)
several states at level n-1.
each action
necessary.
𝑞!, 𝑞", 𝑞! ⟹ 𝑟!, 𝑞" ⟹ 𝑟", 𝑟! ∧ 𝑟" ⟹ 𝑟# 𝑞!, 𝑞", 𝑞! ⟹ 𝑟!, 𝑞" ⟹ 𝑟", 𝑟! ∧ 𝑟" ⟹ 𝑟#, 𝑟! 𝑞!, 𝑞", 𝑞! ⟹ 𝑟!, 𝑞" ⟹ 𝑟", 𝑟! ∧ 𝑟" ⟹ 𝑟#, 𝑟" 𝑞!, 𝑞", 𝑞! ⟹ 𝑟!, 𝑞" ⟹ 𝑟", 𝑟! ∧ 𝑟" ⟹ 𝑟#, 𝑟!, 𝑟", 𝑟# Initial State Search ”Tree” Level 1 Search ”Tree” Level 2: Goal Achieved
includes the target sentence
sentences}
sentence, in order to generate a new set of desired sentences
“known sentences”
KNOWN: 𝑞!, 𝑞", 𝑞! ⟹ 𝑟!, 𝑞" ⟹ 𝑟", 𝑟! ∧ 𝑟" ⟹ 𝑟# DESIRED: {𝑟#} DESIRED: 𝑟!, 𝑟" Initial State Search Tree Level 1 Search Tree Level 2 DESIRED: 𝑞!, 𝑟" DESIRED: 𝑟!, 𝑞" DESIRED: 𝑞!, 𝑞" DESIRED: 𝑞!, 𝑞" Search Tree Level 3: Goal Achieved
planning framework from the 1970s
as its precondition, that the boat is empty.
For example: “the goat is now in the boat.”
preconditions.
precondition, the sentence ¬Boat(goat).
contradictory sentences. For example, you can’t combine the states {p,q} and {p,¬q} to get the state {p,q,¬q}.
Starting with the start state, find all applicable actions (actions for which preconditions are satisfied), compute the successor state based on the effects, keep searching until goals are met
𝑀𝑓𝑔𝑢 𝐺𝑝𝑦 , 𝑀𝑓𝑔𝑢 𝐻𝑝𝑏𝑢 , 𝑀𝑓𝑔𝑢(𝐶𝑓𝑏𝑜𝑡) 𝐶𝑝𝑏𝑢 𝐺𝑝𝑦 , 𝑀𝑓𝑔𝑢 𝐻𝑝𝑏𝑢 , 𝑀𝑓𝑔𝑢(𝐶𝑓𝑏𝑜𝑡) 𝑀𝑓𝑔𝑢 𝐺𝑝𝑦 , 𝐶𝑝𝑏𝑢 𝐻𝑝𝑏𝑢 , 𝑀𝑓𝑔𝑢(𝐶𝑓𝑏𝑜𝑡) 𝑀𝑓𝑔𝑢 𝐺𝑝𝑦 , 𝑀𝑓𝑔𝑢 𝐻𝑝𝑏𝑢 , 𝐶𝑝𝑏𝑢(𝐶𝑓𝑏𝑜𝑡) X X 𝑀𝑓𝑔𝑢 𝐺𝑝𝑦 , 𝑀𝑓𝑔𝑢 𝐻𝑝𝑏𝑢 , 𝑀𝑓𝑔𝑢(𝐶𝑓𝑏𝑜𝑡) 𝑀𝑓𝑔𝑢 𝐺𝑝𝑦 , 𝑆𝑗ℎ𝑢 𝐻𝑝𝑏𝑢 , 𝑀𝑓𝑔𝑢(𝐶𝑓𝑏𝑜𝑡)
Starting with the goal state (a set of target sentences),
sentence in the goal state).
target sentences.
state.
𝑆𝑗ℎ𝑢 𝐺𝑝𝑦 , 𝑆𝑗ℎ𝑢 𝐻𝑝𝑏𝑢 , 𝑆𝑗ℎ𝑢(𝐶𝑓𝑏𝑜𝑡) 𝐶𝑝𝑏𝑢 𝐺𝑝𝑦 , 𝑆𝑗ℎ𝑢 𝐻𝑝𝑏𝑢 , 𝑆𝑗ℎ𝑢(𝐶𝑓𝑏𝑜𝑡) 𝑆𝑗ℎ𝑢 𝐺𝑝𝑦 , 𝐶𝑝𝑏𝑢 𝐻𝑝𝑏𝑢 , 𝑆𝑗ℎ𝑢(𝐶𝑓𝑏𝑜𝑡) 𝑆𝑗ℎ𝑢 𝐺𝑝𝑦 , 𝑆𝑗ℎ𝑢 𝐻𝑝𝑏𝑢 , 𝐶𝑝𝑏𝑢(𝐶𝑓𝑏𝑜𝑡)
𝑆𝑗ℎ𝑢 𝐺𝑝𝑦 , 𝑆𝑗ℎ𝑢 𝐻𝑝𝑏𝑢 , 𝑆𝑗ℎ𝑢(𝐶𝑓𝑏𝑜𝑡) 𝑆𝑗ℎ𝑢 𝐺𝑝𝑦 , 𝑀𝑓𝑔𝑢 𝐻𝑝𝑏𝑢 , 𝑆𝑗ℎ𝑢(𝐶𝑓𝑏𝑜𝑡)
number of steps it would take to get from n to G, if problem constraints were relaxed --- this guarantees that h(n) is admissible
relaxing fewer constraints.
Heuristic #1: Count the number of actions necessary to generate all of the sentences in the goal state that aren’t already true.
Example: 6 people on left side of the river, we want 6 people
actions: h(n) = 3.
A planning graph is a trellis whose stages are:
requisites are available in “Sentences stage” 𝑇6
available in 𝑇6, plus any new sentences that could have been generated by any action in 𝐵6 And within each stage, we have:
also generate ¬𝑟, then the sentences 𝑞 and 𝑟 become mutex (mutually exclusive).
sentences are not mutex at stage 𝑇%, then they are also not mutex at 𝑇%&!
is possible at stage 𝐵%, then it is also possible at 𝐵%&!
Heuristic: # stages between the current stage and the first stage at which all of the goal-state sentences are no longer mutex
to represent the world state while finding or implementing a plan
“objects” in the problem!
formula (QBF)
$x1"x2 $x3"x4 (x1Ú¬x3Úx4)Ù(¬x2Úx3Ú¬x4)
$x1 $x2 $x3 $x4 (x1Ú¬x3Úx4)Ù(¬x2Úx3Ú¬x4)
between puzzles and games
from “fully observable” to “partially observable”