Back
in high school, in my Grade 10 Computer Science class, I was introduced to the
concept of "dynamic programming" for the first time. We never used
it, but our teacher only mentioned what it was like. He said that the code changes as the program runs, which I thought was a pretty cool concept.
Of course, in my naive little mind, what I thought was that the actual code
changed - that is, if you looked at your code from time to time as your program
was running, it could be different. (Yea, yea, laugh it up. There's a reason I
said 'naive'!)
The
idea of memoization is much more plausible and still just as awesome (and
efficient!). I actually unknowingly used memoization back in Assignment 1 with
the Tour of Anne Hoy, using a dictionary to keep track of what was the best
split value for different numbers of cheeses. Running into it again in the
context of call stacks, efficiency, and the Fibonacci sequence made me realize
how powerful this concept is, even though it's not really a complex one.
The
implications of memoization take my thought process straight to artificial
intelligence. It brings to mind the idea that the computer is
"learning", in a sense, and is able to retain information as it is
running just like we learn things through our senses in reality. I don't know
much (or anything) about artificial intelligence, but memoization seems like a very
basic application of it. As I mentioned in a previous post, my
Grade 11 and 12 Computer Science teacher once said that computers do exactly
what programmers tell them to do, the only difference being that computers can
do them much faster than humans ever could. But, with the advancement of
computer science, artificial intelligence is giving computers much more than
just blinding speed. Combine the speed of a computer with artificial
intelligence, and ... Well ... You've seen the Terminator movies. You should
know. ;)
No comments:
Post a Comment