You have to implement a lookahead algorithm which computes upfront the number of moves for solving the FloodIt game.
FloodIT is a program that plays the game of FloodIt (found on Apple Store and Android PlayStore) but on the computer screen. You have to create the game for a square board of any size (shown here for size of 12), and using the lookahead algorithm, it should compute the number of moves required to flood the board.
The game begins by only the cell (in this case 0,0) being flooded. If any cell next to it (right, left, above, or below) is the same color, then it gets flooded also.
The game asks the user to select a color. Three things happen when the color is chosen:
1) The color of all the cells which are flooded changes to the new color
2) The color of all the cells adjacent (left, right, top, or bottom) of the flooded cell, if they are the same color as the color entered, they get flooded also.
3) The number of moves made by the player is incremented by one.
The game repeatedly asks the user for a color and “floods” the cells based on the above criteria. If all the cells are flooded to the same color, then the game ends. The number of moves made by the person is displayed after each step.
Your implementation (must be in C++ or JAVA) of the lookahead algorithm may use any strategy (such as the one‐step or multi‐step greedy lookahead, or any one of the strategies that you have researched to predict the color and hence the move.)
Once you implement the strategy, the program should indicate the minimal number of moves it will take to win the game using that strategy. It should also provide the
option of showing the steps of solving the problem using that strategy. Your implementation may be console based or form (graphic windows) based.
My timeline for this work is 4 days maximum. so only bid if you will be able to complete this in 4 days.
Hello, am I right you need only the algorithm which determines approximate amount of moves required to finish the game? Without implementation the game itself. And this algorithm does not have to be exactly optimal, right? I can implement some good algorithm which estimates amount of moves.