2015年3月26日星期四

Impressions of week 7 (writing for week 8)


  Coming back from reading week!

   This week is all about Assignment2

    It was a NIGHTMARE! 

    The due date of assignment2 is coming.... And the assignment is absolutely becoming tougher! My team spent hours working on that, but nothing came out. Although, professor talked a lot about how to find ways to solve problems in assignment2, I still didn't know what they're talking about. I had no idea what to write until I read lots of articles about recursion and class.
  I believe the most difficult part is that you have to figure out all the functions by yourself. For example, you need to think about what kind of methods you need and what kind of methods can make things easier and can make the codes work efficiently.
  At first, I wanted to write the new game at the beginning, because I thought it was easier if I could link things in the game and minimax together. However, I was totally wrong. Since Minimax is extremely general, which means it could be executed in every game. So why not write Minimax first and then figure out the connections between Minimax and the new game? Then we started to writing Minimax and things got better!
  The main part of the new game is about judging "tie", "win" and "lose". And this is the part that I took responsibility for. At the beginning, my team members decided to use tuple to represent the positions of the net. Things looked quite well until I wrote method winner. That was horrible. Using tuple as coordinate made things even worse. I always thought that "in order to build the connection between Minimax and winner, I should use proper numbers to represent those positions" and I was proved right latter, however, at that moment, I believed that "the numbers representing the positions are used to subtract". So how to choose proper numbers became a HUGE problem for me and I found out it couldn't be solved at all!! Then I made up my mind to change a bunch of previous codes...Eventually I realized that those numbers have nothing to do with Minimax essentially....
  After fighting with codes for nights, we finally finished this assignment! However, it took more than 10 minutes to figure out which is the best position for computer itself even in 3 x 3 nets...



没有评论:

发表评论