четверг, 1 ноября 2012 г.

Consciousness Hurts

Being interested in the field of Artificial Intelligence I often stumble upon the question of how to make some artificial system capable of telling good things from bad ones. Because I am much more of a dreamer than of an engineer, multiple supervised learning techniques, which are widely applied and have proven quite useful, offer little satisfaction to me. The problem with them is that supervised learning algorithm merely provides the system being learnt with a set of questions associated with presumably right - or, to be more precise, desired - answers. Afterwards the algorithm does it's best to adjust the system's guts in such a way that it will give the right answers to the right questions - at least, in most cases. As for unsupervised learning techniques, these differ in some way - particularly in terms of applications, although they remain external algorithms trying to adjust the trainee's internals in a manner allowing to minimize the proportion of wrong answers, which are now defined by the algorithm implicitly. While dealing with different machine learning stuff I saw both these approaches producing amazing results, so I am more likely to exaggerate their power, than to underestimate it. Still I never ceased thinking that these fitting activities are too distant from the notion to which the term "learning" originally refers. The information fed to our machine learning tools obviously becomes a subject to some sophisticated memorization and even generalization, nevertheless I can hardly say that it is learnt.
This issue was made apparent to me by artificial neural networks. Inspired by nature - the nature of our own brain - many of these models clearly demonstrate how helpless they are until someone arrives with a proper learning algorithm and how much closer they stand to an adjustable screwdriver than to an ant. All the learning is applied to these things from the outside - it is the overseeing mechanism, learning algorithm, that makes adjustments to the system if it performs not well enough during the process of learning. Moreover, this same algorithm is the only thing, that knows what does it mean to "perform well". I know I am not of this kind: I can get beaten by a teacher, alive or not, if I don't learn a lesson properly, but it's not the teacher, who makes me learn it and imprints knowledge into my brain - much greater role is played here by my emotions and feelings: pride or shame, satisfaction or disappointment, relief or pain.
Pain is an interesting and off-putting thing. Few if any things in life concentrate our attention so completely and terribly, and few things are more boring to listen to or read about. 
Dan Simmons, The Rise of Endymion 
Pain must be the most well known teacher - I mean there is hardly anyone conscious in our world who hasn't ever learnt something through pain - almost everyone has felt it and everyone tries to avoid it. Thus pain is possibly the most comprehensible indicator of doing something wrong and the memories of pain experienced as a result of some actions do their best to prevent one from behaving the same way in future. The high-level mechanism here looks quite simple: pain is not a pleasant sensation at all, so the things which cause it are assessed unpleasant as well. Actually, I believe we can go a little bit further to note that the thing is tangled - although pain is harsh itself, it is also strongly associated with probable injury and is therefore - mainly subconsciously - deemed dangerous and unwelcome. I also feel that it is quite safe to assume that our mind associates the feeling of pain not only with injury, but with the possibility of death as well. Taking this into consideration, there is nothing surprising about the fact that a severe agony may totally absorb one's mind - when death is possible it doesn't seem affordable to let the mind's owner think of something except the ways to escape the least desirable event. An argument supporting the idea of this strong association between pain and death may occur from the fact that an agony itself may be fatal, although I'm afraid that the underlying mechanism of neurogenic shock is too weakly related to the notion of consciousness and so this example is not that applicable here.
So pain is a powerful mechanism allowing us to avoid some negative events or, put another way, telling us that certain things are not good, may even appear harmful and therefore should be avoided. It is important enough, but what makes it more interesting is that this mechanism is embedded in the system - our mind and body - in such a way that it is impossible to distinguish it from the entire system itself. We could suggest that multiple sensors spread through our body act as sources of pain - it is true to some extent, but it is not the only case, unless we claim phantom limb syndrome a sort of magic. Furthermore, I believe there is no special 'device' which is fully responsible for sensations of pain in our body - the entire nervous system takes part in producing pain as well as most other feelings, which we experience during our lives. Resulting from the overall behavior of myriad neurons linked together, instead of being produced and managed by some localized distinct components of the nervous system, these strongly related sensations are also linked closely to such activities as motion, vision, thinking, learning. This sole fact allows pain to be quite a successful teacher and makes it so different from all the mechanisms used in machine learning techniques, which I have seen so far. Since it is so overwhelming - in terms of both it's impact on our life and of the degree in which it is interwoven with all activities of our mind - it is impossible to ignore the concept of pain when one wants to ignite a spark of consciousness in something that didn't show it so far.

