Complex behaviour from simple scripts
|
Savannah Hemingway
Registered User
Join date: 15 Sep 2005
Posts: 7
|
01-21-2006 02:19
Surina, I just found this thread and have been to see the fish. I have to say that this is the most interesting use of SL that I've seen, and the fish are fantastic to watch.
If you ever need more water space, please consider my land in Lake Atlas. I'm on the east side of the dam, south side of the lake. The co-ordinates are Atlas (49, 87). I have a house on the shore and own a fair piece of lake bottom in front of the house. There's also quite a bit of Linden-owned lake bottom around me. You could put a feeder on my property and I believe the fish would have plenty of space to swim.
I don't know anything about scripting, but this fascinates me, as I've always been interested in evolutionary theory and have read many of Stephen Jay Gould's books on the subject.
Please let me know if there's any way I can help you.
|
Lana Tomba
Cheap,Fast or Good Pick 1
Join date: 5 Aug 2004
Posts: 746
|
Hey Surina =)
02-20-2006 11:01
Hi...I've been looking for realistic fish for a looong time now...no..not pictures of fish going around in circles..or a high prim fish that looks like a stuffed "Flipper" in a continuous loop jumping in the water and going nowhere...I've been looking for something "realistic".
I've found maybe..two SIMS where someone has created a really nice fish..but guess what?..they're never for sale =(...and the one person who does sell really nice fish in an aquarium (who I bought from)...well....they don't really offer a solution for those who need their prims for more important stuff like anime balls and chairs and walls etc.
So...here I am..looking..for low primd/realistic fish that seem to have a mind of their own and are looooow on the prim usage.
I've now opened my store in Mallard-(Koi Planet) and am selling 20 different kind of Koi (actually 40....- 20 colors for deep SL water and 20 identical colors for shallow SL water)
They vary in markings and sizes and behavior.Also..the biggest selling point of these fish are they have NO PRIM COUNT (to speak of) yes..they're made with 11 prims each..but the ONLY prim that is counted against your SIM is the ONE Prim rezzer (sold seperately)...so...I think Ive cracked the problem of SL waters being dark, gloomy and lifeless.
They do wander outside of your land but DO NOT WORRY..Even your neighbors will be amazed and pleased that their prim count isn't affected by the fishy nomads.
Please Stop by Koi Planet in MALLARD..or look up my name ( Lana Tomba ) and get the LM from my picks section in my profile. Take a look at how my waters are "alive'!! =)
P.S. These fish currently swim ONLY in SL waters..They are wild..and have not been domesticated yet=P. I am also offering "packages" (rezzers with 10 - 20 varying fish already dropped in them) for a lower cost overall in the very near future.
- Lana Tomba-Breeder of Fish.
|
DoctorMike Soothsayer
He's not a real doctor.
Join date: 3 Oct 2005
Posts: 113
|
Discussion or advert?
02-21-2006 06:56
Was the last post just a plug for a product, or did I miss something?
_____________________
Performance Artist and educator "Thinking outside the Prim"
|
Lana Tomba
Cheap,Fast or Good Pick 1
Join date: 5 Aug 2004
Posts: 746
|
Apologies
02-22-2006 00:04
sorry for that..I see that it did..and DOES seem like shameless self promotion..but more to the point..thats EXACTLY what it is...This is a thread talking about exactly what I finally accomplished and am offering to the rest of sl (something noone else seems to be doing at the moment).I really wanted to brag..yes..blow my own horn..cause i was soo pleased that "I created"..that "I finished a task well done". Im sorry for that..and will be more choosey in the future where to post my accomplishments..Thankyou
Lana Tomba-Breeder of Fish~
|
Stan Lowell
Registered User
Join date: 8 Apr 2006
Posts: 5
|
Surina's fish still alive?
05-04-2006 10:16
From: Surina Skallagrimson My mind is going through a fallow period Hi - this thread is fascinating, just read through it all yesterday, and last night went to find the fish. Found them in Hypatia (or maybe it was next door in Themiskyra- can't remember now), but unmoving and all bunched around an underwater plant. Couldn't get them to respond in any way. Is there a working copy of this fish experiment anywhere, or some way of "reanimating" the fish at Hypatia (i.e. starting them up again)? I'm so very curious to see this in action... Thanks.
|
Luciftias Neurocam
Ecosystem Design
Join date: 13 Oct 2005
Posts: 742
|
05-05-2006 10:33
From: Stan Lowell Hi - this thread is fascinating, just read through it all yesterday, and last night went to find the fish. Found them in Hypatia (or maybe it was next door in Themiskyra- can't remember now), but unmoving and all bunched around an underwater plant. Couldn't get them to respond in any way.
Is there a working copy of this fish experiment anywhere, or some way of "reanimating" the fish at Hypatia (i.e. starting them up again)? I'm so very curious to see this in action...
Thanks. I've been told that the recent attacks on SL have bolloxed the fish and Surina hasn't been around to repair them in a bit...
|
Trep Cosmo
Registered User
Join date: 3 Mar 2005
Posts: 101
|
05-05-2006 12:30
Try Themiskyra. There were a few living after the last attack if I recall.
_____________________
"There is no 'I' in team, but there is a 'Me' if you scramble it." -- House
|
Unhygienix Gullwing
I banged Pandastrong
Join date: 26 Jun 2004
Posts: 728
|
05-06-2006 12:56
I just came across this thread, and tried to go visit. Found a few fish but they were frozen, unmoving.
If the project is still being maintained, I'd love to see them in action sometime.
|
Delzo Delacroix
The Avatarian
Join date: 2 May 2006
Posts: 80
|
They're Dead Jim
05-07-2006 16:27
I am a newb who has read this entire thread and was anxious to see them working, maybe as an inspiration of coding my own animal life in the future.
Hopefully, Surina gets some time to fix them as I'd hate to be one of the few who hasn't seen this in action.
I was one of the 7 people who bought Maxis' SimLife back in the mid 90's and had hours of fun tinkering and watching.
|
Surina Skallagrimson
Queen of Amazon Nations
Join date: 19 Jun 2003
Posts: 941
|
05-09-2006 01:18
Sorry guys, I've been massively busy in RL and not had a chance to get online for over 2 months now. Not by choice I must add, I miss SL. The fish survived on their own quite well up untill around two weeks ago when I recieved a whole bunch of alerts telling me that they'd basiclly died  100+ emails within a few minutes... I will try to get online sometime today to reset them and remove the bodies.
_____________________
-------------------------------------------------------- Surina Skallagrimson Queen of Amazon Nation Rizal Sports Mentor
-------------------------------------------------------- Philip Linden: "we are not in the game business." Adam Savage: "I reject your reality and substitue my own."
|
Trep Cosmo
Registered User
Join date: 3 Mar 2005
Posts: 101
|
05-09-2006 12:37
From: Surina Skallagrimson I will try to get online sometime today to reset them and remove the bodies. That's such an odd thing to hear when speaking about SecondLife... Oh and yay! No more dead fishies! They were kinda starting to smell a little. 
_____________________
"There is no 'I' in team, but there is a 'Me' if you scramble it." -- House
|
Ketra Saarinen
Whitelock 'Yena-gal
Join date: 1 Feb 2006
Posts: 676
|
05-09-2006 13:42
From: Surina Skallagrimson Sorry guys, I've been massively busy in RL and not had a chance to get online for over 2 months now. Not by choice I must add, I miss SL. The fish survived on their own quite well up untill around two weeks ago when I recieved a whole bunch of alerts telling me that they'd basiclly died  100+ emails within a few minutes... I will try to get online sometime today to reset them and remove the bodies. This is good to hear!  I just now stumbled upon this thread and have been on a rollercoaster ride the last few posts. Can't wait to see these fish in action.
|
Ketra Saarinen
Whitelock 'Yena-gal
Join date: 1 Feb 2006
Posts: 676
|
05-09-2006 18:12
I'm watching the fish near the feeders at Themiskyra 163,221,29. There's one large group of fish wandering around, and the occaisional singe or pair.. But what I find very interesting is that there are a group of four fish that are staying together and appear to be ignoring the the larger school.
|
Stan Lowell
Registered User
Join date: 8 Apr 2006
Posts: 5
|
open-sourcing the AL fish?
05-10-2006 07:18
Hi Surina - thanks for resetting the fish - didn't get a chance to see them yesterday but hopefully they'll still be doin' their thing after the grid comes back up today.
Is there any chance you might consider open-sourcing the code driving these fish? It might be interesting to see what sorts of clever developments people could come up with, and keep the project going forward in your absence.
|
Unhygienix Gullwing
I banged Pandastrong
Join date: 26 Jun 2004
Posts: 728
|
05-10-2006 08:09
Surina, this doesn't directly relate to your fishes, but rather to the thread title. Scientists have begun to exploit emergent behavior and collective intelligence by making robots to mimic cockroaches. They claim that, if successful, it could potentially be used in higher-order animals, like sheparding farm animals. http://www.newscientisttech.com/article/dn9136-roboroach-could-betray-real-cockroaches.html
|
Laser Pascal
Registered User
Join date: 21 May 2005
Posts: 15
|
05-10-2006 16:40
From: Surina Skallagrimson The fish are designed to be as lag free as possible in order to have as many as possible to get the propper shoaling effects. llListen() is notorious for causing lag and the potential of hundreds of fish, each with multiple scripts, each with listen handlers is not worth thinking of. Even the Sensor calls are strictly controled to reduce lag. On the other hand, it would be quite easy to spawn a baby fish with a parameter that turns on the listen (so fish that are dragged out of inventory don't have any active listens), pass all the variables you wish to it, then pass one final parameter that turns off the listen with a call to llListenRemove(). No worries about hundreds of fish all listening for their entire life. (edit) Even better, you could have the rez parameter be a random negative number (within the allowable listen channel range), which would then initiate a listen in the child fish on that random number. Then pass the parameters, etc. No clogging a single channel that way, even if hundreds of fish were born at once, and being a negative channel, no way for users to speak to the fish.
|
Alux Plasma
Registered User
Join date: 27 Jan 2006
Posts: 1
|
Well done!
05-12-2006 01:34
After reading about the fish on this thread and in blogs, I decided to check them out. I went to Themiskyra 163,221,29 and there they were! They do exhibit some lifelike behavior. There did seem to be 4 that were "stuck" on the one piece of "seaweed", or maybe they were just resting there!
I'll be joining the Artificial Life group (if you'll have me!). I've been simulating animal life in computers since the late 70s. I worked in the Artificial Intelligence lab of a defense contractor in the 80s. I worked on machine learning and natural language processing projects. I haven't been doing all that much lately but I'd like to do some AI and AL projects here in SL.
Thanks for creating this interesting AL project! I hope to be of some help to anyone who asks in the future.
|
Surina Skallagrimson
Queen of Amazon Nations
Join date: 19 Jun 2003
Posts: 941
|
07-10-2006 02:40
After a slightly forced break from SL I can now report that the killer weed in Themiskyra is gone and the fish are thriving. The main shoal lives in Hypatia (NE side of the lake) while the the shoal in Themiskyra is much smaller due to less food.
As a note of interest, it's now 5 months since the last time the entire stock of fish were deleted and reset with the last 3 months seeing them survive entirely on their own without my intervention. They've survived griefing, server crashes, sim restarts, server upgrades, even the killer weed... I think it's time to move to the next level.
And for those that like trivia ... Each fish has a hard coded lifespan of approx 4 hours, though most don't live that long. So given an average lifetime of, say, 2 hours over a 5 month period means the fish should be at about generation 1800.
More soon.
_____________________
-------------------------------------------------------- Surina Skallagrimson Queen of Amazon Nation Rizal Sports Mentor
-------------------------------------------------------- Philip Linden: "we are not in the game business." Adam Savage: "I reject your reality and substitue my own."
|
Jolyon Cordeaux
Registered User
Join date: 14 May 2006
Posts: 2
|
07-12-2006 08:46
Wow great  I've been thinking of this since I joined SL a month ago. I hear you spent a year and a half on it... congrats on finding that its all based around very simple behaviours! I'm a student studying Natural Computation (this falls under that banner) and hence I knew from reading papers that this was the case - so congrats for deducing it yourself! Basically it all started with BOIDS...  Anyway, god luck and I'll be looking out for this AI group. I haven't read the entire thread but if you need some tips on evoloutionary algorithms, neural nets, reinforcement learning, L-Systems or any aspect of AI then gimmie a shout! Jo.
|
Surina Skallagrimson
Queen of Amazon Nations
Join date: 19 Jun 2003
Posts: 941
|
07-14-2006 03:30
Hi Jo,
Yes, it all started with Boids and my fish use several techniques adapted from them. I've exchanged an Email or two with Boids creator Craig Reynolds. He's currently working for Sony designing AI and crowd simulation systems for PlayStation3.
Reinforcement learning is something I'm very interested in for the fish. They currently "learn" a food prefference based on what they've eaten in the past, but its a very simple implimentation (has to be simple, I designed it...) and while it works, could be vastly improved upon.
You've probably realised by now that after 2+ years playing with this I'm not doing it for personal gain beyond my own amusement. I can't see myself ever selling the fish as they never reach a stable point where I can say "These work, they're L$10 each..."
PM me if you have any ideas
Surina
_____________________
-------------------------------------------------------- Surina Skallagrimson Queen of Amazon Nation Rizal Sports Mentor
-------------------------------------------------------- Philip Linden: "we are not in the game business." Adam Savage: "I reject your reality and substitue my own."
|
Surina Skallagrimson
Queen of Amazon Nations
Join date: 19 Jun 2003
Posts: 941
|
It's all in the jeans... 
07-19-2006 08:57
ok, so the grid is down and it's too hot to work in this heat wave, so I thought I'd better update the log.
I've implemented DNA passing between fish as they clone. This currently consists of a 20 char string of Hex data which passes info about Greed, Food pref and sight angle. (See previous post for descriptions of Greed and food pref)
The reason I'm doing it this way? One string of data is much the same as any other string of data, so as long as the string only contains valid (hex) digits it can be understood by the fish and implemented. No formating involved. Obviously the relevance of the data is important, but stupid data will not crash the fish, just render them un-viable and they'll die off.
Alternatively, stupid data could by pure chance produce a breed of fish far superior.
Each time a fish clones it passes a copy of its base DNA to the child fish, but first a single char in the DNA string is randomly changed (or not). Any one of the 20 chars could be chosen, so you never know which part will be mutated, and the chosen char could be either incremented, decrimented, or not changed at all. This then becomes the base DNA for the child fish and mutations are passed down while the parent fish constantly uses a fresh copy of its base DNA to mutate and pass on, so all children from one parent will be similar.
A simple fish creator was used to generate a set of starter fish as the first generation would not have parents to give them DNA...
base DNA Sample:- 050f0f0f0f0f0f0f0fa0
First two chars are the greed level, The next 16 chars, in pairs, define food preference. Base DNA sets equal pref for all food types. The final pair define the sight angle used for llSensor() while searching for food. a0 = 160
Because the random mutation affects each char individualy and not as value pairs, there is a 50/50 chance that a particular value could change by +- 16 as well as +-1.
In use, the greed and sight angle data is used directly in the scripts. The food pref data is combined with the "learned" food preference. So a 1st generation fish with no genetic preference will solely depend on learnt preference as it feeds, while a later generation with mutated DNA may have a genetic preference for a particular food type. If that preference is strong enough, and the food is not available the individual could starve without cloning. Hence the mutations that produce a preference for food that IS available should prevail.
I'm going to let these evolve for a while to see how they perform, then I plan on shifting ALL the variables used in the scripts into the DNA. The base DNA in this case will be the values I currently have as fixed in the scripts that I know work. It'll be interesting to see if they evolve to be any better...
Part three of the DNA experiment will be to remove basic cloning and introduce proper breeding with DNA swaping.
_____________________
-------------------------------------------------------- Surina Skallagrimson Queen of Amazon Nation Rizal Sports Mentor
-------------------------------------------------------- Philip Linden: "we are not in the game business." Adam Savage: "I reject your reality and substitue my own."
|
Surina Skallagrimson
Queen of Amazon Nations
Join date: 19 Jun 2003
Posts: 941
|
07-20-2006 02:42
Quick update DNA passing is working 
_____________________
-------------------------------------------------------- Surina Skallagrimson Queen of Amazon Nation Rizal Sports Mentor
-------------------------------------------------------- Philip Linden: "we are not in the game business." Adam Savage: "I reject your reality and substitue my own."
|
Surina Skallagrimson
Queen of Amazon Nations
Join date: 19 Jun 2003
Posts: 941
|
07-21-2006 06:24
DNA has been expanded to include variables that control the shoaling, now 32 chars long.
With the added length I decided to give the option to mutate up to 3 of the genes each time the DNA is passed, otherwise the rate of mutation would get slower and slower as DNA length increases.
Of course, as the mutation is done randomly there is still the chance that it may not mutate at all, or even reverse a previous mutation...
_____________________
-------------------------------------------------------- Surina Skallagrimson Queen of Amazon Nation Rizal Sports Mentor
-------------------------------------------------------- Philip Linden: "we are not in the game business." Adam Savage: "I reject your reality and substitue my own."
|
Invariance Field
Registered User
Join date: 19 Jul 2006
Posts: 1
|
07-23-2006 08:28
Hello, congrats on your fish, they sound excellent. I'm a researcher in artificial intelligence, and recently joined SL to play with scripting. It's nice to see that you correctly identified the solution of local rules using a minimum of interaction. This really seems to be the answer to Hume's problem of getting intelligence from non-intelligence. I'm curious; have you attempted to either start fish from random DNA, or use a mating concept where two strings of DNA are combined? Lastly, do you keep track of population dynamics? In any event, good work, this is very interesting. (You should publish  )
|
Surina Skallagrimson
Queen of Amazon Nations
Join date: 19 Jun 2003
Posts: 941
|
Lessons in Lurve
07-26-2006 04:54
Thanks for the comments Inv,
I don't keep track of population dynamics other than by watching them. The initial aim of the project was to make fish that "looked pretty", and while it's moved on a lot from that initial goal the "if it looks right..." method still works very well. I wouldn't know how to go about collecting population data anyway or even what to do with it if I did.
And so on to todays blog update, yes, this thread is turning into a mini blog.
The DNA passing is going well, divergence is happening as expected with fish types self selecting over generations to favour the available food. Areas with red or yellow feeders have a strong prevalence of red/yellow fish, with few or none of the other colours. More importantly, new fish in these areas are born as red/yellow showing a genetic preference. The area with predominantly green feeders has predominantly green fish.
And the title of this post? I've started work on the next stage which is mating and DNA mixing. I need to rez my thigh length waders and teach them about the "birds and the bees..." It's a good thing the lake is in a mature region....
_____________________
-------------------------------------------------------- Surina Skallagrimson Queen of Amazon Nation Rizal Sports Mentor
-------------------------------------------------------- Philip Linden: "we are not in the game business." Adam Savage: "I reject your reality and substitue my own."
|