About the game?
Consider a modified 2D version of the rubik’s cube game. It can be any nxn block. You can rotate a row (towards right or left) or a column (upward direction or downward direction), so there are 4n allowed possible moves. For example in the following 3x3 board there are 12 possible moves.
The format of the input file is fixed. The first line should have the value of n and the next n lines should have the initial state, e.g., for the above problem the initial state would be. I will be checking your assignments based on this fixed format so please stick to this:
3 1 5
4 8 6
7 2 9
If you do not find goal state generate an error message, otherwise, output your complete solution which would be a sequence of actions and states that we have to follow to find the path from initial to goal state. You also have to output the total number of states explored and the total number of states in the fringe at the time of finding the goal state.
Search to Implement:
implement following searches on this problem
• DFS(Depth-first search)
• BFS(Breadth-first search)
• Depth Limited search (depth limit to be input by user)