220 likes | 415 Views
Final Exam. Tuesday, December 21st, 4:10-7pm 717 Hamilton Cumulative exam Slightly more focus on second half of class Logic and inference First order logic Planning Probabilistic Reasoning and Bayes Nets Machine learning Robotics Vision Natural Language processing. Review for Final.
E N D
Final Exam • Tuesday, December 21st, 4:10-7pm • 717 Hamilton • Cumulative exam • Slightly more focus on second half of class • Logic and inference • First order logic • Planning • Probabilistic Reasoning and Bayes Nets • Machine learning • Robotics • Vision • Natural Language processing
Review for Final Propositional Logic First Order Logic Planning
Logics • A logic is • Formal language for representing knowledge • Mechanism for reasoning • Propositional vs. first-order logic • Atomic facts vs. objects and relations • Connectives and evaluating truth tables • ⌐ Λ V
Semantics in propositional logic • Model = A possible world • an assignment of truth values to each propositional symbol • A model of a sentence is an interpretation in which the sentence evaluates to True
Syntax of FOL: basic elements • Constants: Hari, Michel, Elena • Predicates: knows, adjacent, > • Functions: Sqrt, father-of • Variables: x,y,a,b • Connectives: Λ,V,⌐,→,↔ • Equality: = • Quantifiers: ,
Universal quantification • <variables> <sentence> • Everyone at Columbia is smart:x At(x,Columbia) Smart(x) • x P is true in a model m iff P with x being each possible object in the model At (Helen, Columbia) Smart(Helen) At (Ramya, Columbia) Smart (Ramya) At (Melissa, Columbia) Smart (Melissa) At (Anya, Columbia) Smart (Anya) …..
Existential Quantification • <variables> <sentence> • Someone at Columbia is smartx At(x,Columbia) Smart(x) • x P is true in a model m iff P with x being each possible object in the model • Equivalent to the disjunction of instantiations of P • At(Helen, Columbia) ΛSmart(Helen) V At(Ramya, Columbia) Λ Smart(Ramya) V At(Melissa, Columbia) Λ Smart(Melissa) V At (Dina, Columbia) Λ Smart(Dina) V At (Anya, Columbia) Λ Smart(Anya)
Inference • Entailment • A KB entails α iff every model of KB is also a model of α • Inference by enumeration • Inference as search • E.g., goal-directed • Inference rules • E.g., and-elimination, or-elimination, modus ponens, unit resolution, resolution • Backward chaining, forward chaining • Resolution
To Make Inferences in FOL • Method 1 • Unification of variables with literals (in the KB) • Generalized Modus Ponens • Forward-chaining or Backward-chaining • Method 2 • Resolution
Refutation/Resolution • Introduce negated sentence • Convert to a CNF (disjunction of terms, or “literals”) • Apply resolution search to determine satisfiability (SAT) or unsatsifiability (UNSAT) • SAT, then not entailed • Semi-decidability implies there may be a SAT solution we can never find • UNSAT, then entailed
Inference Properties • Inference method A is sound (or truth-preserving) if it only derives entailed sentences • Inference method A is complete if it can derive any sentence that is entailed • A proof is a record of the progress of a sound inference algorithm.
Required Planning Components • Expressive Formal Language: • Initial state of world • Description of the agent’s goal • Description of the possible actions that can be performed • Solver generates a sequence of actions which achieve the goal • Key idea will be to use structure to extract admissable heuristics automatically
STRIPS language(Fikes&Nilsson 71) • State is a conjunction of positive ground literals • No variables and no functions • AT(,Kathy,Gate70), Weight-limit-lifted(CO36) • Goal is a conjunction of positive ground literals • At(Kathy,Denver)Λ⌐onboard(Kathy,C036) • Action schemas • Conjunction of positive literals as preconditions • Conjunction of positive and negative literals as effects • To know: • Closed world assumption • Limits on expressibility
Action Schema • Action: Go(p,x,y) • Precond: At(P,x) • Effect:⌐At(p,x) At(p,y)delete listadd list
Planning Algorithms • Forward vs. Backward search • Partial-order vs. Total-order • Partial: search in plan space • Can work on several subgoals independently, solve and then combine subplans • Total: search in state space • Search linear sequence of actions directly connected to the start or the goal
Forward State Space Search • State: positive ground literals • Initial state: set of initial world literals • Search operator: • Choose an action A that • 1.preconditions are satisfied (perhaps finding a unifier) • Construct the new search state • Add all positive effects; remove all negative effects • Solution: when current state is goal state
Backward State-Space Search • State: set of positive ground literals • Initial state: set of goal literals • Search operator:choose an action A that • Is relevant; has one of the goal literals in its effect set • Is consistent; does not negate another literal Then perform regression • Construct the new search state • Remove all positive effects of A that appear in G • Add all preconditions, unless already appears • Solution: when current state is initial world state
Heuristics Neither forward or backward search efficient without heuristics • No precondition assumption • Remove all preconditions from actions • Subgoal independence • Cost of solving a conjunction of subgoals is estimated by cost of each subgoal • No negative effects assumption • Remove all negative effects from actions • Set covering • Find the minimal actions such that the union of effects covers the goal
Partial Order Planning • Problem decomposition • Work on subgoals independently • Solve subgoals with subplans • Combine subplans • Flexibility in order of plan construction • Least commitment
Partial Plans • A set of actions, including Start and Finish • A set of ordering constraints (e.g., AB) • A set of causal links • A→pB: “A achieves p for B” • Set of open preconditions