Thursday, March 5, 2015

courSe LOG Entry 6

What we learned this week is linked list and iteration. Linked list is similar to list except its every adjacent element has connection with each other. Linked list does not use variable list to store the value. It only stores the first and the last element of the list. The element is stored into an abstract data type called LLNode. It can show which element is after this element. Since LLNode can connect an element with the element after it, we can access the all the value in linked list by using iteration.
What I enjoyed this week is that Danny gives a lot of advise about doing assignment 2. Although it is vague and not in detail about code, it still helps. He spent first half of the class on helping assignment 2.
It is obvious that assignment 2 is challenging as Danny spent so much time explaining it and even sent an email to us to give us some hint. There are several tricky part for this assignment. First, it is how to determine the winner of the game tippy. In order to win, you need to form your piece in an z shape in a tic-tac-toe plate. This requires a lot of if statement and thinking. Second, it is the rough outcome function. It is a sleeper function because we do not need to use it for assignment 2. It is useful in next assignment, though. Third, it is the minimax strategy. To implement minimax strategy, we need to first calculate the score the player gets at a particular point and then recommend moves for the player. I created a helper function to calculate the score and suggest moves in the main function by calling the helper function. The calculation of score requires recursion. It is really tricky because you need think what will happen in the future to implement a correct recursion.
Because of the strike of TAs, we do not have lab this week. I tried to do the lab exercise by myself, but I am not sure with my answer without my partner and TA. I hope the strike to be over soon.

No comments:

Post a Comment