Despite the fact that last 2 assignments involved writing and optimizing deeply recursive functions, I don't think I'm as comfortable with recursion as I can be. Of course, I understand how they work and how they're created, the concept of looking at base cases and calling recursion in all other cases helps a lot, but the functionality - where to add something to the output, where to modify some other parameters - is still not as easy for me as it could potentially be. Again, writing Minimax for 4 strategies helped a lot, but I think that my understanding of recursive functions can be further improved. However, the problems that I'd been experiencing previously (where a recursive function should call itself, etc.) are now gone, but modifying the output so that the output from the "root" function depends on outputs from all "node" functions can still be tricky at times. I believe, practising writing recursive functions can help me understand this part a great deal - at least, I feel that there've been much improvement since I first encountered recursive functions. I believe that I've developed some sort of "feeling" for recursion so that the whole concept is not as alien and "technical" as it used to be. In fact, recursion is itself a simple concept, but not always intuitively understandable, as it's farther from real-life ideas that we accustomed to in CSC108.
Anyway, now that I'm familiar with recursion, a whole new field of exciting opportunities is now open to me, as many more types of data can be traversed and/or operated upon using recursion. I haven't tried writing Minimax not using recursion, and something prompts me that it's not practically feasible.
Anyway, now that I'm familiar with recursion, a whole new field of exciting opportunities is now open to me, as many more types of data can be traversed and/or operated upon using recursion. I haven't tried writing Minimax not using recursion, and something prompts me that it's not practically feasible.