care and feeding of cave systems

after much wailing and gnashing of teeth – i am the proud owner of a brand new island sim. thank you Fritz Linden.

so now i’m breeding caves.

yeah. breeding caves. welcome to our brave new world.

anyway, if you want your caves to turn out any good – you need to pick a fitness function: you need to assign points for what makes a good cave. for my caves, i’m using a list of rules.

  • rule 1: caves must reside within a sphere. as described in my earlier post – the caves are to float as a giant sphere in the sky. this rule rewards caves that have a large spherical shape.
  • rule 2: caves should consist of roughly 6000 stones. since the caves are being rendered in second life – we need to worry about prim count. this rule rewards caves that have around 6000 prims.
  • rule 3: caves should have as many tunnels as possible. a tunnel is defined as a space which has exactly two exits. this rule discourages large open areas favoring wormy-like passages.
  • rule 4: caves should be connected. it’s no fun if you can’t go there.
  • rule 5: cave floors should be flat. rough ceilings and walls are nice – but i want to walk on the floors and put furniture in the rooms.
  • rule 6: cave rooms should be roundish. for that hobbit-hole feel.
  • rule 7: the shortest path from outside to center is as long as possible. got to make it hard.

so, after a day of coding – i’ve got the GA set-up and rules 1-3 implemented. now i’m running tests on adaptive techniques – in the chart above you can see how an evolving population will toggle between various mutation operators – picking and choosing what it needs at the moment.

this is fun.


about this entry