ngwallpaper

Got started with using code.google.com project hosting for ngwallpaper project. When you execute this python script, it fetches the wallpaper of the day from National Geographic site and sets it up as your Desktop Wallpaper.

Currently works on Windows platform with python windows extensions installs ( it uses SETDESTOPWALLPAPER attribute of a particular windows call).

Desirable features for ngwallpaper is 1) Platform agnostic (Windows, Linux, Mac) 2)More structure code. One present is just a start version 3)the program as a service or scheduled service which will run a particular time everyday. 4) Fix the windows set wallpaper issue where after few hours the wallpaper gets reset.

Science of God

Some time back, there was a story in Slashdot science section which dealt with "Human beings believing in God was neccessary for adaptation, survival and reproduction". This was study of genetic theory as how humans came to believe in God. One of the scientist got curious at the fact that ( me too is surprised) "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 gives a a detail that Humans are hardwired to believe in god, it has supported its 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 than just to leave it.

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.

Its also refered to as top level, top level listner, lisp listner.

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 coverts to lisp object "10"

E - Evaluates to itself.

P - Prints "10"

CL-USER>(+ 2 3)

  • symbol is coverted 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 paranthesis as necessary to match all the open paranthesis.

  • To get the source file to lisp enviroment:

    • 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 got get invoke 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 compling 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 enviroment 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.

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.

Marvin Minsky on AI

Found this post at /. which references the podcasts of Marvin Minsky on AI, but I am unable to locate them.

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.

by Modeless

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.