Coming back from
reading week, I definitely was not as focused and engaged as I should have
been. A lot of things were on my mind, including the upcoming 2nd
assignment and the potential strike of the TAs, which ended up happening and is
still going strong as of now. At first glance, the assignment seemed just as
challenging as the first one, if not more. However, since we were given starter
code for the game_state and substract_square_state, it was therefore not nearly
as abstract in that we were told exactly the functions to implement. This game
was a lot tougher than the subtract square game but it was manageable. Once I
designed a working board-like structure crucial to the game play, implementing
the rest of the functions that were concerned with applying move, returning the
possible next moves, and announcing the winner was not a problem. It was fairly
straight-forward to earn the 40% that was attached to the tippy game state,
tippy game move, and the annotations to the game view in order to play tippy.
I wish I could say the same for the minimax
strategy we had to implement but it was a tall order. It tested us thoroughly
on our ability to apply our knowledge of recursion in a game theory context. Minimax
is a strategy designed to guarantee victory so long as the player using this
theory goes first and there is infinite time and information to make decisions.
The player envisions all possible moves from a game state and what outcome each
move will lead to, through many more possible next moves. The base case for
this recursion case is to check the outcome of the game state (i.e. a win,
loss, or tie). If the base case is not reached, this means that there are legal
moves available. The process now is to consider each available move and the
game states that each move could lead to. From here, the player using minimax
is to basically pick a move that would not lead to his or her loss. Our group
needed to take our sweet time to discuss a game plan to write the code for it. I
was not as involved in the process as my other teammates were because I was
more focused on writing the code for the tippy game state. However, I had great
teammates who were able to manifest our plan into a working code, so I am
grateful for that.
Even in class, I
could tell my classmates and even the instructor were pre-occupied with thinking
about the assignment. I was glad the instructor spent a good amount of time
explaining possibly confusing things about the assignments because otherwise we
would have been somewhat lost. The classroom content involved binary trees,
which I found to be a particular extension of the tree concepts so I did not
find the material to be too much of a jump from the week before. What I need to
do is catch up a bit on reviewing class notes because I have been neglecting
them in favour of excelling on the assignment. The second test is coming up,
which means I need to get studying. Fun.
No comments:
Post a Comment