Science of God

Some time back, there was a story in Slashdot science section which dealt with "Human beings believing in God was necessary for adaptation, survival and reproduction". This was a study of genetic theory about how humans came to believe in God. One of the scientists got curious at the fact (which surprised me too) that "started looking at history, and I wondered why no society ever survived more than three generations without a religious foundation as its raison d'être."

The article details that humans are hardwired to believe in god, it has supported the survival of the race and various different theories of existence and normal human understanding. It also gives account of how atheists view the fact and they have to work hard to get the details rather than just leaving it unexplained.

The slashdot story as usual was interesting.

Lisp Notes -2. On REPL

Subsequent to Lisp Notes 1, these are my notes for the Chapter 2 "Lather, Rinse, Repeat: A Tour of the REPL" in the Practical Common Lisp Book

  • Lisp provides an interactive read-eval-print loop.

  • Lisp can be used in Automated Theorem proving, planning and scheduling and computer vision. Large scale battlefield simulation, automated planning and natural language interfaces.

  • Help in EMACS, Press CTRL Key, type h, release CTRL key and press t. This key combination called key-chord is represented like this. C-t h

  • Info system is available by C-h i

  • C-h ? brings complete list.

  • C-h k lets us type any key combination and lets us know the command which will be invoked.

  • C-h w lets us enter the command and returns the corresponding key combination.

Crucial bit of emacs terminology is a Buffer. While working with EMACS, each file you edit will be represented by a different buffer, only one of which is current in any way.

Buffers:

  • C-x b is command to switch to buffer.

Some key combinations may be available for switches to certain buffer.

For e.g. to switch to lisp source file.

  • C-c C-z switch to buffer where you interact with lisp (REPL)
CL-USER>

This is the lisp command prompt. Lisp reads the lines of lisp expressions evaluates them according to the rules of lisp and prints the result.

The endless cycle of reading, evaluating and printing is why it is called read-eval-print loop or REPL for short.

It's also referred to as top level, top level listener, lisp listener.

From REPL we can: - Define or redefine variables, functions, classes and methods. - Evaluate any lisp expression. - Load files containing lisp source code or compiled code. - Compile other files or individual functions. - Enter Debugger. - Step through the code. - Inspect the state of the individual lisp command.

CL-USER>10
10

R - Reads "10" and converts to lisp object "10" E - Evaluates to itself. P - Prints "10"

CL-USER>(+ 2 3)
5

+ symbol is converted to + function which takes 2 and 3 as parameters.

CL-USER>"hello,world"
"hello,world"

That was a "hello,world" value.

Format function:

Format takes a variable number of arguments, but the only two required to send the output a string.

CL-USER>(format t "hello,world")
"hello,world"
NIL
  • t sends the output to stdout.
  • NIL is the return value of the function.
CL-USER>(defun hello-world() (format t "hello,world"))
HELLO-WORLD
CL-USER>(hello-world)
hello,world
NIL

Saving the file:

  • C-x C-f type the file name with extension as .lisp or .cl

  • Inside the SLIME mode, C-c C-q invokes the command slime-close-parens-at-point which will insert as many closing parenthesis as necessary to match all the open parenthesis.

  • To get the source file to lisp environment:

    • C-c C-c (slime-compile-defun)

    Or switch the REPL Buffer: * C-c C-z (directly from SLIME to REPL)

    Or * C-x b and all the buffer.

Make some changes and type again.

(defun hello-world()
        (format t "Hello,World!"))
  • C-c C-c

Or

  • C-c C-z
(hello,world)
Hello,World!
NIL

Save the changes to hello.lisp by typing C-x C-s in EMACS which invokes (save-buffer)

Exit SLIME, which is in REPL type ',' - a comma.

Invoke again:

M-x slime
CL-USER>(hello-world)

Will not get invoked because REPL is not aware and it will put you in the debugger mode. Pressing 'q' will exit the debugger.

CL-USER>(hello-world)
;Evaluation aborted
CL-USER>

Letting the REPL Know:

1) C-x b hello.lisp and then compiling using C-c C-c

2) Load the whole file:

