Friday, 27 March 2015

Week 11

  I am amazed by how fast the school year has passed by.  I can recall my first lecture in csc108 as if it was just last week.  Looking back at my slogs, I was quite surprised that I've wrote so many.  If we were not asked to reflect on our past slogs I would have thought I only had a few entries.

  Looking at my slogs I can clearly see that slogs served the purpose to help me organize the course materials learned in class.  After every lecture, my learning seemed very abstract.  With the help of slogs I was able to reexamine the course material that I was unable to immediately understand in class.  Slog allowed me to organize my learning and develop a deeper understanding of the material.

  While looking back at my slogs was interesting.  I found it fascinating to read others as well.  Indeed two heads better than one.  I noticed the smallest yet important information that I've missed when writing my slog.  After reading some of my classmate's slogs.  I especially liked this one (http://sosocompsci.blogspot.ca/).  He often integrated example codes when explaining his learning experience.  Overall I found that reading my classmate's slogs really help me with learning as well.  I wish I had knew this earlier and benefit from the experience of others.

  One of the most important thing I believe that I've learned in this class is the importance of planning.  I've learned from a painful experience in the first assignment.  Me and my partners were too used to the csc108 assignment and started to write as soon as we thought we got the "idea".  Later, we had to restart everything because what we attempted to do was completely incorrect.  In comparison, A2 and A3 were much better as this time we actually considered the concept of the code before blindly starting to write.  Not that A2 or A3 was easier than A1, but due to efficient planning everything progressed much smoother.  Not only did we save a lot of time also a lot of dispute and argument.  Unlike in A1, after we finished the code we felt more like a team rather than individuals.

Friday, 20 March 2015

Week 10 - Impression of week 9

  In-comparison to every other week, week 9 felt rather tedious due to the occurrence of the second mid-term.  Despite having only 1 hour of lecture this week.  We've covered some quite interesting yet complicated concept of insert and delete of binary search trees.  At first it felt like a simple add on to the previous week lectures.  However later, I found that this new concept is quite sophisticated, especially the delete algorithm.  Luckily it was not part of the second mid-term coverage.

  The mid-term wasn't favorable to me as I screwed the very first question.  On the cheat sheet that I've prepared, I thought of the possible questions on the mid-term and adjusted the information with the reference to the past mid-terms.  Ironically, it is the absolute fundamentals that I didn't well prepare for.  As for the first question, instead of adding 1 I've decided to subtract 1 in order to obtain the height.  So my answers are very likely 2 smaller than the correct answer.  If I'd took the time and double checked my answer I would have realized how foolish of a mistake that I have made.

  From this experience, I've learned how important it is to understand the essential knowledge.  Hopefully I won't make the same mistake again on the final with is worth 40% of this term.

Monday, 16 March 2015

week 9 - impression of week8

  In this week, we have learned a new concept called linked list.  At first I thought it would be a new type of list judging from it's name.(like nested list)  However it is nothing like what we've learned before for example a set of objects in square brackets.  Rather, it looks more like an other type of tree.  Perhaps in my mind at the time a "singular" tree with the reference to the binary tree that we've learned just recently.

  To my understandings a linked list is a sequence of a group of nodes linked between their predecessor and successor.  During the lecture, we were shown an example of linked list expressed by two separated classes called LinkedList class and LLNode class.


  In comparison to the most original list, the linked list is extremely organized and well sorted.  Seems to me that making changes in the middle could be quite troublesome calling upon the two classes.  It is quite interesting and judging for previous experiences we are likely to be using this concept in our final assignment 3.

Thursday, 5 March 2015

Week 8 - impression of week 7

   Our biggest challenge this week was the assignment two that was due Thursday.  In-comparison to assignment one, the assignment two was much more "demanding" I would say.  Especially the computer strategy.  In the subtract square assignment, we were able to simply import random and use the randint function to help us achieve our objective.  Where as this time we had to actually write our own function called minimax.  Beyond that, assignment two tippy games was based on the concept of tic-tac-toe.  However, much more complicated as the winning conditions had variations in-comparison to tic-tac-toe.

  At first it wasn't hard to come up with a viable plan for the minimax function.  However it was much more easier said than done.  We had zero clue how to achieve such a complex algorithm of calculation.  Due to stress, my group had a dispute over 2 ideas of whether to set the game board as a dictionary of ints where each integer represents each square on the game board.  Or to perhaps set coordinates instead.(x-axis and y-axis)  After hours of debate, we decided to go with the simpler method.  To set the game board as a dictionary and have all the check on the game board represented by an integer as the key of the dictionary in order to keep track of the game state.

  Moreover, just as we though we were about to finish.  We've encountered an other problem and that is the rough outcome method in the game state.  And that was how round two of the dispute begun.  One of my teammate came up with a brilliant idea of comparing the amount of the potential winning conditions each player had.(counting the 3 connected pieces of similar chess, basically the conditions which only requires 1 more move to win)  And the player with the most 3 connected pieces obviously has a higher chance of winning the game.

  After experiencing this extremely difficult assignment, I can't wait to see what assignment three would be like.  Hopefully I won't look like this.