INDIA hitXP.com - Gurudev's Personal website

THE GREAT VEDIC CULTURE Physics - Chemistry - Mathematics - Bio-Sciences - Computers

HOMEHome >> Computers

Meet me Online @ Yahoo! - itzguru

Google
Search the web Search hitXP

Next Generation Software

Ever since the birth of Software, the power of this huge array of bits and bytes has revolutionized our lifestyles. We all know how. So let us move on to the next generation software now.

But what is this next generation software?

Software that thinks!! 

Why? one might ask, don't software today think? The applications we write which make decisions based on the conditional statements empowered with Boolean logic, aren't they thinking?

Well, I don't think so. For me it looks like the thinking logic is hard coded into it. It actually doesn't think at all, instead it just analyses the present condition (based on available data) and executes a bunch of statements accordingly.

For instance , consider a simple code block to find the quotient of a number divided by another:

            Q = N1 / N2

The above line has three variables, The quotient of N1 divided by N2 is calculated and the same is assigned to Q. A very simple block of code, isn't it? But is this fool proof?

Not really. As we know this will fail if N2 is zero. So right now our code doesn't think before dividing. It JUST DIVIDES! We make it think (I mean, we make it appear to be thinking) by using a conditional statement to execute the above statement as follows:

If N2 != 0 Then 
       
Q = N1 / N2

But is this what we call thinking?? Take a closer look, it is not at all thinking, it is just following what it is asked to follow. There is no way for it to skip division if N2 is non-zero.

So then, what really is thinking? 

Well, heard about fuzzy logic? Unlike Boolean logic where the truth value is absolute i.e. either true or false, in fuzzy logic a truth value might be somewhere in between the two too. If we consider 1 to be true and 0 to be false, then in fuzzy logic we can also have truth values like 0.22, 0.45 etc.

But how can something be partially true or partially false? 
Heard about quantum mechanics? Well, I am not going to frighten you with all those complicated matrices and calculus. 

Consider a situation as follows:

It is 8 p.m. now and you have a product release tomorrow morning at 10 a.m. You know that you have approximately two more hours of work left to build the setup package. 

Now it is entirely up to you to decide as to whether to stay back for two more hours till 10 p.m. and finish the work or to comeback tomorrow early morning at 8 a.m. and complete the pending work.

You usually consider the following factors before making a decision:

  • Probability that you will be able to get up at 6 a.m. in the morning and reach office by 8 a.m. This includes the proximity of your place from office, traffic experiences, travel facilities, etc

  • Are you feeling tired right now? because if you are tired / feeling sleepy then there are all possibilities that you will mess up all your current work if you stay back to complete it and tomorrow morning you'll end up cleaning all the mess you created the last night.

  • Feasibility of sending a mail to the project manager about not being able to deliver the setup package till tomorrow afternoon......

So on and so forth. In such decisions, there is nothing like an absolute truth. Your decision basically depends on all your past experiences and this might vary from person to person and from situation to situation.

Hence, you cannot write a method in java/C# for such situation which will return you a Boolean value  indicating whether you have to stay back to night or not. And if at all you do then you will have to again hard code intelligence (!) which takes in certain parameters and does a lengthy walk through the conditionals before returning a result. This result again will be the same always for a given set of parameters. 

But fuzzy logic is not so. You can talk about partially true or partially false conditions, like in the above case, whatever you decide might be partially correct or partially wrong.

So what is thinking? It is decision making based on our past experiences. Note that experiences are not what we acquire right when we are born, but a continuous and gradual process of understanding life and things better. So experiences are not hard coded. Thus a decision made by a person yesterday under a given set of conditions might be completely different from the decision which the same person makes today under the same earlier set of conditions. This would have happened due to his new experiences.  

In the present generation software (which I would like to call Classical Software), there is no such intelligence. All we do is hard code intelligence. Present generation software never works on instincts, it fails to think if it cannot find a required set of data or if the data is corrupt even partially.

This is one of the basic reasons which is preventing software from reaching the thinking capacity levels of human brains despite the fact that today's hardware can facilitate calculations millions of times faster than a human brain (one of the main reason for us to use computers) and also accurate fetching of data (your system cannot forget a file which you saved yesterday !), not to mention their capacity to store large amount of data.

So, are there any software that think?? 

Well I don't find any in classical software. One close group of candidates for the next generation software (which I call quantum software due to their fuzzy behavior) are virus programs which mutate. These virus programs modify themselves to avoid detection by anti-virus programs. This is because, anti-virus software are classical software with hard coded intelligence, as they cannot identify a virus till you update the virus scanner with an update patch containing the virus signature. 

