Assignment 2
The Weekend Before
The assignment 2 was due on Thurday night of the eighth week. I didn't officially start writing code until February 28th, the Saturday of the seventh week because I thought it was as easy as assignment 1. But the truth was completely the opposite: I spent the whole weekend on GameState. I was quite confused. How could it be integrated into GameView? And how to make it fit into minimax? These questions had hindered me for the whole weekend.Monday and Tuesday
When I started on writing code for the strategy Minimax, I found that I even did not know how to start. So I even didn't sleep on Monday morning and became extreme worried. As a result, I even skipped CSC 148 and CSC 165 on Monday morning. Before I slept at 11 a.m., I figured out a helper function is required in Minimax.
On Tuesday, I went to the office hour. One of the result was that I found out I misunderstood the structure of the game. I used to think that only one state was used in the entire game. Therefore I didn't what could be recursed on. Then I realize every step is a state. And when a new position is placed, a new state is generated which produces recursion. Therefore the mistery was solved.
Wednesday and Thursday
After I figured out what was going wrong, I began to rewrite everything, including GameState, GameView and everything else.
And I checked the format by pep8 on Thursday.
Finally, I can have a nap safe and sound on Friday.
No comments:
Post a Comment