Saturday, 10 December 2011

From thinking about Algorithms to thinking about AI

Thinking up algorithms.

This is the major aspect lacking in the CS curriculum in general. We are taught many examples, and while it allows some inductive learning, I don't think I have really mastered the art of writing algorithms. Sure we can understand them quickly after learning, but it's just amazing how great algorithms require a lot more thought to create, even if it can be stated in one A4 page.

We don't really know which path to go down and can only guess by experience. The rest appears to be plain hard work/luck/intuition. Following the frameworks of thinking will get you half the way, but there are intellectual hurdles that really differ in difficulty for different minds.

This all seems so similar to the P NP problem, where a solution can be checked very quickly, but getting to that solution takes exponentially longer.

In the context of programming, the issue is roughly equivalent to how some programmers always write less efficient code, use more memory/steps. Some people just don't look ahead so far enough to see the alternatives.

Refining and learning are integral parts of computer science. The only trick is to do that faster and more thoroughly and reduce repeating identical problems. And how do you learn faster? By making more, different mistakes while doing what you want to do. And that's probably the best thing a CS course should teach, especially to most students who are not gurus at what they do.

( Many CS students actually dislike programming and try to avoid such courses whenever they can, because let's face it - bugs can be scary and annoying. They directly mirror your thinking, of which they are a product of. They make you see what you don't want to face. I suspect most people don't want to see themselves as flawed and prone to error. It just doesn't seem to fit the self-image (and socially approved/generated image) of a professional, a "good engineer", or excellent student, or successful person. I find that too. It can be psychologically straining because your mirror image isn't what you want. )

The same philosophy should be applied AI. Instead of having to get the whole thing right from a top-down design to working prototype, working on efficient self-learning with minimal code should be the method. Allowing it to make mistakes and take chances, but having the capabilities to learn about itself and the universe. (And eventually defining for itself what a mistake is.)

But isn't this contrary to many applications that we want to use AI in, where we want them to be perfect, bug-less and infallible or else the mission fails? This is where the field of AI splits. On one hand we want predictable, correct behavior all the time, preferably proven algorithmically correct. On the other we want them to be as adaptable as possible and be autonomous and free, hopefully doing things we don't expect. I argue this division is mainly due to what we think the role of AI ought to be, what we want them to do and how we think about intelligence.

Do we want them to be like slaves to be commanded and made to serve, or free individuals?
(This has a lot to do with how we already see other people and objects in our environment. )

Wednesday, 7 December 2011

Yay, last assignment of the semester.

Having Complete the last programming assignment of this semester, I wonder what could be coming next.

Through these trials, I think most Computer science students have become better at coding and thinking accurately about practical problems. However, it's never going to be "enough" because the set of challenges are infinite and even though it's always those building blocks (eg. loops, recursion, types, parsing, data structures, algorithms), these sets themselves are infinite and subtle superficial changes in the problem lead to greatly different data structures and algorithms.

It's awe-inspiring.

I'm particularly happy with this assignment because it was really quite a group effort. I wasn't good at regular expressions, and this guy had studied it before. He taught me that, but he was also stuck on grammar rules. I figured those critical issues out (which were not even documented in assignment nor manuals), and we leapfrogged through to the finish line. I suspect either of us would have found it far less motivating and more troublesome if we did it alone.

That felt awesome and has defined a new standard/expectation of the software development process. I guess you make career decisions subconsciously then and there, whenever you are actually working on something challenging.

And soon, I will be doing the same in Singapore...

Tuesday, 6 December 2011

Keyboards and Typing.

I've realized that since studying computer science I've been unconsciously typing faster than before. I think it is like a 60% increase on average from around 40wpm.

And for some reason, the more I type, the happier I get. I enjoy the feeling of my fingers on a smooth light bouncy keyboard that sounds like rain on a plastic roof. I am particularly fond of DELL keyboards in general (but especially the newest versions, worn down by a semester of finger pounding by UST students). I dislike Lenovo keyboards because they have Chinese typing inscriptions on them that makes them really rough on the fingers with all the friction, and not being as crisp and light.

I like the thrill of typing quickly and subconsciously, especially when the code/English just flows.

Having said that I'm looking out for some better keyboard all the time. If it's really worth it, I don't mind having my own private USB keyboard.

Monday, 5 December 2011

Reading speed

After 1.5 years of college and 19 years of living experience of which I spent 5 years able to read sentences and paragraphs, I conclude there are only two speeds that people should read at.

1. Very Slowly
Reading so slowly (and out loud for comfort) that by the end of reading an incredibly difficult question, I figure out exactly how to do every step to solve it. Slowly is actually quick because you increase speed naturally while maintaining comprehension.


2. As quickly as you can:
For noticing particular things I want to think through. This can be at least over 10 times over the speed of slowness.

For reading the bloody newspapers. These days, most newspapers are generally full of blood-soaked news. I set the emotion behind and pick out the details very quickly.

Also things like facebook and slashdot comment sections. I find it sad that people can stare at their facebook walls for so long.

Other speeds are pretty much unnecessary and unworthy in the digital age.

Monday, 28 November 2011

Universal Grammar

While my mind is cooking on the syntax of Bison and Flex and scheme, I was browsing on the Universal Grammar.

Universal Grammar is a theory that argues there are common structural characteristics between all languages, and that human beings have evolved brain/mind mechanisms to deal with these structures quickly.

Right now, since I am working with parse trees, I would argue that the mechanism has to do with white matter, trees and hence grammar (To a male with a hammer, everything is a nail.). Here the definition of language is a subset that can be generated a grammar.

In defining a grammar, many substitutions are used. The trees are built by recursively substituting blocks. Computer scientists generally have to be brilliant at doing this on all levels, but they are not the only people who do this a lot. All definitions, sentences, words and all language grammars do this all the time. You can build trees out of all of this, and subtrees below that, and so on, until the trees wrap around themselves in loops and become graphs. (And then you end up with some ridiculous number like around 176,000km of interconnected white matter in my brain, which is around the earth three times.)

As animals with brains, we were born/equipped with many trees that when evaluated (or evaluate themselves), control behavior. These trees allowed increasingly sophisticated kinds of behavior, but they are usually hardwired and not highly adaptable.
As humans, something must have happened for us to be able to expose these tree building, extension, manipulation (eg. substitution operations), reading and evaluation, allowing us a higher degree of "self-manipulation" than arguably any other creature/thing (possibly except the electronic computers).

The problem now appears narrower and within current knowledge, as it is extremely likely whatever idea this is should already have been thought through and implemented.



To be Continued...

I think the trees are probably all preformed, but I suspect it is the ability to shift focus that makes the difference.

trees formed ->
initial hardwired focus directing programs controlling what to be conscious of / "pruned" ->
focus could be directed at the focus directing programs. How this could occur, not sure... ->
a model of the focus directing program can be produced. ->
the model allows organism to "hack" its own focus, enabling "self-interest" in something. -> Focus now has many degrees of freedom.

And then, we learn routines to jam symbols into words and manipulate them. How that is done remains to be seen.


...
I believe some people know this already and have better language to show it.

Wednesday, 2 November 2011

A mini tweet

This dead processor thing is one of those things that can make me really annoyed, apparently.

So unexpected and personal.