So, mutating viruses are more intelligent than anti-virus software.

Now, how do we write software that really thinks?? 

Well, write software which learns from its past experiences and from the mistakes it makes. But, is that really possible?

Well, rule #1 to write software that thinks. DO NOT HARD CODE INTELLIGENCE. Your program always has to learn from its past experiences. So, the only block that will be hard coded in any of your programs is the one TO LEARN. We'll call this MATRIX block (To make things interesting) . Note that if at all this MATRIX block becomes corrupt, then your program will GO MAD, i.e. it will start making terribly wrong decisions.

Coming back to writing a program which learns, first you'll have to ensure that it rewrites/modifies itself based on its new experiences.

This can be either

  • mistakes made by your program (like division by zero)

  • unexpected situations encountered by your program (like file not found!)

  • unexpected data received by your program (like receiving a string while looking for an integer)

Consider our code block to find a quotient. 

Q = N1 / N2

Now let us write a quantum software which does the above division. As discussed earlier, we also have a MATRIX block in our quantum program. I'll write it as follows:

When Unexpected Situation
    Load Matching Past Experience
    
    Take Data Snapshot
    Record External Dependencies
    Eliminate Non-Culprit Data
    Update Self
End

As we move forward, I'll explain what the above MATRIX block means.

Consider N1=3, N2=5. Our quantum software doesn't face any unexpected situation (i.e. any exception) and hence MATRIX BLOCK will not be executed.  

Now consider N1=5 and N2=0. An unexpected situation occurs with the division statement not being executed successfully.

Enter MATRIX.

First, well, there are no such past experiences. This is the first such situation faced.
Next, it takes a data snapshot. In this case we have N1=5 and N2=0 as the available data.
Next, Recording external dependencies. Well, we don't have any now. So, MATRIX moves on. 
Next is to eliminate non-culprit data. But lo, MATRIX is not sure as to whether N1 is the culprit or N2. Hence, no elimination will be done. Both N1 and N2 continue to be viewed with suspicion.
Finally, updating self, this time matrix records as PAST EXPERIENCE, the situation of N1=5 and N2=0 as an exceptional situation.

Consider, another unsuccessful execution of division block later sometime. This time it is N1=12 and N2=0.

Enter MATRIX.

First, yeah, it has a past such experience. So, the past experience data is loaded where N1=5 and N2=0.
Next, it takes a current data snapshot. Now it has N1=12 and N2=0 as the available data.
Next, Recording external dependencies. Well, we don't have any now, so we move on.
Next is to eliminate non-culprit data. This could be done by intersecting past and present data, because if the same exceptional situation has occurred twice, then the culprit will be present in both the situations. Hence, after elimination we are left only with N2=0, as only N2=0 occurs in both situations.

Finally updating self. This time MATRIX has only one data source left and so it HAS TO BE THE CULPRIT. So now matrix rewrites its host program as follows:

If N2 != 0 THEN
   Q = N1 / N2
Else
   'Command not executed due to invalid data N2=0'
End
 

The program has learnt from its past experience!! It will not repeat the mistake once again.

This was only a very basic algorithm to write software that thinks. To write a software that really thinks very well, we need to write much more complicated MATRIX blocks which can handle a wide variety of data. It has to be able to decide as to whether it is time to update itself with its past scenarios or to wait for more statistics to arrive. It should depend on a minimum number of repeated mistakes of the same kind before it can stop repeating those mistakes. For instance, in the above case, the program learnt to handle zero division from it's third attempt to do so. It would have been more intelligent if it was able to handle the situation in the second zero division itself.

Also, note that once you write a basic thinking software and allow it to evolve, it's intelligence depends entirely on the quality of experiences/situations faced by it. The more the situations vary, the more intelligent the program will become. So, out of the same set of code which you wrote, one might evolve to be very smart and one still as dumb as when it was created.

Then, we can also allow MATRIX BLOCKS to re write themselves based on their experience! Who knows, they might find a better way to learn altogether!!

So far we had just a small peep into the world of Next Generation Software, the building blocks of I Robots to come. Even though there is a lot which could be written about Next Generation Software, I am stopping here due to space-time constraint as usual. Please feel free to get back to me with your feedback and comments.

- Gurudev
MADE IN INDIA

gurudevp@vsnl.net

On 24 July 2005

HOMEHome >> Computers

Rate this article

PoorExcellent       

Comment on this article: Criticism is most welcomed
Name:
email ID:
Comments:

Home - Physics - Chemistry - Mathematics - Bio-Sciences - Computers