------- 6.2 is not the question -------
6.2 Consider the problem of placing k knights on an n X n chessboard such that no two knights are attacking each other, where k is given and k ≤ n^2
a. Choose a CSP formulation. In your formulation, what are the variables?
b. What are the possible values of each variable?
c. What sets of variables are constrained, and how?
d. Now consider the problem of putting as many knights as possible on the board without any attacks. Explain how to solve this with local search by defining appropriate
ACTIONS and RESULT functions and a sensible objective function.
-----------------------------
3. Consider the CSP from exercise 6.2 and your formulation (before part d). Let n = 3 and k = 4. If your formulation is not node consistent make it node consistent. Perform the AC-3 algorithm by hand to ensure your formulation is arch consistent.
4. Perform Backtracking search, by hand, on the resulting CSP from question 3.
6.2
a. There is a variable corresponding to each of the n2 positions on the board.
There is a variable corresponding to each knight.
b. Each variable can take one of two values, {occupied, vacant}
Each variable’s domain is the set of squares.
c. every pair of squares separated by a knight’s move is constrained, such that both cannot be occupied. Furthermore, the entire set of squares is constrained, such that the total number of occupied squares should be k.
every pair of knights is constrained, such that no two knights can be on the same square or on squares separated by a knight’s move. Solution B may be preferable because there is no global constraint, although Solution A has the smaller state space when k is large.
d. We will solve this using local search. Briefly describe in
English a sensible successor function. Any solution must describe a
complete-state formulation because we are using a local search
algorithm. For simulated annealing, the successor function must
completely connect the space; for random-restart, the goal state
must be reachable by hill climbing from some initial state. Two
basic classes of solutions are:
ensure no attacks at any time. Actions are to remove any knight,
add a knight in any un attacked square, or move a knight to any un
attacked square.
allow attacks but try to get rid of them. Actions are to remove any
knight, add a knight in any square, or move a knight to any
square.
the number of knights placed on the board. Since all states have no
attacks, the global optimum of this function is in fact the optimal
solution.
Here we need to penalize for attacks. One might suggest maximizing
#knights - #attacks, but one must be careful to avoid the
possibility that the score can be improved by adding lots more
knights at the cost of a few extra attacks. One can show that
#knights - 2#attacks works.
------- 6.2 is not the question ------- 6.2 Consider the problem of placing k knights on...
Q2-Σ Notation Review notation by investigating In this problem we will remind ourselves of 2k k O a) Consider the similar finite sum 2* k-0 Using n - 3, rewrite this expression in expanded form, and then evaluate it. b) Rewrite Expression (2) in expanded form for n-6, and then evaluate it c) Expression (2) becomes a better approximation to Expression (1) as n grows larger. To get an idea of what (1) is, evaluate (2) using n 100. Don't...
this is a dynamic programming problem
Question 3 - Dynamic Programming 18 marks total a) Consider an acyclic network defined by a set of nodes N and a set of arcs A. We know the travel time for each arc and the value for visiting each node We wish to construct a maximum value path from a specified origin to a specified destination, subject to the constraint that the total travel time of the path is no more than a...
Problem 5. Indicator variables S points possible (graded) Consider a sequence of n 1 independent tosses of a biased coin, at times k = 0,1,2,...,n On each toss, the probability of Heads is p, and the probability of Tails is 1 -p {1,2,.., at time for E resulted in Tails and the toss at time - 1 resulted in A reward of one unit is given if the toss at time Heads. Otherwise, no reward is given at time Let...
can anyone answer this please with workings
[Ec Question 1 Consider the matrix below: T12 6 a) Find A b) What is the rank of matrix A? c) If element a became 4, would this change results to parts (a) and (b), and if so, why? Consider these further matrices: B= d) Describe, using matrix terminology, each of the further matrices above (be sure to also describe the dimensions of each matrix). Perform the following matrix operations, where possible, being...
must be coded in c++ without any STL libraries sadly :( so im struggling on this problem, any help would be greatly appreciated, thanks in advance! :) assignment is due tomorrow and im really struggling on this last question :( a. Begin by implementing a BST for integers. The underlying structure is a linked list. You need these methods: i. BST(); -- Constructor ii. void put (int) – Inserts a value into the BST. iii. Void put(int[] a) – Inserts...
whole question: Just answer as many as possible, dont have to be
100%
1. Consider the market for dried beans in a small town of 9,000 consumers. Let each consumer's preferences over beans (B, in pounds) and other goods (G) be given by U(B,G) = 120 +G For the rest of this question, fix the price of other goods at PG = 1 and let each consumer have a total weekly budget of I = 100. (a) Write the budget...
Question 2: Finding the best Scrabble word with Recursion using java Scrabble is a game in which players construct words from random letters, building on words already played. Each letter has an associated point value and the aim is to collect more points than your opponent. Please see https: //en.wikipedia.org/wiki/Scrabble for an overview if you are unfamiliar with the game. You will write a program that allows a user to enter 7 letters (representing the letter tiles they hold), plus...
QUESTION 3 The textbook discusses 3 types of environmental degradation affecting the environment. Below, please match each type of degradation discussed to the type of consequence suggested in the textbook. (Answer based on what the book says, not based on your personal opinion.) Air pollution A., is killinig humans 8,..isklin the earth Land poliution Water pollution address chiticar Watel Air Pollution Air pollution occurs when the release of materials to the atmosphere cannot be safelv disposed of by natural processes....
What an Executive Summary Is
An executive summary is a specific type of document that does
two things: it summarizes a research article, and it offers
recommendations as to how information from the article can be
used.
Some long reports can contain an executive summary section, as
indicated in the Pearson handbook.
Write a 2 pahe Executive Summary
In business contexts, an executive summary is always written
for a specific purpose: to explain the information in the article
to a...