(load "hello.lisp")
; Loading file
T

T- means loaded correctly. FASL - Fast Load file

(load(compile-file("hello.lisp"))

From the SLIME environment itself, the following features are available:

  • C-c C-l (slime-load-file)
  • C-c C-k to compile and load the file represented by the current buffer.

using emacs like it shud be...

http://steve.yegge.googlepages.com/effective-emacs

[kirubakaran]

Anonymous

AI Class Notes - 2

Notes from AI Class

Any solution goes from (0,0) state to (goal state).

  • Reasoning.

  • AI stands for positive thinking.*

  • Chess playing, alternative choices, multiple choices.

  • Humans can think simultaneously different things.

  • Machine intelligence revolution.

What is A.I?

Artificial: Produced by art. Not genuine or natural, not pertaining to

    the sense of matter.

Synonymous: Synthetic, fictitious, pretend, simulated, spurious,

    unnatural.

Antonyms: Actual, genuine, honest, real, natural, truthful and

    unaffected.

Intelligence: Endowed with a faculty of reasoning, quick of mind, well

    informed and communicative.
  • Marvin Minsky's initial writings provide a very good introduction.

  • Do plants think?

Objectives of AI?

Primary Goal: To Make the computers smart. (CS)

Secondary Goal: To understand the nature of human intelligence.(psychologist)

Entreprenuers" To make machines more useful and economical (eventually

    replace humans)

Japanese tried to create machines that will help humans when they fail.

  • Fuzzy Logic in washing machines.

  • Inacessible to humans? Machines with intelligence needed.

Normal missiles will be shot, but missiles with intelligence have chances of

hitting the target.

Virtual reality system help in designing the A.I system.

What is an A.I problem today may not be same 20 years down.

Definition:

AI is the study of how to make computers do things at which at the moment,

human beings are better.

(2) AI is the study of mental faculties through the use of computational

methods.

Questions:

1) What are our own underlying assumptions about intelligence?

2) At what level of details are we going to model and mimic intelligence?

3) What kind of tools and techniques we have at present for study of AI?

4) How will we know that we have succeeded in building an intelligent system?

5) What computers can and cannot do?

6) Can machines think?

7) Can a machine fool a human being into thinking that (s)he chatting with

another human being?

Computational methods:

  • Number crunching.

  • Huristic programming.

  • Automatic programming.

8) Why we think that machines cannot?

9) For that matter, do humans think? and How do we think?

Chart:

A Modern AI Lab.

    * Reasoning about objects.

    * Programming [ lisp, prolog ]

    * Architecture [ fifth generation, parallel]

    * Design and Analysis Systems [ knowledge based expert AI

      systems, decision support systems]

    * Speech and Language

    * Learning.

    * Vision and Speech

    * Robotics

Intelligent Behaviour:

Use of huristics: using some rules of thumb for deciding any of the several

alternative choices.

Huristic:

Best first search, breadth first search and depth first search.

  • Huristic should help us in dramatically reducing the search for solution in

the large problem spaces.

  • No guarantee of optimal solution.

Two approaches to Designing AI Based Computers.

Top-Down Approach

        A.I. Application

        *

    * Predicate Logic

    * Frames

    * Semantic Nets.

    * Knowledge Representation



        A.I. Languages

    * Lisp

    * Prolog

    * Smalltalk

Bottom Up Approach

        Computing Model

    * Control Flow

    * Data Structure

    * Data



        A.I Architecture

Assignment:

To Reach IISc from your Home.

Parameters: Vehicle, Mode of transport, Map.

Time and shortest path constraints.

Between own vehicle and public transport, which one is preferable?

Knowledge:

Search Engine, algorithm is intelligence and database is knowledge.

Human information processing.

All knowledge structures are Tree Structures.

Reasoing:

Reasoning refers to the different kinds of activities:

  • Drawing conclusions from different set of facts.

  • Diagnosing possible cause of conditions.

  • Making assumption about a situation.

  • Analysis of organizing facts and data about problem

  • Solving a problem or a puzzle.

  • Arguing with a person with a particular point of view.

Classification of Reasoning activities:

