There are only two weeks left to complete our courses in 2015 winter term. In this week's csc148, we analyzed our codes written in assignment 2, and learned some methods to strength our ability in python.
In assignment 2, we wrote a specific class called Minimax Strategy, which is a strong strategy for computer to choose the best possible move in current situation. As this method seems to be difficult to thought of, Danny gave us a possible way to get the solution.
 |
| one possible solution for minimax |
The best way for us to come up with the idea and understand the solution is to draw a tree to represent every possible moves and all the winning position for a specific player. However, the tippy game seems to be so complex, so we will consider the examples in the subtract square game.
 |
| Subtract square example |
On the other hand, we also learned a new method called assert to simplify our 'if not' statement.
No comments:
Post a Comment