It is so amazing that we are at the end of the term now! It is indisputable that I have spent a fabulous semester of learning CSC148 with my dear prof, Danny Heap, and numerous outstanding geeks in this lesson. I feel excited and satisfied.
As far as I am concerned, CSC148 is a course that contains much more knowledge, tricks, methods and modes than CSC108 which I took last semester. Though we gained sufficient basic knowledge and rules in the latter course, putting them together and make them make sense and work could always be another thing. For example, even if I learned loop in CSC108 and could use it fluently, I could never know that there exist more efficient approaches without further learning of CSC148, or even in the area of Computer Science. Here I wan to talk about recursion, which is one of the most important methods I learned in this course. What recursion uses is no more than some loops, if-statement and calling ht function itself, yet it makes a big difference. It could deal with every complicated (mainly nested or multi-layered) conditions via defining the basic one and calling itself again and again. Methods like this is exactly what we need to learn after getting the basic and easy knowledge of programming.
Moreover, it also provided me an opportunity to brainstorm. I still remember the experience of designing and making Assignment2 in CSC148. The process of working on Minimax Strategy, in particular, impressed me a lot. There is no doubt that designing such a new strategy only by the result that the computer should gain the best opportunity to win the game is not easy for me. In order to tackle the task, what I could do was to study the specific logical process of such a strategy, and then brainstorm numerous possible solutions of every step. It really took me long time and much thinking on it, but I have to say that I gained deeper understanding for the strategy in a game, and, more ideas of designing a logical algorithm for a program. Now I would figure out the logical structure every time I write a computer program, A3 included.
All in all, I really appreciate that I could learning CSC148 and attain a large amount of new knowledge and idea in this semester. As I have applied for CS Minor, I am sure that I will learn about CSC course further in the future. The battle just begins!
Sunday, 5 April 2015
SLOG8: Revisit for SLOG4
The application of recursion is just beyond my original imaginary. Though I have talked about my experience for recursion before, with further learning in CSC148, now I just grasped more knowledge about recursion.
In the previous SLOG4 posted by myself, I mainly shared my opinion of the logical idea of recursion, such as defining one basic condition and connections between basic and complex ones. They are not wrong somehow, yet, I just missed something, or let me say that I misunderstood pats of the idea. At that time I believe that every recursion has to be here with a return value and when it meets a complicated condition, it would use the return value form last step to do the next running. However, that is not necessarily true. As I have mentioned last week, recursion could be called by a condition, and return nothing. This is so important for me since I could apply recursion further and deeper in the future coding work.
Anyway, making mistakes is also an essential part of making progress. Though I met some problems when I began working for A3, I actually gained new knowledge and experience from it.
In the previous SLOG4 posted by myself, I mainly shared my opinion of the logical idea of recursion, such as defining one basic condition and connections between basic and complex ones. They are not wrong somehow, yet, I just missed something, or let me say that I misunderstood pats of the idea. At that time I believe that every recursion has to be here with a return value and when it meets a complicated condition, it would use the return value form last step to do the next running. However, that is not necessarily true. As I have mentioned last week, recursion could be called by a condition, and return nothing. This is so important for me since I could apply recursion further and deeper in the future coding work.
Anyway, making mistakes is also an essential part of making progress. Though I met some problems when I began working for A3, I actually gained new knowledge and experience from it.
SLOG7: Impression of the week
With time going by, it gets closer and closer to the end of the semester. Simultaneously, knowledge, ideas and solutions in our minds getting more and more.
This week the main concentration of mine was on the new coming Assignment 3, which asks us to do more study of game strategy via writing a series of recursive functions. The general idea of them is to regard a game state as a tree with nodes as current game states and children as next possible game states with different next moves. You can even use a "grow" function to get all the possible potential conditions from a single original game state node.
I have to say that the "grow" function in A3 really changed my idea of recursion somehow. In the past I believe that any recursive function should have a return value since the next step of recursion would be based on the return value from last step. In other words, if one function is recursive, sentence like "return f(x)" should be contained in the body part. However, in fact, it is not necessarily true. The "grow" function just need be called again by every item in "children" parameter without a return value. And, as defined in its docstring, the "grow" function itself does not have a return value, but actually it could be fulfilled via recursion.
For A3 I find another student as a partner and one of my tasks is to finish the "grow" function. I really appreciate it since I got an opportunity to know more about recursion and could use it more effectively. Moreover, I convinced myself that the working process of computer code and logic design are never set curved in stone. They could fit any condition and requirement as long as used properly.
Though the writing work is not done yet, I believe that we could get a high mark for this assignment with tough studying.
This week the main concentration of mine was on the new coming Assignment 3, which asks us to do more study of game strategy via writing a series of recursive functions. The general idea of them is to regard a game state as a tree with nodes as current game states and children as next possible game states with different next moves. You can even use a "grow" function to get all the possible potential conditions from a single original game state node.
I have to say that the "grow" function in A3 really changed my idea of recursion somehow. In the past I believe that any recursive function should have a return value since the next step of recursion would be based on the return value from last step. In other words, if one function is recursive, sentence like "return f(x)" should be contained in the body part. However, in fact, it is not necessarily true. The "grow" function just need be called again by every item in "children" parameter without a return value. And, as defined in its docstring, the "grow" function itself does not have a return value, but actually it could be fulfilled via recursion.
For A3 I find another student as a partner and one of my tasks is to finish the "grow" function. I really appreciate it since I got an opportunity to know more about recursion and could use it more effectively. Moreover, I convinced myself that the working process of computer code and logic design are never set curved in stone. They could fit any condition and requirement as long as used properly.
Though the writing work is not done yet, I believe that we could get a high mark for this assignment with tough studying.
Subscribe to:
Posts (Atom)