14 views

Uploaded by galgorthian

Solutions for 15-381 second assignment

- greensheet_19
- Search Techniques for Finding Alternative Solutions for AND/OR Graphs and Biobjective Optimization Problems
- ABAP ALV Tree Exemplo
- GATE Questions
- wmqaziaiFA18statespace.pdf
- AI3 Search
- Huffman Code1
- Sp12 Midterm1 Solutions
- icip06v9
- WSL Print Job
- Ploting Rpart Tree With Prp
- boca
- s Nied Ovich
- 2015-improg
- CTree
- CPSC322 Introduction to AI - Learning Goals
- Consistency in Database Systems
- 11 - Tree
- algorithm questions
- CH5-3 (1)

You are on page 1of 4

TAs: Subhodeep Moitra, Jesse Dunietz, Danny Zhu OUT: Sep 11, 2013 DUE: Sep 24, 2013, 11:59 AM

We will attempt to solve the famous problem of Towers of Hanoi using classical planning. It consists of three pegs, and a number of discs of dierent sizes which can slide onto any peg. The puzzle starts with the discs in a neat stack in ascending order of size on one peg, the smallest at the top, thus making a conical shape. The objective of the puzzle is to move the entire stack to another peg, obeying the following rules. (1) Only one disc may be moved at a time. (2) Each move consists of taking the upper disc from one of the pegs and sliding it onto another peg, on top of the other discs that may already be present on that peg. (3) No disc may be placed on top of a smaller disc. Figure 1: Towers of Hanoi

A B C

D1 D2

D1 D2

Consider a problem instance in which the pegs are labeled: A, B , and C . There are two discs, d1 and d2 . d1 is smaller than d2 . d1 and d2 are initially stacked on peg A, and the goal is to move both of them, with correct ordering, to peg C . disc(x): States that an item x is a disc. peg(x): States that an item x is a peg. clear(x): States that the top of an item x is clear. x can be a disc or a peg. on(x, y ): States that an item x is directly on top of an item y . x is a disc and y is a disc or a peg. If y is a peg, this asserts that x is the bottom disc on peg y .

smaller(x, y ): States that an item x is smaller than an item y . x is a disc and y is a disc or peg. The only action permitted is MOVE(d, s, t). This states that item d, which is on item s, should be moved to be on item t. d is a disc; s and t can each be a disc or a peg. Also assume the following facts. You may exclude these facts from your state descriptions, since they are always constant. x {d1 , d2 } : disc(x) x {A, B, C } : peg(x) x {d1 , d2 }, y {A, B, C } : smaller(x, y ) smaller(d1 , d2 ) 1. Give the initial state, the goal state, and the action schema (with its precondition and eect). [8 points] Solution: Initial state: on(d1, d2), on(d2, A), clear(d1), clear(B), clear(C) Goal state: on(d1, d2), on(d2, C) Action schema for MOVE(d, s, t): Precondition: disc(d), clear(d), on(d, s), clear(t), smaller(d, t) Eect: on(d, t), on(d, s), clear(s), clear(t) 2. Solve the planning problem using A* search with the bad heuristic function h(x) = 0 for all x. The cost of a plan is the number of actions that need to be taken. Draw out the search tree. Each node in the tree should be a state description, i.e., a conjunction of conditions. The edges from a node correspond to the actions possible from that state. You may omit nodes that are repetitions of previously reached states. Note: You need not describe the states in complete detail. The conditions that you need to track are those that are changing/changed. [8 points] Solution: on(d1, d2), on(d2, A), clear(B), clear(C)

MOVE(d1, d2, B) MOVE(d1, d2, C)

MOVE(d2, A, C)

MOVE(d2, A, B)

MOVE(d1, B, A) MOVE(d1, B, d2)

MOVE(d1, C, A) MOVE(d1, C, d2)

on(d1, A), on(d2, C), on(d2, C), on(d1, d2), on(d1, A), on(d2, B), on(d2, B), on(d1, d2), clear(A), clear(C) clear(d2), clear(C) clear(A), clear(B) clear(d2), clear(B)

(Depending on the order in which nodes are popped from the queue, some nodes in the nal level of this tree may not be generated.) 3. What is the relationship between this A* scheme and uniform cost search? [2 points] Solution: A* with the specied heuristic is simply uniform cost search. 4. Construct the levels 0-1 of the planning graph for the problem (i.e., your graph should contain 2 levels of states and 1 level of actions). Again, you can omit literals that always stay constant. Indicate mutex edges in a dierent edge style or color. Omit mutex edges between literals that are negations of each other and between the corresponding no-ops (though you should still consider them when constructing your graph). Note: You may use a graph layout tool such as Graphviz if the planning graph gets too messy to draw by hand. If you drew out any additional layers of the planning graph correctly, you will receive an additional 4 bonus points. [8 points] Solution:

on(d2, A)

on(d1, d2)

no-op

clear(d1)

on(d2, A)

no-op

on(d1, B)

on(d1, d2)

no-op

!clear(B)

clear(d1)

Move(d1, d2, B)

clear(d2)

clear(B)

Move(d1, d2, C)

!on(d1, d2)

clear(C)

no-op

