Sunday, April 5, 2015

Week 8: Assignment 2, Tippy, MinMax.

Happy reading week. :D

There is no lecture this week because it is a reading week. Also, my result of assignment 1 has came out and i got 91% which makes me feel so goood. A nice mark is a reward for my hard work. It encourages me to keep working hard on the assignment 2.

About assignment 2, we are asked to write another game Tippy and to write a more competitive AI called MinMax. Tippy is basically a game that is played on a square board like TIC-TAC-TOE. However, there is no restriction on the size of the board as long as it is 3*3 or bigger. In order to win the game, player must complete the Z shape on the board. For example:

|O|O|X|
|X|O|O|  
|X|   |   |   (O wins)

I have finished the game part of the assignment, the __init__ function took me a long time to finally finish it, because I did not put game state in __init__. However, i notice that the game state should be recorded everytime the move apply so I change the game state into a list of list and put it in the __init__ method.

The game works well but the AI part makes me frustrated. No matter how i try, i still cannot get an algorighmn that works like what handout asked for. Recursion is still a huge block in front of me. Maybe i should communicate with people more instead of doing assignment alone. Other people might give me some insights.

No comments:

Post a Comment