Sunday, 9 February 2014

Evolution, classes and objects

Swami Gulagulaananda wondered:
"Can we recreate evolution and the world programmatically?"

Classes and Objects form the core of object oriented programming. A class is basically like the floor plan of a building, and an object is the instantiated version, a physical manifestation if you may, of the class - viz, an actual house. What's interesting is that with one class, you can have as many object instances as you want - one house floor plan, but multiple houses that have the same house floor plan.

Now that we are clear with classes and objects, let's take a look at modifying the properties of objects. Two houses can look alike and have the same characteristics - that is, doors and windows in the same positions, etc. but can have different properties, such as paint colours - one might be red and another blue. Similarly, if you look at people, though we have the same general structure, we have different properties like skin tone, height, weight, eye colour etc. Therefore, objects can have a similar class but different properties.

Each class can be made up of different classes - For example, a car can have tyres. Two BMWs need not necessarily have the exact same tyres. However, tyres themselves have certain characteristics that make them tyres - and so if you define tyres as classes, and change their properties, such as tread type or material etc. you have multiple types of tyres and cars can use either of these within them. Similarly, when you look at humans, our organs are like the constituent classes - organs of two different people may have similar characteristics that make them the same organ, but there can be variations in some properties.

This same concept becomes recursive now - organs are made up of tissues, which in turn are made up of cells and they are in turn made up of constituent substances, sub-cellular entities like nucleus, DNA which in turn have DNA sequences, molecules, atoms, quarks and so on - but the concept is still the same.

The world is also a set of classes and objects - temperature, humidity, etc. are properties. The thickness of  the earth's crust is also variable (properties) and so magma can leak out of some places and cause volcanoes there. And water can settle in places where the basins exist. Also assume that you are coding some fundamental truths so that things work like how they do in real life, like universal law of gravitation, etc.

Now assuming that we all sit and write some kinds of classes like this and generate random worlds all the time, with each planet having variable radii, variable landscapes, variable temperature and pressure and constituent minerals - all of which are properties that get randomly set upon instantiation. And run these programs, creating instances all the time, will we be able to create simulations of planets all over the universe? And in due course of time, one of them will probably be something similar to earth - so will we able to observe the creation and formation of life in one of the billion instances?

Remember that in one of those billion instances, a volcano might erupt as soon as life got created because it is probable. But still, theoretically, will we be able to observe this formation of life and evolution? Will we be able to see dinosaurs, man and what organisms will come in the future?

I doubt it - because I don't know if consciousness can automatically come in code - like if such random mutations are happening all the time, it does not necessarily mean that humans will make dodos extinct. And if we can observe industrial revolution, dynasties, slavery, religion etc. It would be fabulous if we could though.

Also, another question that I have is - is object oriented programming really the right approach to simulate something like this? Or should you be writing something entirely different like one of those machine learning algorithms with mathematical models that will do some mumbo jumbo? I, of course, am not familiar with that concept, but I think it would be an interesting project, massively complex, requiring massive resources, but I wonder if it would actually work - What are your opinions?

Related Posts

Evolution, a brilliant concept and yet...


***

Comments from Facebook

Goutham Kamath
I believe it can be done and has been done to an extent !! That extent is very very small and at the rate we are going I guess we cannot model everything (We just began to understand or may be not) !! If we are able to recreate then there are lots of fascinating thoughts. Some of them are "How exactly object (humans) figured out the entire code". I don't know if physics laws will not allow us to do that. We will never know the starting...higgs boson might be an answer but it might be just relative !!! In short the answer is "NO" !!

Amogh Js 
Yes we can

Gurudatha Pai
What's your starting point?

Nikhil Baliga 
I am imagining big bang theory is done, billions of planets are getting generated, each one with random settings

Gurudatha Pai
I would say no. Even though the question is more fundamental ("deterministic", "random chance", "complex chaotic" world views), your question seems to assume a statistical world view. The number of possibilities is uncountably infinite. Hence, there is little hope of simulating a delta-time which covers all possibilities and therefore, little hope of advancing such a simulation in time.

Nikhil Baliga
What if there was no dearth of computing resources? I know it is impractical, but this is a theoretical question...

Ramesh Radhakrishna
Let me start off by citing a NASA program which simulates Big Bang theory. The results of the simulator is pretty astonishing. It has ended up with an universe model which is similar to our observable universe.

http://www.youtube.com/watch?v=7pMe64Reito

There are lot of Evolution simulators out there(some even open source, I think). However, your idea is is interesting because of the expectancy of human interventions as the results of the program. As they say .. The distance in time between a stegosaurus and Trex is greater than the time between us and TRex. It's the sheer complexity of time and number of events.

It 'should' definitely be achieved but our current understanding is so less. Consciousness, Love, Religiousness and nearly all human behaviors are very well explained (empirically and theoretically) in the psychology literature and that wouldn't be the tough part to achieve.[ Whales are more emotionally developed than humans and that can be correlated to the size of a part of the brain.] The tough part here is granularity. We have absolutely no information about these things. Carbon dating accuracies are being improved to help achieve accuracies of thousands of years.

Yeah .. It's a big challenge and more the people who work on it .. Better it is for science ..

Gurudatha Pai 
I contend "Consciousness, Love, Religiousness and nearly all human behaviors are very well explained". No, they are not well explained. We have hypothesis and some evidence. Simulating something programmatically is would necessitate exact models that lend themselves to computation. We have no such models of human behavior for example (Ref : Robert Sapolsky ).

Ramesh Radhakrishna 
How much evidence is good evidence is a fuzzy thing. Some people refute Evolution because there are only little evidence. But, I do agree that more evidence for explaining these behaviors need to be collected (only because more is better). However, there are very good theoretical explanations for these behaviors.

We can successfully induce feelings of love and religiousness in any human being. Consciousness is not very hard to explain if we explain a string of other behaviors. I found this show to be particularly interesting. We humans are neither very complex or efficient or even sophisticated !

http://www.youtube.com/watch?v=51B8MzcxOX0

Swarup Chandra 
Interesting discussion ... Ramesh ... I haven't seen the video yet ... However ... Are you suggesting consciousness is a certain emotion or feeling? ... "Humans are neither complex nor sophisticated" !?!?! ... What is complex then?

Ramesh Radhakrishna
@swarup Nopes. I am not suggesting anything. All I am stating is that nearly all the feelings and emotions are known in scientific literature(by known, I mean significant work to some extent). There are tremendous amount of knowledge available in this regard.

Human behavior ( love, religiousness, sad, happy, ecstatic, 'life changing' supernatural experiences, concentration & focus etc. ) in isolation is very simple (once again, I mean lot of significant works which can be referred and learnt about. My use of word 'simple' shouldn't imply condescending or demeaning remark). The combination of these behaviors become complex. How they interact, influence each other etc.

Swarup Chandra 
Hmm ok ... However I still don't agree that emotions are well known and simple, when they are considered in isolation. For example, I have seen numerous recent papers trying to characterize happiness, say classification for instance, fail to completely do so, indicating it is complex.

Ramesh Radhakrishna 
The point is not on identifying what all result in happiness ... Point is we know what is the cause for happiness .. I am speaking from a neurological point of view .. I can poke your brain or inject certain elements that will cause happiness, sadness and other emotions .. I can make you listen to something that will make you sad and cry .. My point is from a hardware perspective, human body is quite well understood .. [Don't make a mistake of reading this as completely understood]

I kind of know what kind of work you are speaking about. If you are speaking about Affect computing, their take is completely different. It is related to identifying emotions which is a completely different problem from inducing them.

Swarup Chandra 
Oh I see ... So you are saying consciousness can also be induced in a similar manner?

Ramesh Radhakrishna 
That is one thing I am not sure about .. That question sent me out on literature hunting ...

Found this nice survey paper on Vegetative State. Initial scan of the paper say we know what unconsciousness and consciousness are. Let me put it this way ... Can a person in a vegetative state be brought back ? Not yet probably, because of our human body limitations. But, do we know whats happening in conscious state and unconscious state ? Yes ...

Can we make an atheist experience a highly religious feeling and 'supernatural' ? Yup .. But, can we convert him .. Probably No ... Can we make a sad person happy ? Yes. We can induce a state of happiness and ecstasy, but, since the old memories resurface, the effect will be temporary. Can we make two people fall in love ? yes...

Paper I was speaking about Comatose and Vegetative State:
'Conscious Awareness in Patients in Vegetative States: Myth or Reality?'

By, the way the paper ends up saying that it could be real.

Swarup Chandra 
Hmm interesting ... I also came across a few articles/papers that question the existence of consciousness ... It would be very interesting to see if anyone can answer the following with evidence or with high confidence ... Does conscience exists? If so, can you isolate it in the brain? A No to the first question, or a yes to the second question would be a tremendous achievement in science ... And it would shatter the whole philosophy and traditions of Hinduism and it's subsidiary religions

Ramesh Radhakrishna 
programmatic evolution -> Religion !!! Confused !!!

Swarup Chandra
Haha ... Religion was a side note ... Not related ... Sorry to bring it up 

1 comment:

Suraj said...

Thats's a really thought provoking article!

You might be interested in this:
http://www.youtube.com/watch?v=60P7717-XOQ

Stephen Wolfram has been attempting to do just that.
By assuming a fixed set of classes and super(and sub)classes, we restrict the number of possibilities that may occur. Add this to the fact that we have incomplete knowledge of all these classes and properties, and we are truly lost!
Cellular automata-like systems may be the answer. Have the system chaotically evolve (according to certain rules), and observe.