Showing posts with label s. Show all posts
Showing posts with label s. Show all posts

Thursday, February 4, 2010

OpenSim Evolution Simulation I

This is the first progress report on what's going on with my OpenSim Artificial Life/Evolution simulation introduced in this post.

Since I am interested in social behavior I think a good place to start is simulating a population where prisoner's dilemma is operating. The term "game" here used in the game theoretic sense, gets its name from the following scenario:

Two suspects are arrested by the police. The police lack enough evidence for a conviction. The prisoners are kept separate and the prosecutor visits each of them with the same deal. If one testifies (defects from the other) against the other, and the other remains silent (cooperates with the other prisoner), the betrayer goes free and the silent accomplice receives the full 10-year sentence. If both remain silent (they cooperate with each other), each gets only six months in jail for a minor charge. If each betrays the other, each receives a five-year sentence. Each prisoner must choose to betray the other or to remain silent. Each one is assured that the other would not know about the betrayal before the end of the investigation.

(modified from http://en.wikipedia.org/wiki/Prisoner%27s_dilemma)

Now this scenario may not seem related to evolution but it turns out that this is exactly the sort of thing that happens when two animals related or not might have choices to cooperate or not with other animals either of the same species or sometimes other species.

A couple of design issues revolve around topics like how to link the organisms' behavor to genetics, represent the genetics of the interacting organisms and how to pass that genetics to offspring. To get a feel for the general strategy I have used in the past, go to this post.

One new technical issue is that unlike my genetics activities and my discrete generation evolution simulation, the organisms I am using here have to be able to replicate themselves independently of some command from me. Now that a scary thought since I don't want to over run a sim with thousands of little evolving critters.

Fortunately the LSL Wiki gives a good rundown on how to make non invasive self replicating critters. For instance have them be killed if they get out of your parcel. Right now my critters are able to detect the parcel boundary and turn away from the boundary....but I will add the kill feature as an additional safety.

One of LSL's safety features isn't going to work in my case. LSL recommends using a counter that is decremented by 1 each time an offspring is replicated from the parent. The value of the counter is passed as the integer parameter in the llRezObject function and when the counter reaches zero say after 10 generations the critter dies rather than replicating. The problem is that I use this parameter to pass the genetics from parent to offspring.

So I need to figure out how to prevent non invasive critters from over running my parcel. My first impulse was to have each critter sense the number of critters in the parcel and stop them from replicating when the parcel count gets to a certain point-kind of a parcel carrying capacity. And that might be a good idea but the simplest way to do it might be to have one object track the number of critters in in the parcel and periodically send that to all the critters using llRegionSay on a private channel and have the critters individually adjust their replication as required.

A more interesting option might be to use a sensor event to get the number of critters in a set radius around the sensing critter and use that to adjust the rate of reproduction, perhaps make it negative. So critters in a region with few others would be able to multiply more rapidly than those at higher densities. I already use a sensor event to let the critters detect each other so I could modify that to do this as well. This would actually be quite realistic since organism's reproductive rates are often affected by density dependent factors.

So here is what I am thinking on the replication issue:

1. Implement a die if beyond land owned by me along with my current boundary detection routine.
2. Implement a central controller that determines how many critters are in my region and either kills them all or stops them from reproducing further if they get too numerous beyond some large population size say 4,000.
3. Implement the sensor option to determine the density of critters and adjust the rate of local reproduction. Should be possible to tweek this so the population's maximum would tend to run at a lower limit than 4,000, say 2,000.

Maybe I am being paranoid but who knows what sort of chaotic things can happen with 2,000 artificial life forms run around a sim unchecked. It would be the equivalent of pythons in the Everglades and probably really annoy my neighbors.


This may be interesting in its own right as a simple population growth model even with out the complication of prisoner's dilemma! If you want to join the fun and see what's going on, IM me as Paul Decelles in ScienceSim or as Simone Gateaux in SL . Remember, you need to configure your client for OpenSim and set up a user account. Also Avatars do not port between SL and Opensim.

The ScienceSim site will get you started.: http://www.sciencesim.com/ Make sure you read and follow the directions and rules carefully.

PS: SLurls don't work in OpenSim as far as I can tell but if you are in OpenSim I am in
Oregon North 47, 184, 23 in the ScienceSim grid.

Wednesday, March 18, 2009

Wonderland

Today Kira Cafe hosted a presentation by Nicole Yankelovich from Sun Microsystems about Wonderland, an environment for creating virtual worlds. Wonderland is quite different than Second Life in a number of respects. So I will briefly summarize my in world notes.

The handsome nautilus to the left is Joshua Linden by the way.

Wonderland is free and developers can make either open source or proprietary applications. One can create data driven worlds or programmatic worlds. Also it has modules that allow you to create just bits of functionality e.g. an audio recorder or a microphone. In fact a big push for her group in Sun is in audio for virtual conferencing. For example, one can dial up or down bandwidth from telephone quality to CD quality for internal meetings. Thus one can get a really immersive experience

Suns' vision is different than Second Life since rather than one big world, Wonderland is decentralized and the idea is to have the possibility of a federation of worlds.
As for how big a world can wonderland make, version 0.4 could only support 20 users and scalability is an issue. Her group is aiming for worlds with several hundred avatars.

Right now they are in the middle of doing their fourth developer release 0.5 version. This involves a complete rebuild with better avatars and graphics.

Sun is very much interested in the education market, and its use for data visualization and teaching. There is also a wireless sensor platform (this is way cool) for bringing real world data into a Wonderland World for processing or visualization. Sounds like Wonderland has a lot of potential given that it is JAVA based and open source. Perhaps learning system providers such as Blackboard and Angel Learning Systems should check this out.

The Wonderland group is not directly involved in interoperability issues between virtual worlds but perhaps one of their community will pick this up.

Makes me wish I knew JAVA!

By the way Friday, Simone will be at Intel's Science Sim for a visit and blogging session.

Related Links:

https://lg3d-wonderland.dev.java.net/index.html

http://www.sunspotworld.com/