1 / 6

How to Think about Prolog - 2

How to Think about Prolog - 2. Mike’s Prolog Tutorial 6 Oct 2011. Recap. Initial Problem: compute set of fully specified goal states reachable from initial state Discovered: counter productive to compute Reformulated problem: cheaply compute set that is a close upper bound approximation

kylee
Download Presentation

How to Think about Prolog - 2

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. How to Think about Prolog - 2 Mike’s Prolog Tutorial 6 Oct 2011

  2. Recap • Initial Problem: compute set of fully specified goal states reachable from initial state • Discovered: counter productive to compute • Reformulated problem: cheaply compute set that is a close upper bound approximation • Informally verified that this is still correct for our context • From reformulation, became clear that our problem can be seen as a CSP

  3. CSP • Set of variables with their respective domains • Set of constraints on and between variables • CSP = find a set of assignments of values to vars (from their domains) such that all constraints are satisfied. • For our problem: • What are the variables? • Their domains? • What are the constraints?

  4. Variables • For each vehicle we have variables that state • Where its location is (X,Y) • Its orientation • Its length • For each variable type we have a finite domain

  5. Constraints • Goal constraint: redCar must be in goal loc • Consistency constraint: no 2 vehicles can occupy the same location • Need to refine the notion of vehicles occupying same location • Refine notion of vehicle occupying a location

  6. Vehicle Occupying a Location • Remember, that at(Vehicle, X, Y) states highest leftmost X,Y coords of where it is located occupy(Vehicle, X, Y) :- at(Vehicle, X, Y) ; at(Vehicle, X-1, Y), orientation(Vehicle, horizontal) ; at(Vehicle, X-2, Y), orientation(Vehicle, horizontal), length(Vehicle, 3) ; ... for vertical direction

More Related