KISS -- What is the simplest way to pathfinding?

My first answer to this is behaviour -- don't make the object moving through space analyze a series of paths and choose one. To me, this is a simple matter of fact. It's also one of those "set in stone" boundaries I have to work around with in SL. Scripts just don't get much memory and nowhere to store information outside of their allotment.

For those of you who don't know, KISS is an acronym for, "Keep It Simple, Stupid." The common meaning of this acronym extends from the philosophy that often the best and most efficient way to accomplish something is to do it in the most simple way possible. Therefore, rather than teach a dumb box how to plot, graph, and map an optimal path given a specific set of rules, I'd rather give it a few rules and let it loose -- it doesn't have to analyze and "pre-think" anything; it's behaviours and complexities will emerge from the initial rules.

The first problem is with the way prims are constructed in SL. When detecting their position, one can only query their centre vector from the sensor event. Circumference is a bit of an issue since it would be extremely easy to just avoid a one-dimensional vector.

There are a few ways one might approach this issue --

  1. Create a larger invisible and phantom prim and set the pathfinder at its center. Then use a collision event to detect surfaces and transfer the information through a linked message.
  2. Use a circumference protocol for obstacles. Obstacles would store their size and shape information -- when the object then detects the object in its approach vector, it would query for the nearest point and the normal; allowing it to readust its course.

Personally, I perfer solution number two -- it would allow the object to move about an environment and avoid object regardless of thier shape and the size of the space the object is contained in. However, it means every prim the object is to avoid must have a script which leads to a couple of other problems:

  1. The pathfinders would only be able to exist within a controlled environment.
  2. More scripts means more server resources
  3. Communcation may not register fast enough for objects to avoid collisions

So I have a course set up in Gibson and am currently working on implementing the second solution to pathfinding. My ultimate goal will be to keep the code from this phase as elegant and stripped down as possible -- it has to be extremely thin and lightweight so as to not add too much baggage when I reach the later stages of the evolution of these creatures.

Any discussion and suggestions are duly welcome -- as are other virtual life experimentors! Remember: if you have a project you'd like to discuss or experiences/knowledge to share; you can write about it here. It is my hope that this blog will become a community hub for artifical life designers, developers, and enthusiasts. Just send me an email or message me in-world!


Links -- Pathfinding

I'm currently working on Phase One at this point which is proving difficult. And it's not because developing an elegant and efficient 3D path-finding system using LSL is hard -- it's finding time to do it. The past week and a half I've been forced into a lot of overtime at work dealing with various events and emergencies. So things are a little crazy for me, but fear not -- I am still progressing.

In fact, check this out to see where I'm getting some of my reading material for this project from.

Basically, these critters will essentially be robots -- except their physical selves and environments are simulated. Later on I will introduce more "organic" behaviours, but for all intensive purposes at this stage I just need robots.

Anyhow, before it gets too late I must go -- so I leave you with some reading material. If you're interested, I highly reccommend checking it out. Lots of goodies in there that may help you with your own projects!


Space and pathfinding...

Satisfied with my fish for the time being, and while parasites are on hold with the giant floating jellyfish; I have decided to move my efforts to a more terrestrially constrained environment -- one I'm sure many may recognize almost as a clichee...

Behold the maze!

Itself also not complete, but it won't take long as I've been through building something like this before... the question this time is what I shall do with it. First of all, I'll tell you that I won't be torturing avatars or anything of the sort. This time I will be experimenting with pathfinding and territory.

  • The first phase will have critters navigating the map by themselves.
  • The second phase will have critters navigating in search of food.
  • The third phase will introduce a "home" territory
  • The fourth phase will introduce competing clans.
  • And the final phase will allow the critters to harm one another in a vie for dominance. :)
This is will be my second big project.. the first being the ongoing development of a evolving genetics system (which will definitely take some time). Maybe I'll introduce self-replicating and evolving food sources for the critters on the side of this experiment. However, the focus will be on navigating space intelligently and forming territories.

I don't have the system entirely worked out yet, but I want to maintain the ideal of "less code, more behaviour." If anyone is interested in helping on this one -- feel free to drop a line.


Offline Endeavours

Following the Politics of Creation and this discussion here (Second Life forums, signup required -- sorry) and with the limits of processing power and physics available to us in Second Life; I figure that it would be most prudent to move some of my larger experiments offline.

I'm in the process of considering which 3D engine to use and what language to program it all in. Personally, I'm in love with Ruby these days, but am just as comfortable in C, PERL, or Python amongst others. I've already looked into Irrlicht and Torque for rendering and have yet to see to physics.

I'd perfer something open-source if possible..

Yes, this is a plea for suggestions. If there is something out there with Ruby bindings I would be ever-so-grateful.


The politics of creation?

Following the reaction to my recent post I had been set to thinking... are there politics involved in everything we create in Second Life?

For example, a major concern I had forseen was the complaint that free-roaming artificial organisms would cause undue lag on other residents. While that is a perfectly valid concern, it did strike me a little deep. The notion of entitlement everyone has to their "fair (and unobstructed)" share was the first thing to cross my mind, but that is only the skin of the problem IMO.

The real problem I think is a growing collective notion that the space we occupy in Second Life is our property. There are many things that tend to intrude on that perceived property; to which we naturally would take offense. Age old wisdom realizes that posession is the grimy core of existence. We tend measure our importance in posessions... and not just physical ones it seems -- money, influence, relationships.. and now it seems even computational cycles.

Where there are resources to use, there are politics...

It is enivitable as history has shown us. So now I'm curious about the politics surrounding resource usage in SL. And while this has happened before, it seems to be taking on a more subtle form. IMO these new resource politics are creating a sort of "isolationist" thinking -- one where any possible way for a person to encroach on that perceived property in SL constitutes some form of offense. From experience, this offense is stronger in somer than others, but it is still distressing.

For one thing -- I do ask the question honestly -- does it breed a quagmire stigma against development and experimentation outside "your property?"

If we envision this sense of property as a bubble around each of us walking through a busy street, we might get a better idea of what is happening in my frame of mind. So this street is made up of our collective bubbles and parts of it change as we move through it. We may pause from time to time, our bubbles may increase or decrease momentarily, but we never stop moving in any permanent way. So the street becomes a constantly transitioning single space -- but never at one moment is it a single place occupied by several people. In effect, if I do something that changes the size of my bubble, everyone else's bubbles are affected -- mainly if I increase my bubble, other bubbles have to get smaller.

Smaller bubbles mean frustrated people. So I wonder why isn't the street just a single space? Did the days of prim-hogging forever close the idea of sharing to SL?

Personally, I can understand why LL eventually did lock down prim allotment to parcel sizes -- but even insubstantial computation cycles?

I fear that eventually EVERY resource will be disputed and parcelled out.