Friday, 6 March 2015

SLOG Week #8

My impressions on week 7 can be divided into two parts: those that are Assignment 2-related and those that are tree-related.
Tree-Related Impressions
When Diana introduced the tree ADT, I was pretty enthusiastic (or at least pretty enthusiastic as one can get about ADTs) because, being very new to programming, I had heard them being mentioned but never really knew what they were. I was then further enthused because many a time, while programming, I was running into difficulties where I needed to express a hierarchal relationship and trees presented a big game changer. 

In Week #7 we were introduced to binary trees which I found were a lot easier to work with than trees with an unlimited branching factor because, instead of needing both a for loop and recursion to visit all of the children one need only use a recursive formula that calls self.left and self.right. 

I did, however, need a little time to practice the different kinds of traversal: in-order, pre-order, and post-order. When doing lab 6's implement parenthesize, for some reason my instinct was to follow a path all the way to the bottom like this:
Assignment 2-Related Impressions
Assignment 2 is going well. My computer is being really glitchy but beyond that it's going well. I keep worrying that my TippyGameState apply_move method isn't efficient enough simply because, when it checks to see if the game is over, for ever every move it sees if in relation to that spot the surrounding spots are filled in order to create a tippy. It's about 4, 80 character lines of code which just seems really long to me but when I asked some of my friends they had similar lengths for theirs

No comments:

Post a Comment