Darwinbots Forum

Bots and Simulations => DNA - General => Topic started by: asterixx on June 28, 2008, 06:12:30 PM

Title: Optimizing a Swarm
Post by: asterixx on June 28, 2008, 06:12:30 PM
I was wondering if anyone could help me improve the behaviour of this bot. I would particularly like them to be able to survive better, but also it would be neat if there was a way to make them stay in tighter clusters. Here's the DNA:

________________________________
 cond
 *.eye5 0 >
 *623 *.myeye !=
 start
 *.refveldx .dx store
 *.refvelup 30 add .up store
 stop

 cond
 *.eye5 50 >
 *.refeye *.myeye !=
 start
 -1 .shoot store
 *.refvelup .up store
 stop


 cond
 *.eye5 0 =
 *.refeye *.myeye =
 or
 start
 314 rnd .aimright store
 stop

 cond
 *.nrg 5000 >
 start
 10 .repro store
 stop
________________________________

Thanks.
Title: Optimizing a Swarm
Post by: Numsgil on June 28, 2008, 06:48:55 PM
The swarming behavior is caused by that first gene.  It's conspec broke, so the bots now accelerate towards kin.  The third gene will cause them to spin away from kin at the same time, so the net result is a poorman's swarming behavior.

There are a couple of swarming bots in the bestiary.  How true to the original bot do you want to stay?  The simplest tweaks would be to that 30 constant in the first gene.  Set it to different values and observe the differences in behavior.
Title: Optimizing a Swarm
Post by: asterixx on June 28, 2008, 07:47:28 PM
Well, whatever advice you might have would be helpful. One of the most important things I want to fix is that when the swarm hits a wall, it gets a little broken up. So I'm going to start with that.
Title: Optimizing a Swarm
Post by: Numsgil on June 28, 2008, 10:29:09 PM
Swarm (http://www.darwinbots.com/Forum/index.php?showtopic=1156) and Fish School (http://www.darwinbots.com/Forum/index.php?showtopic=305) are the two swarming bots I'm aware of.  Fish School is based on animal minimalis, so it might be the better place to start.