100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Summary

Summary CPSC 322 Assignment 3 Solutions

Rating
-
Sold
-
Pages
8
Uploaded on
06-07-2023
Written in
2022/2023

Solutions for CPSC 322 Assignment 3










Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
July 6, 2023
Number of pages
8
Written in
2022/2023
Type
Summary

Subjects

Content preview

Question 1: Heuristics in STRIPS: a video game example

(a)

Loc_i = {T/F} for i = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, and Boolean variables Loc3 free, Loc9 free,
Weapon charged, Charge1Available, Charge4Available

(b)

- move right4: preconditions {Loc4=T }, effects: { Loc4=F, Loc5=T}
- move left4: preconditions {Loc4=T, loc3 free = T }, effects: { Loc4=F, Loc3= T}
- pickup4: preconditions {Loc4 = T, charge4 available=T}, effects: {weapon charged =T, charge4
available = F}
- fire4: preconditions {Loc4 = T ,weapon charged = T}, effects: {loc3 free = T; weapon charged =
F}

(c)

Optimal path: fire, right, right. Figure 1 shows the corresponding search graph.




(d)


The following are some possible answers:
• The agent’s distance to the goal
• Add to the above the number of monsters standing in between the agent and the goal (location 10).
• Add to the above the minimal number of extra steps required to recharge the weapon for each monster
between the agent’s position and the goal location.




1

, (e,f,g)

State in e: (¬Loc_1, ¬Loc_2, ¬Loc_3, ¬Loc_4, ¬Loc_5, ¬Loc_6, ¬Loc_7, ¬Loc_8, Loc_9, ¬Loc_10,
Loc3 free, Loc9 free, Weapon charged, Charge1Available, Charge4Available)
State in f: (¬Loc_1, ¬Loc_2, ¬Loc_3, ¬Loc_4, ¬Loc_5, ¬Loc_6, ¬Loc_7, Loc_8, ¬Loc_9, ¬Loc_10,
¬Loc3 free, ¬Loc9 free, Weapon charged, Charge1Available, Charge4Available)

This heuristic is 1 everywhere except in goal states: if the precondition of move right9 is empty, we can
apply this regardless of the state we’re in, and it will make the location 10. This does not help us
distinguish good states from bad states.


(h,i,j)

Relaxed plan for n=(8, ¬3 free, ¬9 free, charged, c1, c4): fire8, move right8, move right9.
h(n) = 3.
Relaxed plan for n’=(9, 3 free, 9 free, charged, c1, c4): move right 9. h(n) = 1.
The heuristic is more useful since it provides more guidance towards useful states




2

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
travissmith1 UBC
View profile
Follow You need to be logged in order to follow users or courses
Sold
97
Member since
4 year
Number of followers
61
Documents
36
Last sold
1 month ago

3.6

16 reviews

5
6
4
6
3
0
2
0
1
4

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions