Showing posts with label Richard dawkins. Show all posts
Showing posts with label Richard dawkins. Show all posts

Monday, February 18, 2008

Simulating Evolution

Am reading 'The Blind watchmaker' by Richard Dawkins. In one of the chapters he explains evolutions as cumulative selection. I wrote a simple java program which finally evolves a readable sentence in the end.

As you can see, it started as a random collection of alphabets. In each iteration only the sentence resembling the most to the desired sentence is selected and it breeds further.

Here the 'desired sentence' can be compared to the most fit characteristics for the environment and only the most fit candidate will be successful in passing his/her genes!

0 : iyrqqqouhwmmqksoqwzfgzercqnwbp v
1 : azxzcoyhawkhldielwjvwvnivhfpokz
2 : ualrpeov sdqvxficjy bxbni htrqwz
3 : calviso usiuoafic kflfnimhtxfbv
4 : waspi owgpwjgpfic oyfitniyhtnkrh
5 : manarvozeotgarfic fsuycnightcorc
6 : hanwojomeutoahfic ls yrnightvurh
7 : yanielogektfadfic fs psnightuurv
8 : ranpmlodeht aafic ns xwnightaqrn
9 : aanntlolebtsapfic hs vjnightwcrq
10 : ganeoloreutoaffic hs ainightvxrv
11 : wanfrloreltoaffic xs aqnightdurk
12 : eanq lorewtmaffic is aqnightbarn
13 : uanlllorevtfaffic is aonightgarp
14 : panahlore tzaffic is arnightuarc
15 : banadlore tcaffic is acnightbarg
16 : bannolore tsaffic is acnightjarc
17 : banptlore traffic is afnightearz
18 : banxplore traffic is arnighteark
19 : ban slore traffic is ajnightzarb
20 : banphlore traffic is aqnightaara
21 : banyalore traffic is alnightaare
22 : banlalore traffic is acnightaare
23 : banralore traffic is asnighteare
24 : banvalore traffic is aqnightmare
25 : banxalore traffic is abnightmare
26 : bancalore traffic is annightmare
27 : bangalore traffic is a nightmare
28 : bangalore traffic is a nightmare

Sunday, April 22, 2007

The master programmer

Back to the genes. Again according to Richard Dawkins:

The gene is a master programmer. He draws a beautiful analogy between the chess playing computer and the gene as below.

A programmer feeds the chess playing program into a programmer taking into account the rules, strategies and many other things. He does not feed each and every scenario into the computer. That would take a hell lot of a memory. Based on the program, the computer analyzes each scenario, simulates different moves and chooses the best move by which it can survive for a longer time.
This is exactly what the gene does. It writes a master program which, like the chess program, basically contains strategies,policies to survive. Based on this program the survival machines(we and all other living things) are built, which again works based on the program's strategies and try to survive as long as possible!!

Wednesday, April 18, 2007

The Selfish Gene

Have you ever thought that your gene can be selfish ??

I started reading this book 'The selfish gene' by Richard Dawkins and i was struck with amazement. Dawkins has presented a totally new picture of life altogether. It was very witty of him to think that way - out of the box. Here is what i have grasped from the early chapters:

Billions of years ago before 'life'(we still dont have a definite definition of what it is) started there was nothing on earth. Then gradually atoms began to combine and form molecules under certain conditions. Molecules then began to interact with each other and form complex molecules. There was a 'natural selection' involved here at a very low level - molecules choosing other molecules.

Slowly, some of the complex objects began to become stable and they started to replicate under some conditions. Here comes 'survival of the fittest'. The objects which replicated faster, which survived longer and which can inhibit/destroy other objects gradually became predominant.

From now on we will call these Objects - the genes. later on these genes started using the available material to build coats around them - for protection. They developed mechanisms to
get substance into the coat - use it - throw whatever is not necessary out and all that stuff.

The coat gradually became more and more complex and advanced and the gene started creating parts and delegating some specific work to those parts. It happily sat inside and controlled all the work. the genes learnt how to survive effectively.

I guess thats what we are today - 'survival machines' for the gene - the selfish gene.

I have started getting a wierd feeling about this whole idea. I am just a sack-full of some selfish genes which just get work done by me and they survive!!

Think about it :)
Google