on(d1, C)

no-op

!clear(C)

clear(B)

clear(C)

5. Suppose the goal G is a conjunction of predicates G1 , G2 , , Gn . Consider plans P1 , , Pn , where each Pi achieves Gi . How might you use the number of levels in the planning graph you constructed to compute Cost(Pi ), a heuristic estimate of the cost to execute Pi ? [2 points] Solution: Cost(Pi ) is the index of the earliest level of the planning graph where Gi is solved, regardless of the internal structure of Pi . 6. We want to combine Cost(Pi ) to get a heuristic estimate for the cost of P , a plan for achieving G. Which of the following is an admissible heuristic: Cost(P ) = maxi Cost(Pi ) or Cost(P ) = i Cost(Pi )? Why is it admissible? [2 points] 3

Solution: Cost(P ) = maxi Cost(Pi ) is admissible, because if the minimum cost of some Pi is C , then the minimum cost of P must be at least C , since P subsumes Pi . Thus, the heuristic cant overestimate the cost to reach the goal. The sum heuristic gives no such guarantee for instance, if some Pi turns out to solve all the other goals as well, then Cost(P ) = Cost(Pi ) < i Cost(Pi ).

- greensheet_19Uploaded byhsujustin
- Search Techniques for Finding Alternative Solutions for AND/OR Graphs and Biobjective Optimization ProblemsUploaded bypriyankarghosh
- ABAP ALV Tree ExemploUploaded byLeonardo Nobre
- GATE QuestionsUploaded byDebayan Biswas
- wmqaziaiFA18statespace.pdfUploaded byHamza Hamid
- AI3 SearchUploaded byAnindo Saka Fitri
- Huffman Code1Uploaded byapi-3844034
- Sp12 Midterm1 SolutionsUploaded byChandan Bagai
- icip06v9Uploaded bypavan_bmkr
- WSL Print JobUploaded byplaintec
- Ploting Rpart Tree With PrpUploaded byalexa_sherpy
- bocaUploaded byohudalharthi
- s Nied OvichUploaded byRajesh Kumar
- 2015-improgUploaded byajitkarthik
- CTreeUploaded byrachit_kaw
- CPSC322 Introduction to AI - Learning GoalsUploaded byJohn Gong
- Consistency in Database SystemsUploaded bychuasharmaine
- 11 - TreeUploaded byrakhaadit
- algorithm questionsUploaded byDhrubajyoti Hati
- CH5-3 (1)Uploaded byNikithakrish
- ISC 2013 Computer Science Paper 1 TheoryUploaded byDebanjanSaha
- Sales and Operations PlanningUploaded byRanjan
- Introduction Computational EngineeringUploaded byLuz Villanueva
- June 2012 Ugc Computer Science Paper II - SolvedUploaded byvanippc
- Centralized and Distributed Anonymization for High-Dimensional Healthcare DataUploaded byJosé Joaquín Ortiz Bojacá
- Cse373 12wi Midterm1.KeyUploaded byRitu Phogat
- PSCPEC4 VerygoodUploaded byAmritaRupini
- algorithms-10-00122-v2Uploaded byastonlee
- Priority queues on parallel machinesUploaded byfonseca_r
- Symbol for B-LanguageUploaded byedzach1994

- Neo4J Cheat sheetUploaded byFranz
- TS5040_LabVIEW Robotics Starter Kit (DaNI) Lab ExercisesfUploaded bysivani05
- Assignment FinalUploaded byAupendu Kar
- unit-1 newUploaded byAmsaveni Kannan
- AI Question BankUploaded bymusic12341234
- Searching techniques in AIUploaded byJagtar Shergill
- ECS 170 Project 1Uploaded bymriedlin3025
- GAA-StarUploaded bynasi_balap
- Artificial Intelligence Question BankUploaded bysridharanc23
- A * AlgorithmUploaded byRishabh Vashistha
- A-Star-Search-Example.pptUploaded byBaala Chandhren
- Tut+3Uploaded byhoangduc007
- AI Combat-Inspiration and State of the ArtUploaded byAmanda Johnson
- 8pUploaded byAnkit Komar
- Unit 1 - Artificial Intelligence - Www.rgpvnotes.inUploaded byrahul jambhulkar
- ai.docUploaded byUddampreet Kaur
- AI (1)Uploaded byDebasish Nayak
- A is Tar CraftUploaded byJose A. Maese
- Ai 1st ModuleUploaded byabhinav.kishore891729
- Ryan Donnelly - Artificial Intelligence in GamingUploaded byJavier Pardo Muñoz
- Anytime D StarUploaded bynasi_balap
- p17-schmeisterUploaded byMuhammad Zubair
- Question Bank for CAT1_2mksUploaded byfelix777s
- Deconstructing Lambda CalculusUploaded byc_neagoe
- Ai i Complete Notes by Murali KrishnaUploaded byDarajjee Dhufeeraa
- Astar.pptUploaded byPetter P
- aiUploaded byPhani Kumar
- AI Notes UpdatingUploaded bysmilingeyes_nic
- Artificial Intelligence for Game DesignUploaded byq2tpro
- D Heuristic SearchUploaded bysamgalforyou