Based on Degree of perception

  • Deductive reasoning.

  • Inductive reasoning.

  • Default reasoning.

Based on level of reasoning.

  • Problem level reasoning.

  • Meta level reasning.

Based on generality

  • Casual

  • Common Sense.

  • von monotonic

  • Plausible

  • special

  • Temporal

  • Reasoning systems involve the representation of information and word.


celpjefscycle

Thanks for information.

many interesting things

Celpjefscylc

Anonymous

Marvin Minsky on AI

Found two comments which are very insightful and written by people whose thoughts were along the same direction as our discussions in proficience course over the weekends.

Quotes:

While much of the "traditional AI" hype could be considered dead, robotics is continuing to advance, and much symbolic AI research has evolved into data-driven statistical techniques. So while the top-down ideas that the older AI researches didn't pan out yet, bottom-up techniques will still help close the gap.

Also, you have to remember that AI is pretty much defined as "the stuff we don't know how to do yet". Once we know how to do it, then people stop calling it AI, and then wonder "why can't we do AI?" Machine vision is doing everything from factory inspections to face recognition, we have voice recognition on our cell phones, and context-sensitive web search is common. All those things were considered AI not long ago. Calculators were once even called mechanical brains. by SnowZero.


Personally I don't think it's quantum computers that will be the breakthrough, but simply a different architecture for conventional computers. Let me go on a little tangent here.

Now that we've reached the limits of the Von Neumann architecture [wikipedia.org], we're starting to see a new wave of innovation in CPU design. The Cell is part of that, but also the stuff ATI [amd.com] and NVIDIA [nvidia.com] are doing is also very interesting. Instead of one monolithic processor connected to a giant memory through a tiny bottleneck, processors of the future will be a grid of processing elements interleaved with embedded memory in a network structure. Almost like a Beowulf cluster on a chip.

People are worried about how conventional programs will scale to these new architectures, but I believe they won't have to. Code monkeys won't be writing code to spawn thousands of cooperating threads to run the logic of a C++ application faster. Instead, PhDs will write specialized libraries to leverage all that parallel processing power for specific algorithms. You'll have a raytracing library, an image processing library, an FFT library, etc. These specialized libraries will have no problem sponging up all the excess computing resources, while your traditional software continues to run on just two or three traditional cores.

Back on the subject of AI, my theory is that these highly parallel architectures will be much more suited to simulating the highly parallel human brain. They will excel at the kinds pattern matching tasks our brains eat for breakfast. Computer vision, speech recognition, natural language processing; all of these will be highly amenable to parallelization. And it is these applications which will eventually prove the worth of non-traditional architectures like Intel's 80-core chip. It may still be a long time before the sentient computer is unveiled, but I think we will soon finally start seeing real-world AI applications like decent automated translation, image labeling, and usable stereo vision for robot navigation. Furthermore, I predict that Google will be on the forefront of this new AI revolution, developing new algorithms to truly understand web content to reject spam and improve rankings.

Lost and Found

While shifting my house from Jeevan Bhima Nagar to C.V.Raman, my roomie Marcus ha d emphasized many a times not to loose the Indane Gas Customer Receipt as that was the only proof that Marcus is the customer of Indane Gas Agency and any transfer of Gas will be possible.

As much as he insisted, I had lost it. We lost hope of finding it also.

Today morning, he called me and said that I had left it in a one old book of his given it to me. Today while he was cleaning stuff, preparing for his movement to chennai, found the lost Gas Customer Receipt by surprise! Thats a good news for me today.

Karate in the morning

Yesterday night, the dinner at Suswaad hotel (Near Timex showroom in CMH Road) did not go well with me. Especially the oily parotha and ghee roast. My dad feels it could be pasta I had in the afternoon also which did not go well.

At the karate class in the morning, was fighting non-digestion and inflexiblity with the body and stomach. Constantly thinking to give up and go home. But carried on, held and streched with great difficultly till the end. Felt good at last that I did not give up. Got to be more careful with the food now.

