CS470/570 Artificial Intelligence
Program
#1: Testing your solution!
The tests for Part 1:
At this point, you should have all the basic puzzle pieces of your Fred Flintstone solver assembled and test it. To convince me, show the following:
- Save this file here and feed it to your loadBoard function to get this board loaded into your solver.
- Run your printBoard function to show us the loaded board.
- Run your possibleMoves function on the board for position (3,3) #remember, all indexing starts at (0,0) in the top left corner!
- Run your possibleMoves function on the board for position (2,1)
- Run your legalMoves function on the board for position (1,2), assuming you have a past path of ( (1,0),(2,0),(2,1),(2,2) )
- Run your legalMoves function on the board for position (2,2), assuming a path of ( (1,1),(1,2),(1,3),(2,3),(3,2) )
- Run examineState on the board at (0,3), with a past path of ( (1,1), (0,1),(0,2) )
- Run examineState on the board at (0,0), with a past path of ( (3,3), (2,2), (1,1) )
- Run examineState on the board at (3,3), with a past path of ( (2,2),(2,1),(2,0),(3,0),(3,1),(3,2) )
If you've followed instructions, the output from your tests should look similar in format and content to the sample output I gave you for this part.
Do each of the above tests, one after the other, in order in your Python console. Make sure to include some newlines between each test for readability of the resulting output. Then print out the resulting interaction showing all of your testing.
Have at it!