CS代写:人工智能CPSC 322 assignment代写



专业实力强:原创代码,免费附赠代码查重报告;不写超纲代码,通过所有的test并且完成bonus part。





添加微信客服: maxxuezhang后,同学们将相关资料发送给客服,我们将从导师库中筛选出最合适的导师。









CPSC 322 Artificial Intelligence Assignment 代写案例

Question One

CSP techniques are useful in solving complex configuration and allocation problems. You are given the task of allocating four developments in a new site in Whistler. You have to place a housing complex, a big hotel, a recreational area and a garbage dump. The area for development can be represented as 3×3 grid (three rows 0,1,2 and three columns 0,1,2) and you need to place each development in their own cell of the grid. Unfortunately there are some practical constraints on the problem that you need to take into account. In the following, A is close to B if A is in a cell that shares an edge or a corner with B.

• There is a cemetery in cell 0,0.

• There is a lake in cell 1,2.

• The garbage dump should not be close to the lake.

• The housing complex and the big hotel should not be close to the cemetery.

• The recreational area should be close to the lake.

• The housing complex and the big hotel should be close to the recreational area.

• The housing complex and the big hotel should not be close to the garbage dump.

Represent this problem as a CSP. Be as precise as you can in specifying the constraints. Also there may be some basic constraints that are in the description (and not just in the points). You need to give a human-level description of the variables, domains and constraints as well as either an AIspace or AIPython CSP representation and demonstrate that it works. How many solutions are there? If there are solutions, what are they? If there are no solutions, explain why. The solutions and the explanations you give, must be in straightforward non-techical language that a member of the public could understand.

Question Two

Consider a scheduling problem, where there are eight variables A, B, C , D, E, F, G, H each with domain {1, 2, 3, 4}. Suppose the constraints are: A > G, A ≤ H , |F −B| = 1, G < H , |G −C | = 1, H − C is even, H 6= D, D > G, D 6= C , E 6= C , E < D − 1, E 6= H − 2, G 6= F, H 6= F, C 6= F, D 6= F, |E − F| is odd. (a) Show how search can be used to solve this problem, using the variable ordering A, B, C , D,E, F, G, H . To do this, write a program to print out all answers and count the number of nodes expanded and the number failing consistency checks. You can use whatever programming language you like. We don’t want a general program; just one for this example. Python code that produces the answer for variables X , Y and Z each with domains {t, f }, and constraints X 6= Y , Y 6= Z is at http://www.cs.ubc.ca/~poole/cs322/2020/as3/streeCount.py (b) Is there a smaller tree? Give a node ordering that results in as small a tree as you can find. Show both how many failing consistency checks there are, and how many nodes are expanded to find all solutions. Explain how you found this ordering and why you would expect the tree resulting from this ordering to be good. (A good explanation as to why your ordering is expected to be good is more important than the perfect ordering.) (c) How many failures would there be for generate-and-test? Hint: it can be computed in a straightforward manner if you know the number of variables, the size of the domains, and the number of solutions; you do not need to write a program like the second part of streeCount.py. The file as3csp.py in the zip file contains an AIPython representation of this domain. Note that AIPython does not tell us how many failing consistency checks there are.

Question Three

Show how arc consistency can be used to solve the scheduling problem of question 2 of assignment 3. To do this you need to

(a) For the first 5 instances of arc consistency, explain which elements of a domain are deleted

at each step, and which arc is responsible for removing the element. You need to explain

it at a level for one of your peers to understand if this is the first time they have seen arc

consistency. Select arcs to cover the interesting cases.

(b) Show explicitly the constraint graph after arc consistency has stopped.

(c) Show how splitting domains can be used to solve this problem. Draw the tree of splits and

show the solutions.

(d) Based on this experience, discuss how much arc consistency saves over the backtracking for

this problem (include the best tree that you found and an arbitrary tree). Make sure there is

something quantitative in your answer and there is evidence for your claims.

Question Four

Show how stochastic local search can be used for the scheduling problem of question one. Make sure that it tries 2000 steps before termination. You can use the AIspace applet or the Python code.

(a) For one particular run, where you select a variable that is involved in the most conflicts, and either select a value at random or that results in the minimum number of conflicts, explain which element is changed at each step and what was the resulting number of unsatisfied arcs.

(You only need to do this for 5 steps). Again, explain this at a level for one of your peers to understand if this is the first time they have seen local search. (Try to make the example interesting as if you were explaining it.)

(b) Compare and explain the result of the following settings:

i) select a variable involved in the maximum number of unsatisfied constraints, and either its best value or a random value (but tell us which one)

ii) select any variable which is involved in unsatisfied constraints, and either its best value or a random value

iii) a probabilistic mix of the (i) and (ii), such as with probability 0.4 select a variable involved in the most conflicts, otherwise select variable in any conflict, and either select its best value or a random value. Try a few probabilities and report on the best one found.

You must show and explain the runtime distributions and describe what you observe (in particular, tell us which curves correspond to which settings, when one algorithm better than another, and how often each setting does not find solutions; be specific). You should use multiple runs for each setting in the comparisons.

(c) Does a random restart help for any of these cases? Explain. (d) Based on this experience suggest good settings for the parameters that control which algorithms is run (e.g., which method is chosen, and the probabilities that different choices are made). Justify your choice.


Assignment Exmaple

Recent Case

Service Scope

oop|Processing|JS|Ruby|Scala|Rust|Data Mining|数据库|Oracle|Mysql|Sqlite|IOS|Data Mining|网络编程|多线程编程|Linux编程操作系统|计算机网络|留学生|编程|程序|代写|加急|个人代写|作业代写|Assignment