Maybe, speaking of pain I have made the colors too dark, but the picture is not that grim. All kinds of our feelings and emotions play a vital role when it comes to thinking and learning - to being conscious. I could have chosen anything more appealing - say, pride, satisfaction, love - whatever. It was the relentlessness and severity, with which pain invades our mind, that made me write of it.

пятница, 20 июля 2012 г.

Learning to Program

About a year ago I took part in a vivid discussion of the best choice of the first programming language to study. The discussion didn't lead to any consensus thus making me think a lot about the question itself as well as remember the path along which I moved through the land of the programming craft.

вторник, 19 июня 2012 г.

A Justification for Excellent Marks

Being a fifth year student these days I am experiencing my tenth set of exams in university (oh, that's an anniversary!) As some students do I become tired and nervous when a semester draws to a close and consequently to exams - this particular semester is not an exception of any kind. These feelings usually are not caused by intensive studying during the term - instead these tend to be produced by insufficient studying. Moreover the lack of confidence is intensified by the simple fact that your knowledge and skills are to be condensed into a set of raw numbers or other symbols - your marks. 

I suppose that such state of affairs feels familiar to many students and I believe that some of them have faced an idea that the marks are frequently irrelevant as well. Saying 'irrelevant' I mean that marks do not reflect the level of student's knowledge and skills - the notion is evident considering the fact that generally it is too difficult to accurately assess the person's skills as well as knowledge by the means of a single examination and, besides that, such an assessment - even if it is accurate enough - can be much harder to map to the domain of numbers or symbols like A and D - the appearence of marks doesn't matter. This idea looks as obvious as safe, although some of it's derivatives turn out to be dangerous - it is very easy to decide not to perform any active preparation for exams if one believes that marks don't bear any meaning. Really, what can make you fight for treasures if you know these cost hardly anything?

Another problem that I see discouraging students from active studying in the end of a semester is seeming futility of some courses. It strikes hardly in most Russian universities where curriculum is fixed - that is the speciality you choose when enrolling or after the first year of study determines to the extent of 90% the set of courses which you will study. Such a system somehow simplifies student's life, but it also has significant drawbacks  - one of these is the possible and rather common failure to assure students that they actually need to study some particular discipline. This hardly helps students' training - particularly it fails to make them actively and properly study for exams. These arguments against preparation for exams may sound sensible - nevertheles I will try to partially overcome at least one of them - namely the idea that marks don't reflect the things they are supposed to reflect. 

Let us put the question "Should we actively prepare for exams?" aside for a moment and try to understand why don't marks reflect the level of student's knowledge. As I have said it may be rather difficult to evalueate the level of knowledge via an examination. These difficulties are generally caused by the nature of examinations - I mean the examinations that usually face. Commonly the person who tests you tries to evaluate your skills by analyzing your response to his or her questions. Moreover, examiner usually pays attention not only to the correctness of your answers but also to their completness as well as to your behaviour. Answering questions correctly and completely may require remembering a lot of things while making a proper impression on examiner is possible if you feel - or, at least, look - confident. I've already mentioned the possibility of significant problems with confidence during exams. As for remembering lots of details relevant to any particular course, I truly believe that such a thing is not of any importance if we speak of education and skills obtained through it. Moreover, the more we move towards the age of higly available learning and reference materials (or are we already there?) - the less inportant becomes one's ability to remember numerous low-level details. Here is a simple example: some programming language tutors (not very good ones usually) do prompt students to remember various very-low-level syntax features of the language being learnt, while from my point of view it is much more important to explain students the overall capabilities of the language and the key paradigms it is based upon. At the same time remebering low-level stuff seems to me not important - it will be developed through writing many programs - not through learning the things by heart. This idea becomes quite vivid when we speak of a language with complex syntax - say C++. I don't actually remember all the low-level details of this particular language, but it doesn't prevent me from writing programs in it because I usually need hardly a couple minutes to consult language reference available online about any particular detail that I need to use. Such an example of examiner's requirements may seem exaggerated but I do occasionally face something like this and encounters of this kind don't encourage me to study harder for exams - in fact these don't motivate to anything good at all.

From the other side the requirement to remember huge amount of non-important details is frequently delusive. The reason for this is that right-minded and experienced examiners usually ask questions that do not require all the irrelevant things like remembering low-level details - instead they know the questions that allow them to more or less accurately assess whether or not a particular student understands and feels the subject. So their questions prompt students just to combine good reasoning with their conceptual knowledge of the course subject. I aknowledge the fact that not all examiners behave like this, but I do hope that most teachers that one faces during his or her study do have preoper objectives and therefore perform examinations in a good way.

It turns out that thinking of your examiners as of the good ones is quite a good and helpful attitude because, besides the fact that it is the right way to think of other people, it also helps you switch the process of preparation for exams from attempts to memorize lots of facts to the study intended to develop deep understanding of the key concepts, problems, techniques and other high-level stuff that is truly relevant to the subject. However, even in case you believe that the person who performs examination is a dumb monster requiring only absolutely irrelevant things from you, the situation is not as bad as it may seem from the first glance. Firstly, it is common to have wrong impression about the examiner and secondly, even if you are not mistaken, the preapration for exam won't do any harm to you (except for consuming your energy, of course) - instead it will still help you dive deeply into the matter of the course and hopefully get out of there possessing really good understanding of the stuff. In fact, if one meets the need to memorize lots of details, one will firstly try to understand the forces that produce these details and the connections between them - that is, unwilling to remember many irrelevant things, one's mind will attempt to understand the relevant ones.

So the intensive preparation for exams seems to be worthwhile. That's why, while I still consider marks non-reflective of one's knowledge and skills, after posting this entry I am going to get back to studying for my next examination. To be honest, I should note that, despite my beliefs, I am still quite eager to get good ones - sometimes the contradiction feels confusing. However, there are at least two obvious ways to make marks meaningful: either do nothing, or study hard.

четверг, 3 мая 2012 г.

Exploring Chaos through Python and Tkinter


This relatively long entry describes some of my attempts to explore interesting stuff related to the origins of Chaos Theory. The experiments I describe here were carried out several decades ago, so I haven't invented something new, although I suppose that the stuff I show may encourage the reader to study the field on his own. 

While the first and the third parts focus on things related to Chaos Theory, some simple although nice math and, mainly, on the impression that this stuff made on me, the second part exposes code that I've written trying to achieve two goals. First, I actually wanted to do the metnioned experiments on my own, second, I tried to gain some experience with Tkinter python package for creating GUIs. Due to simplicity of the experiment I suppose that Part Two may be interesting only for those, who want to take a look on the simple interactions with Tkinter.

(In case you want just to see how complex can be the behavior of the simplest possible discrete chaotic systems, you may visit my site - there are some playable graphs)

Have a nice reading!

пятница, 13 апреля 2012 г.

The Two Sources Rule

The notion that in modern world the amount of books and another written sources of information is overwhelming is not fresh at all. It was introduced several decades ago and has been becoming increasingly actual from then on. The invention of the Internet eased the problem in the way that it made the process of finding and getting books and papers that suit one's needs less painful. From the other side it left unsolved the problem of choosing a particular book. In fact, the issue became even more complicated given the fact that nowadays almost everyone can write a piece and publish it in the web. This leads to an increasing amount of written materials, but the good papers vs. bad papers ratio is likely to stay the same (in the best case, I mean). I suppose that frequently one's choice of reading is based on other people's recommendations (at least mine is) and this idea raises the following question:
How do we know who's recommendations should we trust?

Not so long ago I've explored a sort of rule that seems to guide my choice of reading . This rule simply states that I tend to read the books which were recommended to me at least twice, by two different people. The recommendation here doesn't mean that someone directly advices me - it may be a mention in another book I am reading, citation in an article or a review in a blog. (By the way, I've just said that most of the books I read I find through reading.)

It is important to note that I don't mean to say I had somehow developed and formulated the law and had been deliberately following it from then on - no, the thing has developed without a minimal effort from my side and I've only noticed that generally I do unintentionally follow it. 

Another interesting detail here is how I prioritize the sources of such recommendations - that is who's advice do I trust more. Plain logic suggests I should pay more attention to the advice given by the people I know well and vice versa. Surprisingly, it turns out that I tend to consider the recommendations by people I don't know personally more valuable and trustworhy than those coming from my friends or family. Such recommendations often appear from blogs by different programming and CS-related people (that's obviously because most blogs I read are mainteinde by people of this kind) - for example, recently I started reading "Godel, Escher, Bach. An Eternal Golden Braid" by Douglas R. Hofstadter and for that I should thank Professor Eugene Wallingford who has mentioned the book in his blog.

One more non-perfect example supporting the idea is related to the "Seven Habits of Highly Effective People" by Stephen R. Covey. My father had adviced me to read the book when I was about 15 years old. I did read it, but several years later - when I was 19. The thing that made me open the "Seven Habits" was a blog entry mentioning it by an individual whom I admired but never knew personally. I say that the example is not perfect because it fits precisely to the title idea of the entry - the book was recommended by two distinct persons and that may have made me start reading it. At the same time, the question of how I prioritize recommendations depending on their sources has first occupied me exactly in context of the advice that led me to reading the "Seven Habits" book.

Sincerely speaking, I can't find any good reason justifying such a strange priorities. The only idea I have about these is that most blogs and papers from which I get information on books are somehow connected to the fields of my interest whereas my father has nothing to do with, say, Computer Science or programming. This may be the point why I pay more attention to the recommendations from the blogs than those from my relatives - the former are just closer related to the stuff I am interested in. Still, this belief of me paying less attenton to my relatives' tips may prove to be false - especially considering the fact that I have read several books on economics that my father encouraged me to read - but, in case I'm not mistaken about the existence of such a rule, there must be some better explanation for such a strange prioritizing - an argument I can't formulate right now.

воскресенье, 22 января 2012 г.

Simple Models

Recently I've started exploring Microsoft XNA platform. In an attempt to get familiar with numerous powerfull tools it offers I've decided to use it to accomplish some relatively simple but interesting task that will make use of graphics but won't prompt me to focus on sophisticated graphics stuff. Due to some strange reasons I've choosen to start with developing Rubik's Cube puzzle game. The idea for application here is quite simple - the only thing my game must offer to a user is an opportunity to solve the well-known puzzle on a computer screen.

As for development,the task accomplishment, roughly speaking, requires two smaller problems being solved: firstly I should design a Rubik's Cube representation for storing and modifying tha state of the toy in line with player's actions and secondly I need to introduce routines for showing the Cube in an appropriate state on the screen. I haven't started writing graphics-related code yet, but I feel I'm almost finished with the first stage - that means I have developed a couple of classes representing the puzzle which provide convenient ways for performing any required in-game operation on the toy (e.g. rotating one of the cube's faces).
These recent efforts to develop a simple and convenient model of a real world object encouraged me to think over Leonard Susskind's words across which I had come some time ago. Speaking about the legendary physicist - Richard Feynman - Susskind had said:

"He [Feynman] truly believed that if you couldn't explain something simply, you didn't understand it."

My intuition supported this idea long before I've heard these words, although I have never thought about it deeply. However this time the attempts to design a representation of a real world thing combined with revisiting Susskind's speech made me contemplate the thought.

The above quote suggests that to understand something one needs to have a simple model of the thing in mind - only possessing such a model one can explain something - that is share the model - and the explanation will be simple only in case the model is. In fact having a complete model of some object or process means understanding it - and vice-versa - so the only way to understand something is to study or design a model of the thing. A task of designing a model is usually a hard one and requires a lot of work to be done. Such a design process involves overcoming numerous problems which actually help the developer to form a better understanding of the entire object or process being described. Obviously it is difficult to design either a simple model of an object or a sophisticated one, but surprisingly the former are usually much harder to discover and develop. That means one often needs to do much more work, to face much more problems to achieve a goal of designing a simple but workable model - that is precisely one of the reasons why simpler models correspond to a better understanding.

However we actually don't design all the models we use ourselves - we tend to take ready ones and use these for our purposes. In this case one can't directly benefit from the difficulties connected with developing a simple model, though one benefits from the model's simplicity itself and really understands the things better than in case he would use a large and sophisticated one. That's because our mind's power is finite, hence it may be quite difficult for our brain to handle a sophisticated thing - roughly speaking it may fail to 'cache' a complex model completely with all of it's numerous although important details. I suppose we tend to unconsciously simplify the model if one is too sophisticated for us to handle, but in case our mind is not familiar with the model such a simplification may result in losing some important details which are just cut away and eventually this will lead to mistakes.

In this way simple models really produce better understanding through representing corresponding objects in a complete and convenient (particularly for our mind) manner. Moreover such models have another advantage over the complex ones: if your model is simple it is easy to share it because it can be explained simply.

среда, 4 января 2012 г.

Righteous Insomnia

Note: I do not connect the word "(un)righteous" and any of it's derivatives with religion - either with any specific one or with religion in general. A kind of explanation of my understanding of righteousness and unrighteousness may be extracted from the lines below.

About a half a year ago I've somehow concluded that insomnia is caused by living an unrighteous life. The reasoning behind this conclusion is pretty simple and obvious: insomnia is usually closely related to unstoppable thinking about problems and choices one encounters and with the attempts to find proper solutions to these problems and to make a good choice. At the same time inability to solve a problem or to make a choice is frequently caused by a lack of inner principles or by failing to follow these. This way we come to unrighteousness because being unrighteous means exactly to be unable to follow one's moral principles or to lack these principles.

The simplicity of such an explanation to insomnia attracted me. Moreover there is another reason why I haven't explored the problem deeper - everytime I struggled with insomnia myself it had been precisely because of my own lack of righteousness and for an unrighteous one it was much more difficult to see one more possible reason for insomnia. If you think this out you may notice that such an explanation to the problem of insomnia isn't complete - that is it fails to predict insomnia in some cases because righteous people are exposed to the problem too. Moreover it is easy to discover that if one has very strong moral principles, is confident about these and doesn't fail to live accordingly, then such a person has even greater chances to encounter insomnia one night. In other words, the more righteous one is - the more is he or she exposed to insomnia.

The explanation here turns out to be fairly simple too: righteous people are usually surrounded by unrighteous ones and the fact is that the former tend to care about the latter. So even if you're extremely righteous, your relatives and friends sometimes do act in an unrighteous manner and if your principles are strong you may at least get upset if someone you admire acts in a manner you consider wrong. This way when a close friend of yours behaves unrighteously you feel sorry and sometimes even guilty for that. Whenever feelings of this kind prevent somebody from sleeping I would call it a righteous insomnia.