Tuesday, March 17, 2015

Week 10: Assignment 3

Again, the strike continues, and it's beginning to take its toll. I haven't really been following up on the lab material, as I should have, because of the chaos that has been going on. Debates being turned into term papers, assignments being pushed forward or pushed back. It's been a crazy time. In particular, the wording of the last couple of labs has been a little confusing and off-putting for me, and I'm not very sure how I should approach them.

Regardless, I've been working on Assignment 3, and it has been successful for the most part. Again, in this assignment we are working with trees. However, the tree is composed of GameStateNodes. I found that this lab required an extensive use of helper functions that simplified the assignment for me.  The difficult part was identifying the helper functions that were needed.

I had problems with two of the functions in the assignment, but these problems were fairly quickly overcome. Strangely enough, I found that assignment 2 was leaps and bounds more difficult than assignment 3. This may in part be because I chose to complete Option B rather than Option A, which seemed to be a longer undertaking.

Anyways, branching_stats was one such function that I had difficulties with, as my preconceived notions of dictionaries in Python were lacking. I kept attempting to use the .add() dictionary method, to no avail. A little tinkering around with dictionaries put me back on track.

Another function I had difficulties with was a helper function I used to collect all of the paths in the tree. I had difficulties conceptually seeing the path I had to undertake so as to obtain the path in each tree. Although I could see how I would go about doing this visually, I had difficulties translating it into code. After deriving the solution for the answer, I was saddened by how simple the answer really was, and how long it took me to find the solution .

I think recursion is definitely a concept that does not come easily to me. It will most probably be a concept that I gradually come to terms with as I grow as a programmer. I worry for myself, as I am concerned that I will not do well without having a fully understanding of recursion going into the exam and into 2nd year programming courses.

Regardless, all I can do is try harder.

No comments:

Post a Comment