This week, we have learned a new data structure --- linked list. Generally speaking, this data structure is not related to recursion. As linked list is a linear structure, it is much easier than binary tree structure. For this section, we have learned the new concept --- pointer, aiming at mutating the corresponding linked list.
At the very beginning, I cannot understand what cur_node and lnk.front really are. Sometimes, I am just not able to distinguish them and use them correctly. Fortunately, after doing the lab of this week, I eventually understand what they are and I can solve almost all the questions in this lab.
The most challenging task this week is assignment 2. The minimax strategy is really complicated and we almost gave up when we were designing the program. Finally, thanks to the instructor TA, we finally come up with a solution. In addition, we also met a lot of other difficult challenges when we were testing the program. For example, we modified the "current_score" function for multiple times because it cannot output the correct current score. However, we cannot find the flaw of the algorithm until we changed one variable "self.player" into "self.next_player". By accident, we got the correct version of this algorithm. Based on our modification, we traced the algorithm back and finally knew why we understood the recursion in a false way.In short, this assignment is really hard and really time-consuming.
Now, the next challenging task is coming next week --- term test 2. I feel really diffident because I still cannot handle the recursion problems fluently. In fact, when I am doing a little more complicated recursion problem, I still need to trace the function otherwise I cannot fully understand the question and where I need to modify. Therefore, I must improve my recursion coding skills in few days.
没有评论:
发表评论