Wednesday, January 26, 2011

Singularity

A short science fiction story.

Pete Mettle felt drowsy. He had been working for days on his new inference algorithm. Pete had been in the field of Artificial Intelligence (AI) for close to 3 decades and had established himself as the father of "semantics". He was particularly renowned for his 3 principles of Artificial Intelligence. He had postulated the Principles of Learning as

The Principle of Knowledge Acquisition: This principle laid out the guidelines for knowledge acquisition by an algorithm. It clearly laid out the rules of what was knowledge and what was not. It could clearly delineate between the wheat and chaff from any textbook or research article.

The Principle of Knowledge Assimilation: This law gave the process for organizing the acquired knowledge in facts, rules and underlying principles. Knowledge assimilation involved storing the individual rules, the relation between the rules and provided the basis for drawing conclusions from them

The Principle of Knowledge Application: This principle according to Pete was the most important. It showed how all knowledge acquired and assimilated could be used to draw inferences andconclusions. In fact it also showed how knowledge could be extrapolated to make safe conclusions.

Zengine The above 3 principles of Pete were hailed as a major landmark in AI. Pete started to work on an inference engine known as "Zengine" based on his above 3 principles. Pete was almost finished fine tuning his algorithm. Pete wanted to test his Zengine on the World Wide Web. The World Wide Web had grown into gigantic proportions. A report in May 2025 issue of Wall Street Journal mentioned that the total data that was held in the internet had crossed 400 zettabytes and that the daily data stored on the web was close to 20 terabytes. It was a well known fact that there an enormous amount of information on the web on a wide variety of topics. Wikis, blogs, articles, ideas, social networks and so on there was a lot of information on almost every conceivable topic under the sun.

Pete was given special permission by the governments of the world to run his Zengine on the internet. It was Pete's theory that it would take the Zengine close to at least a year to process the information on the web and make any reasonable inferences from them. Accompanied by world wide publicity Zengine started its work of trying to assimilate the information on the World Wide Web. The Zengine was programmed to periodically give a status update of its progress to Pete.

A few months passed. Zengine kept giving updates on the number of sites, periodicals, blogs it had condensed into its knowledge database. After about 10 months Pete received a mail. It read "Markets will crash on March 2026. Petrol prices will sky rocket - Zengine. Pete was surprised at the forecast. So he invoked the API to check on what basis the claim had been made. To his surprise and amazement he found that a lot events happening in the world had been used to make that claim which clearly seemed to point in that direction. A couple of months down the line there was another terse statement "Rebellion very likely in Mogadishu in Dec 2027". - Zengine.The Zengine also came with corollaries to Fermat's last theorem. It was becoming clear to Pete and everybody that the Zengine was indeed becoming smarter by the day..It became apparent to everybody when Zengine would become more powerful than human beings.

Celestial events: Around this time peculiar events were observed all over the world. There were a lot of celestial events that were happening. Phenomenon like the aurora borealis became common place. On Dec 12, 2026 there was an unusual amount of electrical activity in the sky. Everywhere there were streaks of lightning. By evening time slivers of lightning hit the earth in several parts of the world. In fact if anybody had viewed the earth from outer space then it would have a resembled a "nebula sphere" with lightning streaks racing towards the earth in all directions. This seemed to happen for many days. Simultaneously the Zengine was getting more and more powerful. In fact it had learnt to spawn of multiple processes to get information and return to it.

Time-space discontinuity: People everywhere were petrified of this strange phenomenon. On the one hand there was the fear of the takeover of the web by the Zengine and on the other was this increased celestial activity. Finally on the morning of Jan 2028 there was a powerful crack followed by a sonic boom and everywhere people had a moment of discontinuity. In the briefest of moments there was a natural time-space discontinuity and mankind had progressed to the next stage in evolution.

The unconscious, sub conscious and the conscious all became a single faculty of super consciousness. It has always been known from the time of Plato that man knows everything there is to know. According to Platonic doctrine of Recollection, human beings are born with a soul possessing all knowledge, and learning is just discovering or recollecting what the soul already knows. Similarly according to Hindu philosophy, behind the individual consciousness of the Atman, is the reality known as the Brahman which is universal consciousness attained in a deep state of mysticism through self-inquiry.

However this evolution by some strange quirk of coincidence seemed to coincide with the development of the world's first truly learning machine. In this super conscious state a learning machine was not something to be feared but something which could be used to benefit mankind. Just like cranes can lift and earthmovers perform tasks that are beyond our physical capacity so also a learning machine was a useful invention that could be used to harness the knowledge from mankind's storehouse - the World Wide Web.

INWARDi Technologies

Wednesday, January 19, 2011

Programming languages in layman's language


There is such a wide variety of programming languages that there is always confusion as to why there is such a profusion of languages. Different programming languages solve different classes of problems. Programming languages can be classified broadly into the following 4 classes.

Procedural Languages: In these languages one thinks in terms of the sequence of steps to solve the problem. It could be thought of solving the problem in 1st person and then substituting the “I” with “the program”. So for example in procedural language we could think

I will wake up.
I will brush my teeth
I will open fridge
I will take milk
I will warm milk

So in procedural languages actions are performed sequentially to achieve the desired end result.
Examples: FORTRAN, BASIC, Pascal, C

Object Oriented (OO) Languages: When a problem is solved using Object Oriented techniques we look at the world objectively. So we need to first identify the participants and functions performed by each of these participants. So the above situation would be viewed as

I, Fridge, Microwave - Participants

then we need look at what functions the above 3 will perform
I – wake up, brush
Fridge – Open door, close door
Microwave – Warm

Hence in OO languages the problem is solved as the interaction of functions between participating objects.
Examples: C++, Java, Smalltalk, C#

Both procedural and OO languages are compiled languages and are also known as “Imperative Languages”. A useful analogy is to view compiled programs as mashed, pre-cooked food that can be easily assimilated by the digestive system or the raw hardware.

Dynamic Languages: Here these languages are either interpreted or converted to byte code. Interpreted languages are similar to raw & uncooked food which must be crunched, munched and digested on the fly. However these languages include in themselves many, many features that are commonly used. While the first two would just specify the method, dynamic languages include several specific features as functionalities. To use an analogy while in the above 2 programming language types one would set the time and the power level for each item to heat in a microwave, dynamic languages come with readymade buttons for those frequently used.
I – wake up, sleep, eat, drink, wash etc
Fridge – Cool, refrigerate, thaw, and freeze
Microwave – Heat popcorn, frozen food, meat etc

Since you get a lot of stuff for free and the program is interpreted on the fly Dynamic Languages take a lot more time
Examples: Perl, Python, Ruby

Functional languages: Here we think in terms of functions that are performed on items. They can be performed on
any object.
For example the above problem would be viewed as the following main functions
E.g. Wake, sleep, warm, thaw, heat, cool, freeze.
We then take and apply the function ‘warm’ on the ‘milk’
Heat on ‘vegetables’ etc
In Functional Programming functions invoke other functions to accomplish a task. The problem is solved from the inside-out. In Functional languages like Lisp one starts with some core functions and build layers over it. For e.g. in a functional language we would express calorific energy as

metabolize (assimilate (digest (chew (food))))

Examples: Lisp, Clojure, Haskell, Erlang

Each language is best suited for only certain applications. So just like it is inappropriate to use pliers where an Allen wrench would suffice we need to know which language is most suitable. If we know what the class the problem is and the performance we want we can choose the appropriate language

INWARDi Technologies