Author Topic: Smooth population control  (Read 2066 times)

Offline MacadamiaNuts

  • Bot Destroyer
  • ***
  • Posts: 273
    • View Profile
    • http://www.franontanaya.com/blog/
Smooth population control
« on: December 08, 2007, 11:55:51 PM »
Smoother than drycutting at a constant value:

Code: [Select]
cond
*.totalmyspecies 10 div 1 floor rnd 1 =
start
50 .repro store
stop

You may wanna drop in the usual energy/body thresholds.
« Last Edit: December 08, 2007, 11:57:16 PM by MacadamiaNuts »
Sometimes you win, and sometimes you lose...

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Smooth population control
« Reply #1 on: March 24, 2008, 06:04:54 PM »
*.totalmyspecies is an interesting value, and I don't see it put to much use.
No population control system seems to work perfectly, there will always be those few over the threshold. However, you can use this variable to make bots that focus all their nrg into a single, huge "assassin shot" if there is enough bots to continue the species after it kamikazes:

cond
 *.totalmyspecies 75 >
 *.eye5 60 >
 'CONSPEC CODE
start
 32000 .shootval store
 'this should make a -1 shot
 .shoot dec
stop
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline Moonfisher

  • Bot Overlord
  • ****
  • Posts: 592
    • View Profile
Smooth population control
« Reply #2 on: April 03, 2008, 02:00:22 PM »
Locust uses totalmyspecies to determine size and agressiveness.
As I recall it's scared of anything but alge below 70, at 100 it starts to grow bigger before reproducing, and at 150 it starts to eat both the energy and body of the alge and swarms everything else with several layers to lock it in.
Apart from that it realy sucks in combat, and it's not that great at eating alge, but it still manages to win most fights from having greater numbers...
It looks kinda cool if you start a simulation with 5 locusts and set the starting energy of alge minimalis to 30000, and start off with enough alge minimalis to reach the veggy cap. Then add multiply4 as a veggy, and make sure veggies get no more than 3 nrg per cycle, and start off with 0 of multiply.
Then Locust eats the first batch of alge gaining high numbers, and multiply starts to spawn. Since multiply is well suited to work as a large bot and generaly has good defences it can hold out for a very long time against a large swarm. It also tries to break out of the swarm at times. I know this is an odd setup, but it's the best way to see a lot of serious swarming from Locust. You can also just run a 5 vs 5 match against multiply4, but it's often over before the swarming realy peeks.
I know I'm getting off topic, but if you're going to look at Locust I just want you to see the heavy swarming
The heavy swarming part is more of an africanized bee behavior when they're fighting hornets, but the different swarming stages sugested Locust as a name, and I thought it sounded better.

Almost forgot, if you're running an evo sim a genes that kills the bot would probably devolve rather fast since it basicaly has no other function than occasionaly killing the bot the mutations that break it will always be benefitial. It helps to use an instant kill shot to take another bot with you, but I still don't think it'll last long. Same goes for inhibitting reproduction or generaly any kind of harmfull gene.
I think the best way to get population controll in an evo sim would be to ingnore conspecs and have the bots fight eachother, focus on killing rather than feeding.
It would still devolve, and the cap wouldn't be as stable, but I think it would last longer. Generaly having genes that focus mor on killing others than getting energy from it will limit population. Will be anything but smooth though, could probably whipe the population at times.
« Last Edit: April 03, 2008, 02:14:48 PM by Moonfisher »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7718
    • View Profile
Smooth population control
« Reply #3 on: April 03, 2008, 02:35:07 PM »
Enitor Comesum is a bot I wrote a few years ago that does that: it focuses entirely on killing anything it sees (children, others, veggies, everything).  It's very good at limiting its population, almost to a fault (it's hard to get pop numbers above about 100).

Offline rsucoop

  • Bot Destroyer
  • ***
  • Posts: 166
    • View Profile
Smooth population control
« Reply #4 on: April 06, 2008, 11:23:36 PM »
Sounds like a vicious cycle...