Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I just need help figuring out how to do this algorithm, IN JAVA please :) a b c d 1 1 2 2 3 3
I just need help figuring out how to do this algorithm, IN JAVA please :)
a b c d 1 1 2 2 3 3 4 4 a b c d Figure 3: Initial board configuration for 4x4 Reversi Requirements 1. Develop a program that plays Reversi on a 4x4 board. The four initial pieces go in the middle of the board, as shown in Figure 3. This is not a hard game, but it is simple enough that you can see how your program is playing. And you can probably play pretty well yourself, even if you've never played Reversi. You MUST use an adversarial state-space search approach to solving the problem. Design your data structures using the formal model of the game. We MUST see classes corresponding to the elements of the formal model (see below). You MUST use the appropriate standard algorithm to select optimal moves. Do not use algorithms that make imperfect decisions for this part of the project. . You should be able to search the entire tree for 4x4 Reversi and hence your program should be able to play perfectly and quickly (on modern computers). You may, if you want, also play larger boards with your optimal player. It should require almost no additional code. You should gain an appreciation for the complexity of search problems if you try it. Your program MUST validate the user's input and only allow the user to make legal moves. This is not as hard as it may seem. Think about it. Your program knows a lot about what is possible and what isn't. 2. Develop a program that plays standard 8x8 Reversi. This can be a separate pro- gram, or you can have a single program that asks the user which game to play. You MUST again use an adversarial state-space search approach to solve the problem. If you design this right for Part 1, you will be able to reuse it with almost no work. In fact, you will be able to adapt your program to any two-player, perfect knowledge, zero-sum game with very little work. How cool is that? 5 Choosing the best move in this game is significantly harder than the smaller game of Part 1. (You should be able to figure out at least an upper bound on how much harder it is.) You MUST use heuristic MINIMAX with alpha-beta pruning for this part of the project. Your program should be able to play well. In particular, it should not take too long to choose a move. Your program should give the user a chance to specify the search limit, using one or more of the ideas described in the textbook and discussed in class. Again, you may also try playing different board sizes with this player if you wantStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started