Artificial Intelligence: A Modern Approach
3rd Edition
ISBN: 9780136042594
Author: Stuart Russell, Peter Norvig
Publisher: Prentice Hall
expand_more
expand_more
format_list_bulleted
Concept explainers
Expert Solution & Answer
Chapter 5, Problem 9E
a.
Explanation of Solution
Possible games
- There are atmost 9! games for a.
- This is the number of...
b.
Explanation of Solution
Game tree
- The game tree is
c.
Explanation of Solution
Evaluations of all position
- The values indicate the best starting move...
d.
Explanation of Solution
Nodes
- The terminal nodes are the nodes whi...
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
This problem exercises the basic concepts of game playing, using tic-tac-toe (noughtsand crosses) as an example. We define Xn as the number of rows, columns, or diagonals with exactly n X’s and no O’s. Similarly, On is the number of rows, columns, or diagonals with just n O’s. The utility function assigns +1 to any position with X3 = 1 and −1 to any position with O3 = 1. All other terminal positions have utility 0. For nonterminal positions, we use a linear evaluation function defined as Eval (s) = 3X2(s)+X1(s)−(3O2(s)+O1(s))."Mark on your tree the evaluations of all the positions at depth 2."
Answer the following:
This problem exercises the basic concepts of game playing, using tic-tac-toe (noughts and crosses) as an example. We define Xn as the number of rows, columns, or diagonals with exactly n X’s and no O’s. Similarly, On is the number of rows, columns, or diagonals with just n O’s. The utility function assigns +1 to any position with X3=1 and −1 to any position with O3=1. All other terminal positions have utility 0. For nonterminal positions, we use a linear evaluation function defined as Eval(s)=3X2(s)+X1(s)−(3O2(s)+O1(s)).
a. Show the whole game tree starting from an empty board down to depth 2 (i.e., one X and one O on the board), taking symmetry into account.
b. Mark on your tree the evaluations of all the positions at depth 2.
c .Using the minimax algorithm, mark on your tree the backed-up values for the positions at depths 1 and 0, and use those values to choose the best starting move.
Provide original solutions including original diagram for part a!
Answer the following:
This problem exercises the basic concepts of game playing, using tic-tac-toe (noughts and crosses) as an example. We define Xn as the number of rows, columns, or diagonals with exactly n X’s and no O’s. Similarly, On is the number of rows, columns, or diagonals with just n O’s. The utility function assigns +1 to any position with X3=1 and −1 to any position with O3=1. All other terminal positions have utility 0. For nonterminal positions, we use a linear evaluation function defined as Eval(s)=3X2(s)+X1(s)−(3O2(s)+O1(s)).
a. Show the whole game tree starting from an empty board down to depth 2 (i.e., one X and one O on the board), taking symmetry into account.
b. Mark on your tree the evaluations of all the positions at depth 2.
c .Using the minimax algorithm, mark on your tree the backed-up values for the positions at depths 1 and 0, and use those values to choose the best starting move.
Provide original solution!
Chapter 5 Solutions
Artificial Intelligence: A Modern Approach
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- This problem is taken from the delightful book "Problems for Mathematicians, Young and Old" by Paul R. Halmos. Suppose that 931 tennis players want to play an elimination tournament. That means: they pair up, at random, for each round; if the number of players before the round begins is odd, one of them, chosen at random, sits out that round. The winners of each round, and the odd one who sat it out (if there was an odd one), play in the next round, till, finally, there is only one winner, the champion. What is the total number of matches to be played altogether, in all the rounds of the tournament? Your answer: Hint: This is much simpler than you think. When you see the answer you will say "of course".arrow_forwardDingyu is playing a game defined on an n X n board. Each cell (i, j) of the board (1 2, he may only go to (2, n).) The reward he earns for a move from cell C to cell D is |value of cell C – value of cell D|. The game ends when he reaches (n, n). The total reward - is the sum of the rewards for each move he makes. For example, if n = 1 2 and A = 3 the answer is 4 since he can visit (1, 1) → (1, 2) → (2, 2), and no other solution will get a higher reward. A. Write a recurrence relation to express the maximum possible reward Dingyu can achieve in traveling from cell (1, 1) to cell (n, n). Be sure to include any necessary base cases. B. State the asymptotic (big-O) running time, as a function of n, of a bottom-up dynamic programming algorithm based on your answer from the previous part. Briefly justify your answer. (You do not need to write down the algorithm itself.)arrow_forward业 In the 8 queens problem, you are to place 8 queens on the chessboard in such a way that no two queens attack each other. That is, there are no two queens on the same row, column, or diagonal. The picture above shows a near solution--the top left and bottom right queens attack each other. We want to solve this problem using the techniques of symbolic Al. First, we need states. What would the best choice be for states? Each queen and its position x Michigan, Illinois, Indiana, etc. How many queens we have placed so far A board with the positions of all the queens that have been placed so far 00 What would the start state be? A single queen's position Crouched, with fingers on the starting line Placing the first queen x An empty board What would the goal state be? CA board with 8 queens placed Ball in the back of the net The positions of all 8 queens A board with 8 queens placed, none attacking each otherv What would the best choice for "edges" or "moves" be? Tiktok Moving a queen from…arrow_forward
- In a row of seats, 1 represents a person sitting in that seat, and 0 represents that the seat is empty. There is at least one empty seat, and at least one person sitting. Alex wants to sit in the seat such that the distance between him and the closest person to him is maximized. Return that maximum distance to closest person. A. Example 1: i. Input: [1, 0, 0, 0, 1, 0, 1] ii. Output: 2 • Explanation: • If Alex sits in the second open seat (seats[2]), then the closest person has distance 2. • If Alex sits in any other open seat, the closest person has distance 1. • Thus, the maximum distance to the closest person is 2. NOTE: "using C++ code"arrow_forwardThere are 2016 passengers about to board a plane, numbered 1 through 2016 in that order. Each passenger is assigned to a seat equal to his or her own number. However, the first passenger disregards instructions and instead of sitting in seat number 1, chooses and sits down in a randomly chosen seat. Each subsequent passenger acts according to the following scheme: if their assigned seat is available, they will sit there; otherwise, they will pick at random from the remaining available seats and sit there. What is the probability that the 1512th passenger ends up sitting in their assigned seat? A. 1/2016 B. 1/2 C. 5/8 D. 3/4 E. None of the abovearrow_forwardGiven A = {1,2,3} and B={u,v}, determine. a. A X B b. B X Barrow_forward
- Correct answer will be upvoted else downvoted. Computer science. Positive integer x is called divisor of positive integer y, in case y is distinguishable by x without remaining portion. For instance, 1 is a divisor of 7 and 3 isn't divisor of 8. We gave you an integer d and requested that you track down the littlest positive integer a, to such an extent that a has no less than 4 divisors; contrast between any two divisors of an is essentially d. Input The primary line contains a solitary integer t (1≤t≤3000) — the number of experiments. The primary line of each experiment contains a solitary integer d (1≤d≤10000). Output For each experiment print one integer a — the response for this experiment.arrow_forwardImagine there are N teams competing in a tournament, and that each team plays each of the other teams once. If a tournament were to take place, it should be demonstrated (using an example) that every team would lose to at least one other team in the tournament.arrow_forwardBus timetables specify to the second the exact arrival and departure time of each bus on each stop. You need to pay for the full fare of every bus you ride and different bus lines charge different fees , but they are flat fees (independent of distance travelled on the line) A travel plan is a sequence of stop-time pairs where stop is a location of a bus stop and time is when we arrive at that stop. The plan is feasible if for any two consecutive pairs (a, t) and (b, t′) in the plan there exists a bus that departs after t and arrives at b at exactly t′. That is, a travel plan does not allow us to walk between stops. Assuming that no two buses arrive at the same time at the same stop, a feasible plan uniquely identifies the bus lines that we need to take to realize the plan. The cost of the plan is the sum of the fares we need to pay. Your task is to design an efficient algorithm that given a departure time t, an arrival time t′, an origin stop a and a destination stop b, finds the…arrow_forward
- In city street grids, intersections are often defined by two integers, counting the position of horizontal and vertical streets (sometimes called streets and avenues). Imagine traveling from position (h1, v1) to (h2, v2). How many blocks do you traverse?arrow_forwardIt's Gary's birthday today and he has ordered his favourite square cake consisting of '0's and '1's . But Gary wants the biggest piece of '1's and no '0's . A piece of cake is defined as a part which consist of only '1's, and all '1's share an edge with each other on the cake. Given the size of cake N and the cake, can you find the count of '1's in the biggest piece of '1's for Gary ?Input Format :The first line of input contains an integer, that denotes the value of N. Each of the following N lines contain N space separated integers.Output Format :Print the count of '1's in the biggest piece of '1's, according to the description in the task.Constraints :1 <= N <= 1000Time Limit: 1 secSample Input 1:21 10 1Sample Output 1:3 Solution: /////////////////public class Solution { static int[][] dir = { { 1, 0 }, { -1, 0 }, { 0, 1 }, { 0, -1 } }; public static int dfs(String[] edge, int n) { boolean[][] visited = new boolean[n][n]; int max = 0; for(int…arrow_forwardLet l be a line in the x-yplane. If l is a vertical line, its equation is x = a for some real number a. Suppose l is not a vertical line and its slope is m. Then the equation of l is y = mx + b, where b is the y-intercept. If l passes through the point (x₀, y₀), the equation of l can be written as y - y₀ = m(x - x₀). If (x₁, y₁) and (x₂, y₂) are two points in the x-y plane and x₁ ≠ x₂, the slope of line passing through these points is m = (y₂ - y₁)/(x₂ - x₁). Instructions Write a program that prompts the user for two points in the x-y plane. Input should be entered in the following order: Input x₁ Input y₁ Input x₂arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning