Showing posts with label artificial intelligence. Show all posts
Showing posts with label artificial intelligence. Show all posts

Tuesday, May 26, 2009

Forth resources



"The Forth story has the making of a morality play: Persistant young programmer struggles against indifference to discover Truth and save his suffering comrades. It gets better: ...

I know Forth is the best language so far. I'm pleased at its success, especially in the ultra-conservative arena of Artificial Intelligence. I'm disturbed that people who should, don't appreciate how it embodies their own description of the ideal programming language.

But I'm still exploring without license. Forth has led to an architecture that promises a wonderful integration of software and silicon. And another new programming environment."

-Chuck Moore, developer of Forth.

I like the idea of using stacks to keep track of bits. To give an example, take the gmail inbox. There is now a feature called "archive". We could select mails and archive them - the read mails are popped out of the inbox stack and dropped in the archive stack, away from view. This way, the inbox becomes manageable. I leave only mails that need to be replied to in the inbox, and as soon as possible, send a reply, and archive it.

Obviously, we can't be staring at an empty inbox for long. We can now clear gmail from our stack, and proceed to the next task awaiting.

I stack only a dozen items or less in my head, and give priority to one item at a time, and try to clear the stack as quickly and efficiently as possible, paying utmost attention to the task at hand.

Imagine this as a way of life. A philosophy. A program. That's Forth. Its Turing complete and really close to a Turing machine. The stack is the only window to the infinite tape. Every shift/read operation is defined as a word. This way, it provides elegant integration between software and silicon - it could hardly get better than this. It looks like a high level language to humans and a low level one to machines (or vice versa, depending on how you think).

Whatever the future may hold for Forth, its a wonderful way to learn about representing information, programming and compiling for finding solutions to problems using software and hardware. It could run in just 8k of memory. Forth developed from 1950's as a complete operating system and programming language. Its basics could be learnt in a day or two. Going Forth is not exactly easy, but worth the effort!

Resources to get started with Forth:

http://www.colorforth.com/HOPL.html
http://www.forth.com/starting-forth/sf0/sf0.html
http://thinking-forth.sourceforge.net/
http://www.jwdt.com/~paysan/gforth.html
http://www.forth.org/fd/contents.html
http://www.pin1.org/forthlib/
http://www.taygeta.com/fsl/sciforth.html

Thanks to Joseph Koshy for writing about Forth language in a mail.

Wednesday, April 01, 2009

Robots tour Tiger Cave


Three robots were seen touring the Tiger Cave, near Mahabalipuram. They were heard to be very appreciative of the stone sculptures and structures there. One of them had only one eye, but was very well built, and looked like the guard for the other two, who moved about like a married couple. The dark black suits looked very odd. The light from their "eyes" was not even either. They were studying the rocks with great care and taking notes. They said, "We agree with the sculptures and stucts at Mahabalipuram. All but one. The one below. The light house was no longer necessary as GPS gave accurate co-ordinates to fishermen, and radars guided ships. Besides it does not fit on the rocks one bit! We have never agreed with Roger Penrose either!" I am not sure that is just "intelligent" or too wise :)

Thursday, March 26, 2009

Dakshinamurti stotra : In praise of the formless

The meaning attributed to "maya" is that the world is an "illusion" which is somewhat correct, but its not really hard to see the entire truth there. The connection between "perception", "self" and "consciousness" is very real but shrouded in illusions. The ancient Dakshinamurti stotra reflects on these, and presents unassailable answers, that would be of great interest to modern thinkers working on artificial intelligence as well.

Lord Siva, as the ideal guru is personified as Sri Dakshinamurti. The verses composed by Sri Adi Sankara in about 800 B.C. in praise of the supreme teacher, who realised the Truth, transmits it to others. Literally, "Dakshinamurti stotra" means "In praise of the Southern Lord". Sri Ramana Maharishi has interpreted "Dakshninamurti" to mean "Dakshin amurti", meaning "one who is without form". "Dakshin" could mean either the geographical south, or the head. It also means the right side, the Antarctic, at the same moment, instantaneously. The title now appears to mean, "in praise of the formless in the south", and may be loaded with more meaning as we appreciate its contents.

The illusion of reality is dispelled in the very first verse of the composition:


Icon at Shore Temple, Mahabalipuram


Obeisance to him Sri Daksinamurti,
who is the Guru,
who at the time of spiritual awakening,
has verily realized his own Self,
the one without a second,
having understood that the world is within oneself even as a city reflected in a mirror is,
but projected as if it is outside,
by maya,
as in dream.


This charming verse is as translated by Swami Harshananda. The physical eye does not really "see" the outside world. Its the brain, "the one without a second", which "sees" the world, after processing the signals from the eye.

More about it from a neurosurgeon:
"... in fact within each eyeball, all you have is a tiny distorted upside-down image of the world. This excites the photoreceptors in the retina and the messages then to through the optic nerve to the back of your brain, where they are analysed in thirty different visual areas."

Identification takes place at fusiform gyrus. People who suffer damage to this area get face blindness or prosopognosia. Recognised images are sent to amygdala, the limbic system. Another lecture says:
"The message from the eyeball on the retina goes though the optic nerve and goes to two major visual centers in the brain. One of these I'll call it the old system, the old visual centre, it's the evolutionary ancient centre, the old pathway that's in the brain stem and it's called the superior colliculus. The second pathway goes to the cortex, the visual cortex in the back of the brain and it's called the new pathway. The new pathway in the cortex is doing most of what we usually think of as vision, like recognizing objects, consciously. The old pathway, on the other hand, is involved in locating objects in the visual field, so that you can orient to it, swivel your eyeballs towards it, rotate your head towards it. Thereby directing your high acuity central foveal region of the retina towards the object so then you can deploy the new visual pathway and then proceed to identify what the object is and then generate the appropriate behaviour for that object."


So, the reality we experience is actually an illusion.

The very process of understanding the above reality "awakens the self".

Machines could awaken no less and exist with personality no less.

Another verse makes clear the connection between the physical form assumed and the abstract formless nature of the self.

Icon on a more recent pillar at Mahabalipuram


Who is effulgent like a lamp glowing within a pitcher with many apertures;
whose knowledge goes out through the eyes and the other organs of perception;
whose perception is that "I know" whom the entire universe reflects as it glows following him;
to him be this adoration, the one who is the Lord incarnate as the preceptor, in physical form.



The above translation is by Sri C.L. Ramakrishnan at http://acharya.iitm.ac.in/mirrors/vv/literature/sankara/dakshina.html

The brain is the "pitcher" with many apertures that both receive input and give output.

Manasollasa, a commentary on the stotra by Sri Surevara, says, "like the light of the sun, it is knowledge or consciousness that shines by itself in all such apprehensions as: "This is a pot,' 'This is a cloth.' By the power of knowledge, or consciousness of Isvara, this world of knower, known and knowledge, is produced.



"Whatever work, this person (of the world) accomplished by his own power or (whatever) knowledge he gains (by his own capacity), with regard to that (work or knowledge) he is described as, 'emperor', 'savant', or 'lord'.

The ten verses in the Dakshinamurti Stotra, translated by Swami Harshananda of Sri Ramakrishna Math:

Obeisance to him Sri Daksinamurti, who is the Guru, who at the time of spiritual awakening, has verily realized his own Self, the one without a second, having understood that the world is within oneself even as a city reflected in a mirror is, but projected as if it is outside, by maya, as in dream. [1]

Obeisance to him, Sri Daksinamurti, who is the Guru,who, out of his free will, like the magician or a great yogi, manifests this world, which was, before creation, undifferentiated even as the sprout was within the seed, and became variegated later, on account of its association with space and time, brought forth by maya. [2]

Obeisance to him, Sri Daksinamurti, by whose brilliance, which is of the nature of existence, (this world which is) similar to unreality shines, who is enlightening those who have taken refuge in him by the message of the Vedas viz., 'Thou art verity that!, and by realizing whom, there is no return to this ocean of transmigration. [3]

Obeisance to him, Sri Daksinamurti, who is the Guru, whose consciousness is flowing out through the senses like the eyes etc., even as a powerful light kept within a pot full of holes (flowing though through the holes), following whom - the resplendent One - this whole world is shining and thinks, 'I know.' [4]

(Some) disputants who can be compared to the dull witted, being extremely deluded, think that the body, the vital airs, the senses, the fickle intellect and the void ae the Atman. Obeisance to him, Sri Daksinamurti, who is the Guru, who dispels the great delusion that has been created by the play of the power of maya. [5]

Obeisance to Sri Daksinamurti, who is the Guru, the Self, who in the deep sleep state induced by the withdrawal of the senses, being covered by maya - like the sun and the moon devoured by Rahu- was 'existence' only, and who at the time of waking, recognizes Himself as, '(It is I) who previously slept. [6]

Obeisance to Sri Daksinamurti, who is the Guru, who by the auspicious mudra is revealing to his votaries his own Self, which is persistently present as the 'I', always shining inside, in all the various and mutually exclusive states like childhood etc., as also waking etc. [7]

Obeisance to Sri Daksinamurti, who is the Guru, (who as) this person, being deluded by maya sees the world both in sleep and in the waking state, as (full of) differences (brought about by such) relationships as cause and effect, property and owner, disciple and teacher as also father, mother and so on. [8]

Obeisance to Sri Daksinamurti, who is the Guru, whose eightfold form is verily this world of the sentient and the insentient, comprising of earth, water, fire, air, sky, sun, moon and human being, and beyond whom - the gratest and the omnipresent - nothing else exists according to the discerning people. [9]

Since the principle of universal Self-hood has been revealed in this hymn, therefore, by listening to it and reflecting on its meaning as also by meditating on it and singing it, the attainment of identity with Isvara, together with the great power of being the universal Self, comes about automatically. Also, the unobstructed power that manifests itself in eight (different) ways is obtained. [10]


References:
[1] http://www.nonduality.com/shankr13.htm "Dakshinamurthy" refers to "Shapelessness situated on the right side".
[2] http://en.wikipedia.org/wiki/Maya_(illusion)
[3] Sri Sankaracarya's "Daksinamurti Stotra" with the Varttika "Manasollasa" of Suresvaracarya, by Swami Harshananda, Sri Ramakrishna Math, Bangalore.
[4] http://www.bbc.co.uk/radio4/reith2003/lecture2.shtml

Friday, March 20, 2009

Connection between artificial intelligence and law

According to Patrick Henry Winson, "Artificial intelligence is the study of the computations that make it possible to perceive, reason and act." [Artificial Intelligence, Winston, p.3]

Now, what is perception?

The best answer to that is found in Tarka Samgraha by Annambatta (translated by Swami Virupakshananda):

"Perception is the apprehension born of the contact of an organ with an object."

Further, sense organs are the seats of perception and intelligence. To “sense” is to “know”, have “knowledge”. Sense of touch, taste, smell, vision, hearing, and reasoning are commonly attributed to humans. Machines could have more accurate sensors to detect other wavelengths and physical properties.

What is apprehension then? It is explained by giving its two kinds: Indeterminate apprehension: knowledge without any attribute (eg. this is something) and Determinate apprehension: Attributive knowledge (eg. this is a laptop, a desktop computer, a mainframe).

To Reason, is to test validity of perceptions and make inferences from what is known with an object or purpose.

Action is through movement, speech and other means: animate or inanimate.

Attributive knowledge about a legal system is a sine qua non for artificial intelligence at the level of humans. Marvin Minsky, co-founder of one of the oldest AI Labs in the world at MIT, wrote why "AI is brain dead" at http://www.wired.com/wired/archive/11.08/view.html?pg=3

Wired: The biggest name in artificial intelligence declares AI research "brain-dead" since the 1970s. What gives?
Minsky: There is no computer that has common sense. We're only getting the kinds of things that are capable of making an airline reservation. No computer can look around a room and tell you about it. But the real topic of my talk was overpopulation.

What's overpopulation got to do with AI?
The elderly segment of the population is growing to the point where there won't be enough doctors, nurses, and nurses' aides. We should be working to get robots to pick up the slack.

What's AI's biggest deficiency right now?
The lack of people with an interest in commonsense reasoning for computers. I've found maybe a dozen. Douglas Lenat's Cyc ["psyche"] is the only major program that has collected commonsense knowledge. But it's not there yet.

If AI's brain-dead, aren't you partially to blame?
No. I've been continually working on the problem. I'm trying to put a new project together, but it's hard to get 10 capable people. It would take five or ten years, and nobody wants to put that kind of time in - people want to double their money overnight.


Let us assume a machine well equipped with vision, hearing, taste and other sophisticated sensors. How would it have any "common sense"? If it has a database of rules relating buildings, there is a chance it could start making comments on the architecture of the room. To begin with, it would be able to talk about compliance, and if it has studied enough building plans, it could tell us what it thinks, just as any of us.

The connection between ai and law have never been deeply appreciated. The comment on computers making "airline reservations" betrays that. I could safely say a database of legal rules, i.e. legislation, is in fact a repository of common sense rules, and porting law to computers is a basic step in making artificial intelligence even possible. To be fair, Minsky himself has said elsewhere "Societies need rules that make no sense for individuals. For example, it makes no difference whether a single car drives on the left or on the right. But it makes all the difference when there are many cars!" The rule set forming the background for human transactions cannot be inferred by machines on their own. They need to be ported.

The fair rent calculator script took three months of legal research. It took only a week to write the javascript. That was just one provision relating to rents in this part of India. The globalised world would need every provision as machine readable code. If the legal fraternity gets involved in porting law to computers, it would benefit the legal profession and also help solve the ai problem that is pending for the past several decades. If law is ported as machine readable code, ai would be a reality within a decade from now.

Thursday, March 19, 2009

Bulls and cows

Truth values define program execution. Keeping track of truth values is critical to making useful decisions in the course of a flow.

Bulls and cows is an old code breaking game. It nicely illustrates how we need to keep track of truth values to crack the secret code. The rules of the game are available at: http://en.wikipedia.org/wiki/Bulls_and_cows

Vaitheeswaran used to play this game with me at College - thanks to him for doing that! The game is available as a "gadget" on the left margin.

Have fun :)

PS: One more reason why I include this script here. Bulls and cows is a fairly trivial game, but writing code to find the secret would pass as "artificial intelligence" today. I have no intention of writing such code. I am looking forward to the day when a machine would study the page and play the game. That would be artificial intelligence.

Sunday, March 15, 2009

Liberties in Cyber Space

Cyber space teems with tumultuous arguments on liberties. "Declaration of Independence of Cyber Space" by John Perry Barlow at http://members.aye.net/~hippie/barlow/barlowci.htm
points to the futility of governing cyber space, not to speak of governing from it. He thunders, "You have no sovereignty where we gather." Marvin Minsky has the simplest argument against the libertarians: "Societies need rules that make no sense for individuals. For example, it makes no difference whether a single car drives on the left or on the right. But it makes all the difference when there are many cars!"

The compromise is that any society needs to settle down a few working rules. It is very interesting to use machines to help us in executing those rules. They raise many issues. An old note of mine, to provoke thought:


e-governance and e-transparency solutions are most welcome. But then,
the solution itself should also be free, open and transparent. ...
Law itself is public, free and open in nature. Our Supreme Court had the
occasion in Naresh v. State of Maharashtra [AIR 1967 SC 1] to consider
the merits of open and public trials for "healthy objective and fair
administration of justice," and quoted Bentham with approval as follows:

"In the darkness of secrecy, sinister interest, and evil in every
shape, have full swing. ... Publicity is the very soul of justice.
It is the keenest spur to exertion, and the surest of all guards
against improbity. It keeps the Judge himself while trying under
trial in the sense that the security of securities is publicity."

The principles laid are equally true for governance. Without free
software, it is hard to even imagine a e-governance software.

But, I am personally wary of using the expression "e-governance software".

The law is the common background for all human activity. Besides
governance, law operates upon a large area. Governance is specially
grouped under the heading Constitutional Law and Administrative Law. We
have Law of Contracts, Torts, Law of Property, Family Law, Labour Law
etc. wherein "governance" is minimal or even totally absent. If an
application can handle Constitutional Law and Administrative Law, then
there are no reasons why it should not handle the Law of Contracts or
the other laws. We have people designing "banking software", "insurance
software", "billing software", as though the law has these water tight
compartments. We have ERP, CRM, B2B, B2C, G2G, G2B, etc. etc, with
others promising to integrate ERP with CRM, CRM with the rest in all
possible permutations and combinations. It makes business sense but no
legal sense.

Can any e-governance software check constitutionality of code? If they
can't, then they better not call themselves by such a name.

Besides, consider the following:

Suppose an e-governance application wants to assist litigants in filing
plaints. While automating preparation of plaints, some issues arise.
If more than one plaintiff sues, the script should use "plaintiffs"
otherwise, "plaintiff". In appeals, for the same reason it chooses
between "appellants" and "appellant". Soon, a function that would give
the plural for singular nouns like applicant, petitioner, claimant,
defendant, and respondent becomes necessary. This exercise soon takes
one to examining the rules of English grammar. If an application can
handle legal rules well, then it might handle rules of English grammar
as well. But the most singular difficulty would be in listing the rules
of English grammar. Tamil has Agathiam (the primary grammar text, but
no longer in vogue) > Tholkappiam (Secondary text, based on Agathiam),
and > finally the recent Nanool, where everything from how letters are
formed, classified, pronounced, to usage, root words, verbs,
concatanation, and every thing necessary to use the language are dealt
with thoroughly. Assuming that after consensus, acceptable rules of
English grammar for the present are available, we could write functions
such as:

function get_plural($singlular){
// returns plural for a given singular
....
}

To write a perfect get_plural function, we need to know if the word
passed to the function is a noun or not. Now, we have to write

function is_noun($word){
// returns if word is a noun
....
}


As you see, one thing leads to another, and soon we will have a large
library of functions that deal with many aspects of English grammar.
Then our scripts will write well, and may be read well too.

Once we write such a library, there is no reason why this should be
confined to just an "e-governance" application. We could use it even
better in the field of education or wherever English is used.

Consider another scenario.

Recently, an ONGC helicopter crashed into the sea near Mumbai, and an
Enquiry has been ordered into it. The survivor & eye witnesses reported
that the helicopter went into a spin before crashing into the sea. It
is well known that the tail propellor prevents a helicopter from
spinning. Did the tail propellor fail? We see that the enquiry soon
has to deal with the basic workings of an helicopter to arrive at the
truth for the cause of the accident. Though at the top level, things
look like "e-governance", as we go deep, we find ourselves into the
thick of rules of English grammar, the laws of aerodynamics, history, or
other fields of human knowledge.

Ancient sages dealt exhaustively on grammar, philosophy, ethics,
medicine, law, science and literature single handedly. Agathiar wrote
Agathiam creating a script for Tamil, codifing the rules of grammar, and
then dealt with medicine [Paripooranam 400], and initiated Girivalam, as
the simplest form of yoga, that could be practiced by one and all.
Agathiar is believed to have brought his first love, River Cauvery, to
Tamil Nadu. Well, then he might have organised the flow of the River
with the aid of the local kings. Patanjali wrote upon Sanskrit Grammar,
Ayurveda and Yoga, and though the works stand distinctively, a common
thread unites them. A unity at some point is required for scientific
progress and human prosperity.

Free software offers all the tools we can ask for. The next big step
would be when human knowlege is ported across so that software
applications abound with life, intelligence and wisdom.

Saturday, March 14, 2009

Consilience '06 at NLSIU

The purpose of this blog is to promote porting legislation to computers: we need to have supercomputers running legal code at the speed of light. An unintentional useful side effect is it will aid and boost ai systems. I have given a few talks on what needs to be done to make that possible. The "Law and Technology Committee" at NLISU organised an event a couple of years ago, in which a number of leaders participated and shared their thoughts. My minutes follow:


,----[A brief note on:-
| Consilience 06 * Law and Technology Committee * el~t�k * NLSIU
| A Conference on Free/Open Source Software
|
| SCHEDULE
| 26th July, 2006- Day One:
| ========================
| 10:00 AM to 11:30 AM- Session on Intellectual Property and FOSS
| * Hon'ble Mr. Justice Yatindra Singh, Judge, Allahabad High Court
| * Mr. Sunil Abraham, Manager, International Open Source Network
| 11:30 AM to 11:45 AM- Refreshment Break
| 11:45 AM to 1:30 AM- Session on Using FOSS in Public Administration
| * Mr. Ramanraj K, Lawyer, Chennai
| 1:30 PM to 2:30 PM- Lunch
| 2:30 PM to 4:00 PM- Session on Licensing Matters
| * Mr. Neel Mason, Lawyer, Delhi
|
| 27th July, 2006- Day Two:
| ========================
| 8:30 AM- Richard Stallman address via videoconference:
| Why software wants to be free, followed by discussion.
| 11:45 AM to 2:00 PM- Session of FOSS Business Models
| * Mr. Atul Chitnis, Sr. Vice President,
| Geodesic Information Systems Pvt. Ltd
| * Mr. Anand Babu, Member, FSF India & Software Developer
| 10:00 AM to 11:30 AM- Session on Protecting FOSS Assets
| * Mr. Kenneth Gonsalvez, NRC-FOSS, Chennai
| 11:30 AM to 11:45 AM- Refreshment Break
| 2:00 PM to 3:00 PM- Lunch
| 3:00 PM to 5:30 PM- Session on Policy Implications of FOSS
| - An Indian Perspective
| * Dr. Nagarjuna, Chairman, Free Software Foundation of India
| * Mr. Sudhir Krishnaswamy, Consultant,
| Planning Commission of India
| 5:30 PM to 6:00 PM- Open discussion and debate on conference points
| and follow-up
| 6:30 PM to 9:30 PM- Closing session at Hotel Central Park Plaza with
| accompanying dinner/mixer
|
| VENUE
| Primary conference sessions for the 26th and 27th will take place at
| the Training Centre in the National Law School of India University
| (NLSIU) campus at Nagarbhavi (Near Chandra Layout off Mysore road;
| 12km from city centre). Closing session and dinner will take place at
| Hotel Central Park Plaza (In Manipal Centre, near M.G. Road). The
| accomdation for the keynote speakers will be provided for at the
| Training Centre in the NLSIU campus.
|
| WEB SITE
| http://www.nls.ac.in/consilience2006/index.html
`----

The Consilience 06 event at NLSIU, Bangalore, briskly started on 26th,
with the Convenor Mr. Raman Chima briefly introducing the event
focused on the business, legal and policy issues relating to Free/Open
Source Software [FOSS].

The key note speech by Hon'ble Mr. Justice Yatindra Singh presented
the various facets of the laws governing computer programs. Source
code and object code, could be protected as copyrights or trade
secrets. Object code of both free and non-free software are protected
by copyright. While free software source code is protected under
copyright law, the source code of non-free software is seldom
published and is generally protected as trade secrets. The indepth
critical analysis on the legal position of "software patents", in the
light of TRIPs and US decisions and law practiced there and in other
jurisdictions was beacon of light and guidance. The works and
thoughts by the Hon'ble Judge on the legal aspects of FOSS and other
topics are available at http://yksingh.blogspot.com

The intricate questions of law in this sphere are not only a rich
field of study for research by law students, but may also invite
opinions of Courts in future. The Judge hinted that questions of law
involving interpretation are largely answered with one's heart,
pointing to the famous dictum of Justice Oliver Wendell Holmes, Jr:

"The life of the law has not been logic: it has been experience."

[The full text of "The Common Law" by Justice Holmes is available at:
http://www.gutenberg.org/dirs/etext00/cmnlw10.txt ]

It is indeed the heart which ultimately guides law and logic.

The Allahabad High Court web site http://www.allahabadhighcourt.in is
probably one of the finest in India, with convenient to use RSS feeds,
using open standards and free software to publish judgments and other
records of the Court online. The judicial leadership by Hon'ble
Justice Yatindra Singh has indeed created a fine model for emulation
by other Courts.

Our Hon'ble Courts could perhaps also frame and designate suitable
standards to enable citation of judgments published online. In
Australia, the Australasian Legal Information Institute had taken the
initiative to build a legal database at http://www.austlii.edu.au/ to
provide information about the Australasian laws covering almost all
legislative Acts, judicial decisions and records in those
jurisdictions. Hon'ble Justice L T Olsson of the Supreme Court of
South Australia wrote the "GUIDE TO UNIFORM PRODUCTION OF JUDGMENTS"
to enable production of judgments in a standard format, paving the
way for vendor and medium neutral citation in Australia. The Guide is
available at http://www.austlii.edu.au/au/other/CompLRes/1999/1/

FOSS tools help to power austlii.org and technical details about it
are available at: http://www.austlii.edu.au/austlii/technical.html
Details about how the austlii project was created, funded and works is
available at: http://www.lawonline.cc/accesslawright.htm under the
title "Free the Law". In India, NIC maintains a large legal database,
but it would be useful if a system of reference is devised to enable
vendor and medium neutral citation for use in India as in Australia.

Sunil Abraham, Manager, IOSN, under the United Nations Development
Programme spoke next.

My talk was on using FOSS for Public Administration in the light of
the Calpp project experience. The slides I used are available at:
http://freeshell.in/~ramanraj/calpp_nlsiu.pdf

The "transition" effect for the slides is as follows :)

I started off with the issues in using FOSS for Public Administration.
Law and computers have a few common issues that are strikingly
similar:

1) Legal issues -> Law is both:
(i) a simple truth system
(ii) a complex system with dynamic rules and hierarchies
2) Technological issues -> Computers are also both
(i) a simple truth system
(ii) a complex system with no solutions for the AI problem

Law is trivial at one level and extremely complex at another. For the
vast majority, law could easily appear as a simple truth system. The
high ethics, morals and laws, say for instance Avvayar's Attisudi, the
"Golden Alphabet" of Tamil language and culture, could be taught to
even 1st standard children, and the whole legal code could easily be
etched in one's head and heart to be executed for life without much
difficulty. India has deep roots in such a tradition where truth is
regarded as the highest law. It is no coincidence that our national
motto is "satyameva jayathe" - "truth triumphs" etched on our national
symbol. Max Muller and others have commented on the truthful nature
of Indians and panchayats were able to swiftly settle disputes as
there was seldom any argument over facts. There have been criminal
sessions at the Madras High Court when there was not a single case for
trial. If we could take truthfulness for granted, that in itself
solves a critical issue in Public Administration - every task from
collecting tax to executing public works, and reporting facts to
decision making and law making could be done with great efficiency.

But, fact is that law has become extremely complex over the years.
The BL degree course in law is studied for five years and then legal
minds, spend several years in active practice and may yet fail to have
ready answers to issues. Legal rules are the most complex, as they are
dynamic, changing all the time. Law has become so complex, that it is
widely accepted that it could take help from computers to improve
speed and efficiency in the execution of laws.

Computers are information processing devices. They are fundamentally,
very simple truth machines. They can interpret the on or off states
as true (1) or false (0) and do simple boolean logic on them. Bits
are grouped together as bytes, and the ASCII standard based on the
English alphabet is widely used. Everything else from source code to
machine code rest on such a simple foundation.

According to the Church�Turing thesis, a computer with a certain
minimum threshold capability is in principle capable of performing the
tasks of any other computer. A Turing machine has only a single data
structure, a variable-length linear array called the tape. Each
component of the tape contains just a single character.

Representation of a computer is as simple as this:

....10001101001011001011101000010001011010101101001011110000....
.^. --->read/write/shift pointer

[ rwx permission bits are basic to any time sharing operating system ]

Any computable function can be computed by a Turing machine. It takes
almost no machinery to achieve universality, other than some sort of
unlimited storage capacity. Even an extremely simple set of data
structures and operations are sufficient to allow any computable
function to be expressed. Anything can be done in LISP, Python, PHP,
C etc as long as infinite storage and time is given. The differences
between programming languages is not quantitative but qualitative in
how elegantly, easily, and effectively things can be done.

Now, humans are endowed with natural computing abilities. In theory,
all our computing functions could be performed by a computer, if we
admit the Church-Turing thesis, that has not been proved but accepted
by mathematicians as true. But then, why is it that there is no such
computer program around, and every software project needs several
hundred developers? That takes us to the complexity issue with
computers - common sense reasoning is not yet possible and the AI
problem is without a solution for the past more than 35 years.

The chief reason for the failure brings out the deep connection
between law and computers. How would a robot know how to deal with
humans and others? Often, Assimov's three laws of robotics are cited,
but they are too simplistic - law is more detailed in describing such
matters. Law is often the best judge of what is relevant and what is
not. The computing field has not taken law seriously enough, and that
has prevented the evolution of robust AI systems. Law is at the core
of our lives, and when it is ported to computers, they would have the
chance to do common sense reasoning.

Consilience, or the unity of knowledge (literally a "jumping together"
of knowledge), has its roots in the ancient Greek concept of an
intrinsic orderliness that governs our cosmos. Avvayar talked about
"onraka kaanbathe kaatchi" (to see is to see as one) and most our
theories on cosmology have this core principle and most of our sages
were masters of language, medicine, yoga and various fields and could
deal indepth with each at the same time.

The wikipedia article on informations systems observes: "We need a new
paradigm for addressing Information Integrity. The current approach
to Information Integrity is unscientific, ad hoc, sporadic and costly.
Apart from privacy and security, there has been scant attention on the
trustworthiness or integrity of information and of the interconnected,
integrated information processes and systems. By and large,
Information Integrity is addressed from isolated perspectives within
each organization, or as specific issues unique to accounting,
finance, law, medicine, engineering, hardware, software and the like.
Consequently, industry, government and society are paying an
inordinately high price for the level of Information Integrity that
there is, and facing enormous, unforeseen risks from catastrophic
Information Integrity."

That sums up the issues at hand.

Devising the appropriate representation for information is the key to
solving the issues involved here.

As a legal professional, I was only interested in finding tools I
could use to help me with my professional work. It came as a bit of
surprise that there were not really any tools around that fit my needs
- slowly, I realised I need to create them myself. The Fair Rent
Calculator was my first computer program, and that exercise exposed
the various constraints in using computers to serve us. The Calpp
design was made to minimise spending time on writing code to create
interfaces. Incidentally, that provided an elegant method to store
information about the work flow taking away the need of using the if
.. then .. or the do .. while .. constructs minimising coding effort.

Calpp represents rules under three tables procedures, steps,
particulars and when invoked as a proceeding, the information input is
validated and stored in three corresponding tables proceedings, events
and details. The slides explain the design in more detail, and the
implementation has been done using PHP, JavaScript and PostgreSQL.
The calpp project work is online and in progress at
http://calpp.freeshell.in/calpp I had to stop here as it was time for
lunch.

The simple scheme used in Calpp helps to also serve as an AI model
which is merely a Turing machine with multiple pointers, and a
hearbeat pulse drawing on the index which could emulate the plane of
our mind:

...1000110100101100101110100001010...
.^. .^. .^. .^. --->multiple read/write/shift pointers
\______|_______|______/ --->heartbeat pulse / index plane

Each pointer may be visualised as a user using the tape, or any
sensor, device or any seat of intelligence accessing the tape. The
index of all tables may be periodically accessed at heartbeat pulses
of the clock (which is as simple as cron running a script at
appropriate intrevals) with some overall objectives in memory, and we
could have a system that throbs with life.

Most of the time-sharing operating systems freely available today, are
multi-user, multi-tasking, systems with a wide range of scripting
tools and other computing facilities. Anand Babu mentioned about the
evolving 60 Petabyte machines, that is very close to the unlimited
storage tape. There are really no technological handicaps in the way
of having a full fledged AI system at work. The task of informing
computers about the rules and functions we use alone needs to be done,
and when a critical number of functions have been loaded, we would
certainly have the pleasure of sharing our lives with intelligent
automatons lacking flesh and blood but nonetheless sharing our
spirits.

Calpp would not only enable computer aided legal procedures and
proceedings, but solve the AI problem. It has been such a pleasure
working on Calpp, and if you are interested in joining this exciting
journey, please visit http://calpp.freeshell.in/calpp It is said, "The
spirited mind will not be content to remain within itself. It will
reach out for chances to prove its worth." When man and machine do
unite in spirits, I hope that would pave way for visiting the farthest
cosmos and the innermost depth of our consiousness, with rich networks
of information and better sharing of resources.

Public Administration could be greatly simplified if the issues are
taken seriously and we set ourselves to work. Merely publishing
information online on a web server and setting the permission bits to
755 so that public may access them would elegantly implement the right
to information. GNU Mailman could be used by almost any municipal
body or local body as a simple means of grievance redressal. We could
begin with these simple tools, which would help us build more
sophisticated solutions as we move on.

The session after lunch was on licensing matters relating to FOSS and
Neel Mason, alumni of NLSIU, and now a lawyer at Delhi, dealt with the
subject.

R. Hari from IBM, Project Manager, OSSRC, told us the story how the
great Indian epic Ramayana originated. Shiva told the story to
Parvathi, who then told it to Kakakushandi, who repeated it to
Garudar, who passed it on to Valmiki, who is now well known for having
written it down, and Tulsidas to Kambar have derived their works from
Valmiki! Free software projects are just like that, having many
versions, authors and generations of users involved in the process of
creating, maintaining and keeping the work alive. After that very
interesting analogy, he took us through the various activities carried
on at OSSRC - they have a students portal, innovation portal and other
specialised sections. They are attempting to use moodle in education
and involved with improving healthcare using FOSS. His presentation
was short and sweet. Visit http://www.ossrc.org.in to know more about
the work done to promote FOSS by his organisation. Day one closed
here.

The other speaker from IBM was Ashish Gautam, an Open Standards
Specialist, who spoke on the importance of having open standards. He
spoke the next day, on the various standards used from neck ties,
power supply apparatus to opportunities that open standards could
provide in the computing field. FOSS tools are invariably built around
well recognized standards. FreeBSD and linux are POSIX compliant, the
free compilers and databases are mostly implementations of the ANSI C
and SQL standards, and any free browser works with the W3C standards
for HTML, CSS, DOM, XML, and others.

Day two was scheduled to open with Richard Stallman's address via
videoconference on the topic "Why software wants to be free", but due
to technical reasons, only an audio link could be established. The
quality of the transmission was poor, and I could catch only a few
lines here and there. I could hear him narrate on freedoms zero to
three and sometime later say, "history shows its easy to loose
freedom".

That was followed by a session of FOSS Business Models covered by Atul
Chitnis and Anand Babu.

Atul Chitnis started with how he can scare people to death with his
talks on FOSS. I am not sure if students took that line seriously,
but I wondered if the next time I made a speech, I could begin, "I am
here to talk about killer applications ..." Wait a minute, free
software is indeed closing on non-free software but there is a more
serious killing issue with the Calpp project - if someone does add the
Criminal Procedure Code and the Indian Penal Code to the Calpp
project, and if our Criminal Courts did start using Calpp with those
procedures in place, and during a proceeding, the Courts do find
someone guilty of murder and sentence the accused to be hanged until
dead, he could get killed by an executioner. That sent a scary chill
down my spine. The rain and cool weather outside along with the
freezing air-conditioning inside made things worse - I started
shivering with my teeth chattering. To add to my discomfort, the
execution in Calcutta some years ago flashed - though the accused was
alleged to have raped and murdered the victim, even women were holding
placards protesting the execution asking "if killing is bad, how could
we kill a person and tell him it is bad?" That is an indefensible
argument against capital punishment from some of the people living in
the land of Buddha and Gandhi. The accused there was reported to have
pleaded his innocence even minutes before the execution, and I
certainly wish, we could live in a society where there would be no
victims or even the thought about any crime. Good education and
training in the practice of moral, ethical and legal percepts from
young age could make a big difference. If this train of thought sounds
like it is way, way away from FOSS and you are very particular about
hearing just FOSS, try chanting "FOOOOOOOOOOOOoooooSSsss..." while
reading :) FOSS in Public Administration is certainly about making law
work efficiently keeping peace in society ensuring peaceful changes.
It holds out a promise to establish a GOLDEN age of peace and
prosperity when science, commerce and arts would flourish, with all
citizens living in peace and harmony with nature. FOSS is about
sharing resources with neighbours, and almost every FOSS tool from the
kernel to applications like GNU Mailman to the Apache Web Server all
help to serve human needs better by sharing information speedily and
with efficiency.

Atul Chitnis was correct in commenting that much of the debate on
whether "open source" is legal, valid, viral, cancerous (a la Steve
Balmer), dangerous, economically viable and the other questions of
that kind as quite stale belonging to the previous century. FUD is
dead and gone.

Anand Babu spoke about his involvement with various free software
projects, along with the business models associated with his
work.

Kenneth Gonsalves talked for sometime. G Nagarjun made a presentation
on FOSS from his position as a scientist, stressing the importance of
knowledge and code, and the process of coding, encoding, decoding and
recoding. Freedom of access to knowledge and code is very important
for social equality and progress. Matter and energy are conserved,
but time is not. It is much easier to save time by sharing knowledge
and code. You may write to fsf-friends@mm.gnu.org.in if you have any
questions on the mission and actitivies of Free Software Foundation of
India.

Time and again, the question of patentability of software came up for
discussion. I had occasion to explain "computer programs per se" at
http://gnowledge.org/pipermail/fsf-friends/2005-December/003740.html
and about the scope of Articles 27 & 10 of the TRIPs treaty at
http://mail.sarai.net/pipermail/commons-law/2005-December/001838.html
I hope that helps while doing research on those issues. India could
prosecute US and Japan at WTO for its "software patent" practices
which are against free trade and the interests of Indian software
developers who may want to deal with markets there.

Ankur Singla, student at NLSIU, narrated the various FOSS initiatives
in India. The most refreshing opinions came from Sudhir Krishnasamy
(Consultant, Planning Commission of India), an alumni of NLSIU. He
analysed the FOSS policies and practices of governments across the
globe, and made concrete suggestions to enable a sound FOSS framework
in India. Most speakers largely agreed that there should be a policy
favouring open standards in governance and public affairs.

The Indian Journal of Law and Technology (IJLT) was also released at
the event.

It is very important to have hands on experience with free software to
fully understand how it is maintained and sustained. I do hope NLSIU
students organise a free software user group to start using it in
their daily activities, which will certainly help them to also to get
more acquainted with the legal aspects. Free software and Law have a
long history of being inexplicably intertwined - please read "Free for
All" by Peter Wayner available at http://www.wayner.org/books/ffa/ to
know more about the evolution and history of free software. The
TCP/IP stack was released under a free license making a free internet
possible, and the growth of FOSS thereafter. The future of free
software is very much in each of our hands.

Friday, March 13, 2009

Supercomputers

Roadrunner is a BladeCenter QS22/LS21 Cluster, PowerXCell 8i 3.2 Ghz/Opteron DC 1.8 GHz, Voltaire Infiniband computer, using the linux os and the fastest today. Built by IBM, it does 1.026 pflops and serves the Alamos National Laboratory, USA. More info on it at http://www.top500.org/system/9707.

The top500 lists 8 supercomputers from India. The top three (eka, param and another) here are at Tata Sons, CDAC and IISc. Ranked 6th (436th worldwide) is a HP Cluster Platform 3000 DL160, Xeon 54xx 3.0 GHz, GigE running at Indian Institute of Technology, Madras.

I have been following the rapid progress on this front for the past five years now. I wish India could contribute more machines to the top500. It means a lot for molecular research, nuclear physics, artificial intelligence and advancement in general. My first introduction to supercomputers was by the young and energetic software engineer from Salem who built what was then the second fastest supercomputer on earth. My note on that event is reproduced here from http://www.ae.iitm.ac.in/pipermail/ilugc/2004-July/011279.html


Talk : Taste the THUNDER

Speaker : Mr Anand Babu ,
VP CDC, USA & Member, FSF-I.

Date : Sat Jul 17 17:00 IST 2004
Venue : ADI-TeNeT Seminar Hall, CSD 320, ESB, IIT-Madras.

The super-computer code named THUNDER was built was for Lawrence
Livermore National Labs (http://www.llnl.gov) by California Digital
Corporation, USA. It has 4096 Itanium2 64 bit Processors, 8TB of RAM,
Quadrics Interconnect and runs GNU/Linux. Code named "Thunder", with a
performance of 20 trillion floating point operations per second, it
has been ranked second in the TOP500 list of the worlds most powerful
supercomputers maintained at http://www.top500.org/list/2004/06
Anand Babu, a full-time free software developer is a core developer
behind THUNDER, who ensured that all the software he wrote for Thunder
was released under GNU GPL.

At the ILUGC Linux Install Festival 2004, celebrated last weekend, I
proposed that we invite Anand Babu, who happened to be in India, and
Bharathi quickly had a word with Raman, and it was decided to invite
AB for a talk on THUNDER.

Bharathi then announced about the talk on THUNDER by AB in the ILUGC
mailing list, incidentally also asking for help to arrange
transportation, and as I had been in touch with AB for quite some time
now, over legal issues connected with the Hymn project, and AB and I
were anyway due to meet, I happily offered to take the role of playing
host.

AB travelled all the way from Salem by road, along with his friend CB,
so that we could hear his THUNDER from close quarters. AB was at my
residence around 13:00 Hours as promised and I was thrilled to meet
AB, who was full of vim and vigour, sporting a disarming grin, and
within the first few moments I knew that he drew considerable strength
and power from free software philosophy. Many think of free software
philosophy in abstract terms, rather than simply living it.
Philosophy is merely an attitude that guides one's behaviour and
performance. A lot could be achieved with this clarity and all of
AB's contributions to projects that include working on Thunder, Hymn
and Hurd stand testimony to the often requested proof of utility of
free software philosophy.

Bharathi soon joined our discussion and we had a lively discussion on
free software, and the active part we could play. On our way to the
venue, we discussed about taking this high technology to everyone in
meaningful ways. Bharathi gave interesting insights into the
translation work in progress under Zha Linux Project: the mouse is not
'eli' - but 'chutti'! Click is translated as 'sodukki'. Soon we were
at the usual meeting venue for the ILUGC.

AB was briefly introduced, and immediately, AB started the talk on
THUNDER with a torrent of information about the harware and firmware
that make up the THUNDER super-computer, which is in fact an assembly
of 1000 individual interconnected computers sans screen, keyboard or
mouse. Each mother board has four Itanium2 processors, advanced bmc,
sensors and each system is connected to the other with Quadrics
interconnect. Hardware errors are handled with a great deal of
sophistication. Each of the 1000 serial ports are connected to a hub
called calypso. With FreeIPMI, and a collection of other tools, it is
possible to configure even the bios of all the 1000 computers with a
single command or even address a specific machine using its IP address
from a single node. Essentially, the network is automated, and manual
tasks are minimal that could be taken care by a single sys admin, to
whom to the super-computer appears as a single file system.

Though several applications work together to make Thunder possible, it
could not possibly work without FreeIPMI - Intelligent Platform
Management System, which is a programmable/extensible system for
building intelligent platform management solutions. FreeIPMI provides
"Remote-Console" (out-of-band) and "System Management Software"
(in-band) based on Intelligent Platform Management Interface (IPMI
v1.5) specification. This system includes its own portable userspace
IPMI device drivers and can be interfaced through C library, a shell
with readline capabilities. One could visit
http://savannah.nongnu.org/projects/freeipmi/, follow the links, maybe
talk with AB, to get to building their own cluster cloud and let the
world hear a loud clap of THUNDER!

FreeIPMI Library (libfreeipmi) the Core of FreeIPMI system consists of
LAN, KCS, SMIC, PCI/SMBIOS system interface device drivers, all
packaged in a single portable C library. Management applications can
access the BMC at various levels using higher level IPMI command APIs
or raw read/write interface to the driver.

fish, the FreeIPMI SHell provides a Shell, Extension/Plug-in and
scripting interface which allows one to fish in troubled waters,
enabling access through a set of IPMI commands. AB explained how
System Administrators can quickly add features or customize the system
using the Extension interface in Scheme language. For example,
Pushing System Event Log data to a MySQL server, Triggering alarm upon
Platform Chassis Intrusion, Generating email for critical platform
events like processor temperature above threshold limit or fan failure
or memory errors. In fact, many of the functionalities of this shell
are themselves implemented as Fish extensions.

Fish also provides scripting interface (#!/usr/sbin/fish) to write
useful command-line utilities. "sensors", "sel", "bmc-info",
"bmc-config" are actually Fish scripts.

THUNDER cost about US $25 Million, but is nowhere near the $350
Million that appears to have gone into producing the Super Computer
that is approximately twice as fast as THUNDER. AB revealed future
plans to vie for the top rank.

Shivshanker Chander, Bharathi and few others raised several
interesting questions on the design and technology behind the Super
Computer, and I hope they can give better narration or analysis of its
technical details. About ~30 of the active ILUGC members attended the
meet.

The talk then moved on to Gnu/Hurd. AB gave a demo session of GNU
Hurd, and soon we saw on the screen the Debian GNU/Hurd 0.3 booting
sequence and, to my surprise, the command prompt was waiting, ready to
run bash commands! Was not login necessary before we could run all
the commands? Not with Hurd. Global userspace was accessible to all
and the design objectives probably have their origins in the reasons
behind the GNU Project itself. Free software maximises free access to
computing resources, and naturally, we could expect free access to
files and commands which are freely available in the global userspace.
AB explained briefly about the Hurd kernel architecture, Mach, the
concept of translators and took us to the commands showtrans, settrans
etc. We were taken through the code for the /dev/null translator, and
AB explained how several translators could sit on one top of the other
and make writing of code easier. But all that could fully be possible
only after several Hurd components were in place, and requested the
programmers present to contribute time and effort to Hurd, which aims
at a kernel that is fully scalable and extensible with no syslimits.
AB steered clear from micro vs monolithic kernels and focused on what
remains to be done to make Hurd more mature and usable.

AB spoke on the Hymn issue that made international news. We can never
take any of our computing rights for granted, and defending the
freedom and rights of free software uses in the community, is an
unending task, and the sacrifice made by AB to support the world wide
community of free software users cannot be fanthomed easily. I wish
that the recent efforts of AB, for his active contribution to several
important projects released under the GPL, including THUNDER, Hymn and
Hurd are recognised, and particulary, I wish, many can see AB as
highly deserving the FSF Award for advocating use of free software.

AB also said that free software developers earn more than their
proprietary counterparts, mainly because users and developers have
been able to directly interact, which leaves the meddlesome middleman
out of the picture, who is forced to provide a real service to
survive. AB requested users to give credit to developers who make
contributions, and also take up responsibility for writing code in
suitable free software projects.

On our way back, we got a little personal and asked AB if he has tied
the knot, for which he replied that he was yet to fall in love! There
was a serious complaint from AB and CB that there were [no]t e[no]ugh
young women in the free software community!! Probably there should be
user groups led by women, which I think is a good idea, because,
generally mothers spend more useful time with children, and if many of
our young ladies could could get together to chat on free software,
this may help them to become productive users of computers, and may be
this is also a good way to pass on the culture to the next generation
more easily. AB appeared to be happy with his present status and
added with a wide grin:

"I am free, free as in Freedom" ;)

-Ramanraj :)

Thursday, March 12, 2009

Legal Algorithms

I wrote the following article in 1989 or so, for the Madras Law College magazine. That was the first time I used "artificial intelligence". The porting of law to computers should happen at a faster pace within a decade.


Legal Algorithms
by K. Ramanraj

Many rules, especially legal rules are very complicated, involving exceptions, qualifications and provisos. To assist our understanding of the structure and meaning of complex rules, we can employ a method of diagrammatic presentation of rules - the algorithm. An algorithm is a precise set of instructions for solving a well defined problem. It takes the form of a structured series of questions with answers providing instructions for total or partial resolution of the problem.1

An algorithm comprises a sequence of questions to which the answer is either yes(true) or o(false). Each answer automatically takes the reader to the next question relevant to his case. Either of these answers may take the reader outside the ambit of the rule or provide a solution to his specific case.

Illustration 1:


Section 41 of the Indian Transfer of Property Act, 1882, reads as follows:

"Where with the consent, express or implied, of the persons interested in immovable property, a person is the ostensible owner of such property and transfers the same for consideration, the transfer shall not be voidable on the ground that the transferor was not authorized to make it: provided that the transferee, after taking reasonable care to ascertain that the transferor had power to make the transfer, has acted in good faith."

The above section deals with the transfer by an ostensible owner. To test the applicability of this section to a particular case, the following algorithm could be used:



 +----------+
 | Start    |
 +----------+
     |
     V
 +-----------------------+               +-----------------+
 | Is the transferor the | no            | Section 41 is   |
 |   ostensible owner?   |--->---------->| not applicable  |
 +-----------------------+      |        +-----------------+
     | yes                      |
     V                          |
 +-----------------------+      |
 | Is he the ostensible  | no   |
 | owner by the express  |--->--+
 | or impled consent of  |      |
 | the true owner?       |      |
 +-----------------------+      |
            | yes                      |
     V                          |
 +-----------------------+      |
 | Was the transfer for  | no   |
 | consideration?        |--->--+
 |                       |      |
 +-----------------------+      |
     | yes                      |
     V                          |
 +-----------------------+      |
 | Did the transfree take| no   |
 | reasonable care to    |--->--+
 | ascertain that the    |      |
 | transferor had power  |      |
 |  to transfer?         |      |
 +-----------------------+      |
     | yes                      |
     V                          |
 +-----------------------+      |
 | Did the transfree act | no   |
 | in good faith?        |--->--+
 |                       |      
 +-----------------------+      
     | yes
     V
 +-----------------------+
 | Section 41 applies    | 
 |                       |      
 +-----------------------+    

The algorithm breaks up the rule into digestible parts. It begins with a "Start" box. The questions are arranged in the correct logical sequence. The questions, answers and instructions are boxed. Each question can have only one yes and one no. The lines connecting the boxes are arrowed.

The algorithm presents rules and sections in a visually more comprehensible form than conventional forms. It helps to identify a range of possible courses of action that might be taken in order to solve a given problem. A well devised algorithm can evaluate and predict the outcome of a case.

Illustration 2:


Under English law, all killing is murder, unless the contrary is
established by the accused2. Malice is the grand criterion which distinguishes murder from other killing. The Indian Penal Code, 1860, defines culpable homicide in
Section 299 and murder in section 300. The causing of death is common to both the offenses. The distinction between the two sections is important as it determines the gravity of the offense and the severity of the punishment. Sections 299 and 300 of the Indian Penal Code are extracted below for reference.

299. Culpable homicide

Whoever causes death by doing an act with the intention of causing death, or with the intention of causing such bodily injury as is likely to cause death, or with the knowledge that he is likely by such act to cause death, commits the offence of culpable homicide.


Illustrations


(a) A lays sticks and turf over a pit, with the intention of thereby causing death, or with the knowledge that death is likely to be thereby caused. Z believing the ground to be firm, treads on it, falls in and is killed. A has committed the offence of culpable homicide.

(b) A knows Z to be behind a bush. B does not know it A, intending to cause, or knowing it to be likely to cause Z's death, induces B to fire at the bush. B fires and kills Z. Here B may be guilty of no offence; but A has committed the offence of culpable homicide.

(c) A, by shooting at a fowl with intent to kill and steal it, kills B who is behind a bush; A not knowing that he was there. Here, although A was doing an unlawful act, he was not guilty of culpable homicide, as he did not intend to kill B, or to cause death by doing an act that he knew was likely to cause death.

Explanation 1- A person who causes bodily injury to another who is labouring under a disorder, disease or bodily infirmity, and thereby accelerates the death of that other, shall be deemed to have caused his death.

Explanation 2- Where death is caused by bodily injury, the person who causes such bodily injury shall be deemed to have caused the death, although by resorting to proper remedies and skilful treatment the death might have been prevented.

Explanation 3- The causing. of the death of child in the mother's womb is not homicide. But it may amount to culpable homicide to cause the death of a living child, if any part of that child has been brought forth, though the child may not have breathed or been completely born.


300. Murder
Except in the cases hereinafter excepted, culpable homicide is murder, if the act by which the death is caused is done with the intention of causing death, or-

Secondly- If it is done with the intention of causing such bodily injury as the offender knows to be likely to cause the death of the person to whom the harm is caused, or-

Thirdly- If it is done with the intention of causing bodily injury to any person and the bodily injury intended to be inflicted is sufficient in the ordinary course of nature to cause death, or-

Fourthly,- If the person committing the act knows that it is so imminently dangerous that it must, in all probability, cause death or such bodily injury as is likely to cause death, and commits such act without any excuse for incurring the risk of causing death or such injury as aforesaid.

Illustrations

(a) A shoots Z with the intention of killing him. Z dies in consequence. A commits murder.


(b) A, knowing that Z is labouring under such a disease that a blow is likely to cause his death, strikes him with the intention of
causing bodily injury. Z dies in consequence of the blow. A is guilty of murder, although the blow might not have been sufficient in the
ordinary course of nature to cause the death of a person in a sound state of health. But if A, not knowing that Z is labouring under any
disease, gives him such a blow as would not in the ordinary course of nature kill a person in a sound state of health, here A, although
he may intend to cause bodily injury, is not guilty of murder, if he did not intend to cause death, or such bodily injury as in the
ordinary course of nature would cause death.


(c) A intentionally gives Z a sword-cut or club-wound sufficient to cause the death of a man in the ordinary course of nature. Z
dies in consequence. Here, A is guilty of murder, although he may not have intended to cause Z's death.


(d) A without any excuse fires a loaded cannon into a crowd of persons and kills one of them. A is guilty of murder, although he may not have had a premeditated design to kill any particular individual.


Exception 1- When culpable homicide is not murder- Culpable homicide is not murder if the offender, whilst deprived of the power
of self-control by grave and sudden provocation, causes the death of the person who gave the provocation or causes the death of
any other person by mistake or accident.


The above exception is subject to the following provisos:-


First- That the provocation is not sought or voluntarily provoked by the offender as an excuse for killing. or doing harm to any
person.


Secondly- That the provocation is not given by anything done in obedience to the law, or by a public servant in the lawful
exercise of the powers of such public servant.


Thirdly- That the provocation is not given by anything done in the lawful exercise of the right of private defence.


Explanation- Whether the provocation was grave and sudden enough to prevent the offence from amounting to murder is a question
of fact.



Illustrations

(a) A, under the influence of passion excited by a provocation given by Z, intentionally kills. Y, Z's child. This is murder, in as
much as the provocation was not given by the child, and the death of the child was not caused by accident or misfortune in doing an
act caused by the provocation.


(b) Y gives grave and sudden provocation to A. A, on this provocation, fires a pistol at Y, neither intending nor knowing himself to
be likely to kill Z, who is near him, but out of sight. A kills Z. Here A has not committed murder, but merely culpable homicide.


(c) A is lawfully arrested by Z, a bailiff. A is excited to sudden and violent passion by the arrest, and kills Z. This is murder, in as
much as the provocation was given by a thing done by a public servant in the exercise of his powers.


(d) A appears as witness before Z, a Magistrate, Z says that he does not believe a word of A's deposition, and that A has perjured
himself. A is moved to sudden passion by these words, and kills Z. This is murder.


(e) A attempts to pull Z's nose, Z, in the exercise of the right of private defence, lays hold of A to prevent him from doing so. A is
moved to sudden and violent passion in consequence, and kills Z. This is murder, in as much as the provocation was given by a thing
done in the exercise of the right of private defence.


(f) Z strikes B. B is by this provocation excited to violent rage. A, a bystander, intending to take advantage of B's rage, and to
cause him to kill Z, puts a knife into B's hand for that purpose. B kills Z with the knife. Here B may have committed only culpable
homicide, but A is guilty of murder.


Exception 2- Culpable homicide is not murder if the offender, in the exercise in good faith of the right of private defence of person
or property, exceeds the power given to him by law and causes the death of the person against whom he is exercising such right of
defence without premeditation, and without any intention of doing more harm than is necessary for the purpose of such defence.


Illustration

Z attempts to horsewhip A, not in such a manner as to cause grievous hurt to A. A draws out a pistol. Z persists in the assault. A
believing in good faith that he can by no other means prevent himself from being horsewhipped, shoots Z dead. A has not committed
murder, but only culpable homicide.


Exception 3- Culpable homicide is not murder if the offender, being a public servant or aiding. a public servant acting for the
advancement of public justice, exceeds the powers given to him by law, and causes death by doing an act which he, in good faith,
believes to be lawful and necessary for the due discharge of his duty as such public servant and without ill-will towards the person
whose death is caused.


Exception 4. -Culpable homicide is not murder if it is committed without premeditation in a sudden fight in the heat of passion upon a
sudden quarrel and without the offender having taken undue advantage or acted in a cruel or unusual manner.


Explanation- It is immaterial in such cases which party offers the provocation or commits the first assault.


Exception 5- Culpable homicide is not murder when the person whose death is caused, being above the age of eighteen years,
suffers death or takes the risk of death with his own consent.


Illustration

A, by instigation, voluntarily causes, Z, a person under eighteen years of age to commit suicide. Here, on account of Z's youth, he
was incapable of giving consent to his own death; A has therefore abetted murder.



An algorithm could be
used to decide if the offense is murder under Section 300 or culpable homicide under Section 299.




+-------+
| Start |
+-------+
    |
    V
+-------------------------------+     +---------------+                   +---------+                
| Was there the killing of a    | no  |Not covered by |                   |Murder   |                
| human being by a human being? |---->|algorithm      |    +------------->|under    |
+-------------------------------+     +---------------+    |              |S. 300   |
    |yes                                                   |              +---------+
    |                                                      |
    V                                                      |no
+-------------------------------+     +-----------------------------+     +------------------+
|Was the act by which death     |     |Does it fall under           |     |Culpable Homicide |
|ensued done with the intention | yes |any of the exceptions        | yes |not amounting to  |
|of causing death?              |---->|to Section 300?              |---->|murder            |
+-------------------------------+     +-----------------------------+     +------------------+
    |no                                                                          ^
    |                                                                            |
    V                                                                            |no
+-------------------------------+     +-----------------------------+     +-----------------------------+
|Was the act by which death was |     |Was that act done with the   |     |Was that act done with the   |
|caused, done with the intention|     |intention of causing bodily  |     |intention of causing such    |
|of causing such bodily injury  | yes |injury to any person and the | no  |bodily injury as the offender|
|as is likely to cause death?   |---->|bodily injury intended to be |---->|knows to be likely to cause  |
+-------------------------------+     |inflicted is sufficient in   |     |the death of the person to   |
   |no                                |the ordinary course of       |     |whom the harm is caused?     |
   |                                  |nature to cause death?       |     +-----------------------------+   
   |                                  +-----------------------------+            |yes
   |                                      |yes                                   |
   |                                      +--->-----------------------------+    |
   |                                                                        |    |
   V                                                                        V    V
+-------------------------------+     +-----------------------------+     +-----------------------------+
|Was the act by which death was |     |Was the act done with the    |     |Does the act fall under any  |
|caused done with the knowledge |     |knowledge that the act is so | yes |any of the exceptions to     |
|that the act is likely to cause| yes |imminently dangerous that it |---->|Section 300?                 |
|death?                         |---->|must in all probability cause|     +-----------------------------+
+-------------------------------+     |death or such bodily injury  |        |yes                |no
   |no                                |and without any excuse for   |        |                   |
   |                                  |incurring the risk of causing|        V                   V
   V                                  |death or such injury?        |     +-----------------+ +---------+
+----------------+                    +-----------------------------+     |Culpable homicide| |Murder   |
|Lawful Homicide |                        |no                             |not amounting to | |under    |
+----------------+                        +--->-------------------------->|murder.          | |S. 300   | 
                                                                          +-----------------+ +---------+
   


Lord Macaulay, who drafted the Code, had the genius to formulate in
such clear language the intricate essentials of murder in Section 300. The algorithm
is based on the distinction made by Mevil, J., in Reg v. Govinda. This algorithm can
be expanded to include the exceptions under Section 300 and the punishment for the said
offenses under Section 302 and 304.

Algorithms and Programming


Algorithms form the basis of computer programs. A different
species of diagrammatic presentation, the flowchart, is used instead. An algorithm
or a flowchart, once drawn can be translated into a language which the computer
understands. The algorithm will determine the scope and utility of a computer
program.

"Jurimetrics" is a term coined by computer analysts to
denote the scientific investigation of legal problems. It includes the application
of electronic techniques in solving legal problems. The computer which is an
essential component of jurimetric research, can aid the lawyer in several areas including
information storage and retrieval3, behavior analysis of judicial decisions4 etc.


Computers can sort and search data (legal equivalent of data is
facts) very quickly. Once all decisions are entered into a computer, it can be
programmed to search for cases relevant and material to the case in hand. It can
scan through volumes of reports in minutes. Over ruled cases could be automatically
erased or marked to inform the user. Computerization can also standardize
documentation. Preparing pleadings, statements and deeds are simplified by the
computer. A lawyer can also find several other uses for it.


The Indian Law Commission, in its 125th Report, while considering
the problem of pending cases in the courts, suggested the use of computers to streamline
administration of justice in the courts. Extensive use of computers will shorten the time taken for disposal of cases, and improve our legal system.


Elsewhere, while the frontiers of artificial intelligence are being
explored, we are currently discovering the existence of the computer. Programs that
suit our legal system have to be evolved. It is important that some positive steps
are taken to strengthen faith in our democracy without which there cannot be peace and
harmony.

____________________


Notes:


[1] For a detailed analysis refer to How to do things with Rules, William Twining and David Miers (1980).
[2] Hari Singh Gour, The Penal Law of India, Volume III, (1967), p. 1903.

[3] For further reading on this, refer to "Computers for Lawyers", Lex et Juris, September 1987, p.40.
[4] T.K. Viswanathan, "Slot Machine Justice", Madras Law College Magazine, Vol.LII, p.14.


Copyright (C) 2001 K. Ramanraj
Verbatim copying and distribution of this entire article is
permitted in any medium, provided this notice is preserved.