I have put on a lot of weight due to irregular practise of karate after shifting my home from Jeevan Bhima Nagar to C.V. Raman nagar. When at Jeevan Bhima Nagar, I used to run daily to New Horizon School in the morning and on alternate days practise karate. But distance from C.V.Raman nagar to New Horizon School at 100ft road is bit too far for running. Once I tried, just walked, but ended up completely exhausted. I have got back with running now covering only the CV Raman nagar area and then on alternate days taking my bike to karate clases. My friend, Sharma helped me in getting back to the classes by giving a wake up in the morning, that really worked and I will be thankful to him.

So far so good. But I still have align my work habits, night workouts with getting up early and going for karate. If I work bit late (later than 12:00 am in the night, leave alone 2:00 and 3:00 am night outs),I find it very difficult to getup at 5:30. Got to somehow work that out as well.

Lisp Notes - 1

The nearest thing Common Lisp has to a motto is the koan-like description, "the programmable programming language." While cryptic,that description gets at the root of the biggest advantage Common Lisp still has over other languages.

Ideas first introduced in Lisp include the if/then/else construct,recursive function calls, dynamic memory allocation, garbage collection,first-class functions, lexical closures, interactive programming, incremental compilation and dynamic typing.

Shvedova vs Santangelo

Last weekend, I went to watch the finals of the WTA Womens championship held at Bangalore. Doubles match between chinese teipei pair and russian/chinese-teipei pair was ok. The Russian (Kurd) did not play very serious and from the body language it looked she was okay with losing.

The best match was Shvedova vs Santangelo.

Santangelo, the defending champion had defeated India's heart throb Sania to come to finals.

Santangelo is a 16th ranked player from Italy, while Shvedova who got an entry to this tour due to absence of another Russian player is a ranked 119 and was playing her first big tournament.

From the very start, Shvedova looked impressive and agile. When the match started, her shots were more powerful and she tried for aces.

But Santangelo being a professional player was able to play effortless against the novice and she made Shvedova run all over the court.

We began to guess that Shvedova would soon run out of energy and Santangelo will take the match towards her side.

But this did not happen, Shvedova never got tired, she was able to play with a top seeded player running all over the court and at last defeating her! Many a times Shvedova won the set with Santangelo having the advantage. This shows her energy the practise she must have put in.

It was a wonderful match and a great lesson to learn for a newcomer in any sport that practise is the key to winning.

Recent Books

My friend and I are participating in the 50bookchallenge and I have started enjoying reading one book after the other.

After Men who made new physics, I started reading Shashi Tharoor's "5 Dollar Smile". This is a compilation of early writings of Shashi Tharoor in his adolescence. So, you might find him attracted towards pretty girls, interest in sex topics and many things which disturb young adults. His writing style is good and it's really funny. He in his college days might be a kind of leader who must have been along with friends teasing, having fun, understanding junta and yet a leader, not the all prefect high standards that comes in book definitions.

The last one act play of a "Life of a Kutta" was amazing, it's set in the period of India Emergency when forced sterilization was done on males. This presents the time from the eyes of a dog who is converted to a man.

5 Dollar Smile Book
Cover

The title "5 Dollar Smile" refers to UN Post card featuring photo of a child from India, which seeks to donate 5 dollars and make him smile. It's a simple story of a boy with a charity. The stories are not conclusive, but many of them are thought provoking and sometimes reflecting with real world incidents as they happen and pass by.

Next book I read was Sudha Murthy's "How I taught my Grandma and Other stories."

Grandma Book Cover

A very good book stressing on moral values and principles in life. Sudha Murty has narrated the incidents in her life in a very simple style for others to understand and follow.

The title refers to the story of her youth, when she used to say featured monthly story to her grandma and once in her absence her grandma felt helpless with her inability to read. Her grandma took a resolve to start learning and made young Sudha Murty as her guru. This has a very emotional touch at the end which relates to a student respecting her guru.

Another thing imprinted in mind is, she learnt from a charity work of not delaying things when helping people as help at the right time is proper and delay with it is not good.

Her story about meetings with JRD Tata and APJ Kalam was very inspiring.


Re: Hi

Thanks, Vijay.

Senthil


Hi

All the best for your quest!

Anonymous