Artificial Intelligence: A Modern Approach
3rd Edition
ISBN: 9780136042594
Author: Stuart Russell, Peter Norvig
Publisher: Prentice Hall
expand_more
expand_more
format_list_bulleted
Expert Solution & Answer
Chapter 5, Problem 1E
Explanation of Solution
Algorithm for finding optimal move
- The translation uses the model of the opponent to fill in the opponent’s actions leaving the actions to be determined by the search algorithm.
- The search problem is given by
Initial state: P(S0) where S0 is the initial game state. P can be applied as the opponent may play first.
Actions: defined as in the game by ACTIONSs.
Successor function: RESULT′(s, a) = P(RESULT(s, a))
Goal test: goals are terminal states
Step cost: the cost of an action is zero.
Want to see more full solutions like this?
Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
Hi please answer the following follow up questions as well, posted them as another question.
Question 4
For the 9-tile soring problem, assume that you start from this initial state
7
2
4
5
6
8
3
1
The Goal State is:
1
2
3
4
5
6
7
8
The cost of moving any tile is 1.
Let the heuristic function h(n) = number of misplaced tiles.
For the shown configuration, there are four options for the next move:
Move 5 to the right
Move 6 to the left
Move 2 down
Move 3 up
Each of these moves has a value f(n) = h(n) + g(n).
If we choose to Move 5 to the right, then
g(n) = 1. That is, it took us one step to reach this state from the initial state.
h(n) = number of misplaced tiles. The misplaced tiles are {7,4,8,3,1}. So the number of misplaced tiles = h(n) = 5.
If we choose to Move 6 to the left, g(n) is still = 1, but h(n) will change because the number of misplaced tiles is different.
A* works by computing f(n) = h(n) + g(n) for each of these possible moves. Then it…
Simulated annealing is an extension of hill climbing, which uses randomness to avoid getting stuck in local maxima and plateaux.
a) As defined in your textbook, simulated annealing returns the current state when the end of the annealing schedule is reached and if the annealing schedule is slow enough. Given that we know the value (measure of goodness) of each state we visit, is there anything smarter we could do?
(b) Simulated annealing requires a very small amount of memory, just enough to store two states: the current state and the proposed next state. Suppose we had enough memory to hold two million states. Propose a modification to simulated annealing that makes productive use of the additional memory.
In particular, suggest something that will likely perform better than just running simulated annealing a million times consecutively with random restarts. [Note: There are multiple correct answers here.]
(c) Gradient ascent search is prone to local optima just like hill climbing.…
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".
Chapter 5 Solutions
Artificial Intelligence: A Modern Approach
Knowledge Booster
Similar questions
- Artificial Intelligence - Adversarial Search 1. Consider the following three variants of minimax search: the simple version, alpha-beta search, anddepth-limited search, and consider the games of tic-tac-toe and chess. For the chess game, supposethat the Threefold Repetition Rule and the Fifty-Move Rule, and the similar rules if any, are notconsidered, i.e., the game will not terminate if the same position occurs multiple times. For eachcombination of minimax variant and game, answer the following question: can that minimax variantpossibly never terminate, in computing the best next move? Justify your answer.arrow_forwardThe Josephus problem is the following game: N people, numbered 1 to N, are sitting in a circle. Starting at person 1, a hot potato is passed. After M passes, the person holding the hot potato is eliminated, the circle closes ranks, and the game continues with the person who was sitting after the eliminated person picking up the hot potato. The last remaining person wins. Thus, if M = 0 and N = 5, players are eliminated in order, and player 5 wins. If M = 1 and N = 5, the order of elimination is 2, 4, 1, 5. Write a C program to solve the Josephus problem for general values of M and N. Try to make your program as efficient as possible. Make sure you dispose of cells. What is the running time of your program? If M = 1, what is the running time of your program? How is the actual speed affected by the delete routine for large values of N (N > 100,000)? ps. provide a screenshot of output, thankssarrow_forwardCorrect answer will be upvoted else downvoted. There are n focuses on an endless plane. The I-th point has facilitates (xi,yi) to such an extent that xi>0 and yi>0. The directions are not really integer. In one maneuver you play out the accompanying activities: pick two focuses an and b (a≠b); move point a from (xa,ya) to either (xa+1,ya) or (xa,ya+1); move point b from (xb,yb) to either (xb+1,yb) or (xb,yb+1); eliminate focuses an and b. Notwithstanding, the move must be performed if there exists a line that goes through the new organizes of, another directions of b and (0,0). If not, the move can't be performed and the focuses stay at their unique directions (xa,ya) and (xb,yb), individually. Input The main line contains a solitary integer n (1≤n≤2⋅105) — the number of focuses. The I-th of the following n lines contains four integers ai,bi,ci,di (1≤ai,bi,ci,di≤109). The directions of the I-th point are xi=aibi and yi=cidi. Output :In the primary…arrow_forward
- You and Alice and Bob are considering variants of the Pokemon problem. In the opti- mization problem we are looking for the minimum set of packs, and there are multiple ways to convert it to a decision problem (you probably used the standard method of adding a threshold variable k above). Alice considers the question "Is there a collection of packs of size 5 (or less) that includes one of every card in the set?". Bob considers the question "Is there a collection of packs of size [2] (or less) that includes one of every card in the set?". Are Alice and Bob's versions of the problem NP-complete? Either way, justify your answer with a proof.arrow_forwardHow would you modify the dynamic programming algorithm for the coin collecting problem if some cells on the board are inaccessible for the robot? Apply your algorithm to the board below, where the inaccessible cells are shown by X’s. How many optimal paths are there for this board?arrow_forwardThe rook is a chess piece that may move any number of spaces either horizontally or vertically. Consider the “rooks problem” where we try to place 8 rooks on an 8x8 chess board in such a way that no pair attacks each other. a. How many different solutions are there to this?b. Suppose we place the rooks on the board one by one, and we care about the order in which we put them on the board. We still cannot place them in ways that attack each other. How many different full sequences of placing the rooks (ending in one of the solutions from a) are there?arrow_forward
- Implement an algorithmic solution, indicating which states are valid and which are not, and model the space of the following problem: An interest group from a small town decided to sue a company for commercial abuse. For this, the people have organized themselves and decided to send 3 representatives, who will have to travel in a Van to the city where the lawsuit will be filed. The company to be sued, upon learning of these actions, has decided to send 3 lawyers to persuade the representatives, who will also travel in the same Van for that purpose. The community must file the class action suit under these conditions: - The three applicants must reach the destination city; - Only two people can travel per trip in the Van (small town - city, city - small town); - There can never be more lawyers than plaintiffs in any one place (either in the small town or city) because the lawyers can persuade the plaintiffs and as a consequence, the lawsuit would not be made; - The Van cannot be…arrow_forwardGive the initial state, goal test, successor function, and cost function to transform the following problem into a search problem. Choose a formulation that is precise enough to be implemented. You are not to supply the solutions. You have to color a planar map using only three colors, with no two adjacent regions having the same color.arrow_forwardThis assignment uses several heuristic search techniques to find possibly optimal truth assignments for variables in the given Boolean formulas (see the bottom of the assignment). The formulas are in conjunctive normal form (ANDs of ORs). The fitness of an assignment is the number of clauses (ORs) that the assignment satisfies. If there are c clauses, then the highest fitness is bounded by c. However, if the formula is not satisfiable, then you cannot simultaneously make all c clauses true. You will use three of the following seven techniques: DPLL Resolution Genetic algorithms Local search Simulated annealing GSAT WalkSAT You must choose at least one complete algorithm to implement - DPLL or Resolution.arrow_forward
- Calculate the optimal value of the decision parameter p in the Bresenham's circle drawing algorithm. The stepwise procedure for implementing Bresenham's algorithm for circle drawing is delineated.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_forwardDevelop a dynamic programming algorithm for the knapsack problem: given n items of know weights w1, . . . , wn and values v1, . . . ,vn and a knapsack of capacity W, find the most valuable subset of the items that fit into the knapsack. We assume that all the weights and the knapsack’s capacity are positive integers, while the item values are positive real numbers. (This is the 0-1 knapsack problem). Analyze the structure of an optimal solution. Give the recursive solution. Give a solution to this problem by writing pseudo code procedures. Analyze the running time for your algorithms.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education