Wednesday, 25 March 2015

Revisit

So I will be revisiting my impressions of week 9 slog. Overall, I mostly agree with what I wrote for my week 9 slog. However, I do disagree with my thoughts that linked list was hard and that the cheat sheet was useful.

Firstly, I will be talking about why I disagree about how I thought linked list was hard. It was a fairly simple concept first of all. All you have to know was that there is a front and a back and that the front was a chain of nodes all linked together. To find a specific node all you have to do is write node.nxt and keep checking over each node. I don't know why I had so much trouble with it in the first place. Maybe it was because of how it was taught in class. There was an unnecessary number of diagrams that didn't help at all and in my opinion were counter productive. Also, the TA strike started on the week of the linked list tutorial and because I'm really lazy I waited until the last day to do the tutorial, so that may have made linked lists feel harder than they really are.

Lastly, I'll be talking about how the cheat sheet was mostly useless. While doing the test I didn't refer to my cheat sheet. I only looked at it to check over my test and I didn't make any changes at all, I only confirmed that my answers were right.

My friend Kevin also came to the same conclusion also, he didn't really use the cheat sheet for any of the questions. Although, he didn't really call it a complete waste because the cheat sheet forced him to go over everything all over again and fill up the sheet.

My other friend Timothy disagreed with me on the linked list part. He found it hard because it was harder to visualize than trees. He said that it also contained two objects which also made it a lot more confusing. He also started doing the lab much later than me, so that could have contributed to his experience as well.

Monday, 16 March 2015

Impressions of week 9: Test Week!

This week in the lecture, we went over what was going to be covered on the test and a bit of review. First we were told that the test covers week 5-8, which has lass coverage than last year. We were told we were supposed to know the tree definitions, so I went back to the old slides and reviewed the definitions. Also, we were supposed to know the types of traversals. There are three types, which are in-order, pre-order, and post-order. The class was also told we had to know how to write recursive functions on class Tree, so I went over that also. For binary trees were also had to know how to write recursive functions for it too, I also went over that. The last thing the class had to know was linked lists. There was small problem though. I didn't fully understand the concepts for it and it seemed to be pretty hard.

To over come the lack of understanding of linked lists I asked others and checked other slogs, my friend Tim wrote in his slog hat he didn't fully understand it either, but he said that redoing the lab and rereading it can be really helpful. I took his advice and went read over the lab again and re did the questions that I had the most trouble with. In the end it helped a lot and I felt a lot more confident for the upcoming test.

After doing the test, a lot of weight felt like it came off of my shoulders. The test turned out to be a lost easier than I thought it would be and it put me in a good mood! Some of the questions that I expected to be on the test was on it, so I felt well prepared. However, the question about the max and min height of the binary tree kind of threw me off, although I am fairly confident that I got it right, which is a good sign! I was also pretty happy about being able to bring a cheat sheet to the test. It allowed me to confirm that one of my answers were correct.

Friday, 13 March 2015

Impressions Of Week 8

On week 8 I learned about linked lists. There are two ways of thinking about linked list structures. The first way is to think of it as lists made of an item and a sub-list. The second way is to think of a linked list as objects with a value and a reference to other similar objects. My way of thinking about it is a train. I think of each section of a train as an object and the head of the train is index zero. First we learned how the node class __init__ method is written. Self.value is the value of the node and self.next is the value of the next node. If we are at the end of the list the value of self.next is None.

We also learned how to write a wrapper class for linked list. The instance variables are self.front; the front of the list, self.back; the back of the list, and self.size; the size of the list. Additionally, we learned that most of the work of special methods is done by the nodes __repr__, __str__, and __eq__. Then, once the special methods are done for the nodes, it’s easy to do them for the entire list.

We were also explained how to write a __contains__ method that checks every node if it has the same value of a specific object. To do that we would have to use a while loop to cycle through all the nodes.

Thursday, 5 March 2015

Impressions Of Week 7

During week 7 we learned more about assignment 2. Assignment 2 continues the game-playing framework of assignment 1. It adds a new game and a new strategy.

The new game is Tippy, a variation of Tic Tac Toe. In this variation instead of creating a line, you create a "Z" shape with "X"s or "O"s. In Tic Tac Toe if you play perfectly the game will always end up a tie. However, in Tippy if you go first you are guaranteed to win if you play perfectly and if you go second and your opponent plays perfectly you are guaranteed to lose. In my opinion, this means that it is really easy to test if you made a strong strategy for the game. Because if the strategy loses once when it goes first, it means that it is flawed.

We also learned about the minimax strategy. It is a strong strategy that assumes that both players are rational and have full information about the current game. It looks at the disadvantages of each possible move and selects the one with best outcome.

Finally we learned about rough_outcome. It makes an educated guess at the score without looking ahead of possible future moves. So it checks if you can win in the next move, if your opponent can win in the next move, or neither of the above.