Darwinbots Forum

Bots and Simulations => Bot Tavern => Topic started by: Marax on March 12, 2007, 07:53:33 PM

Title: Animal Martinis
Post by: Marax on March 12, 2007, 07:53:33 PM
Code: [Select]
'Animal_martinis
'By Marax

cond
*.eye5 0 =
*.refeye *.myeye = or
start
33 .aimdx store
1 .up store
stop

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

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

cond
*.eye5 25 >
*.refeye *.myeye !=
*.nrg 20000 >
start
*.refvelup .up store
-6 .shoot store
stop
 
cond
*.eye5 25 >
*.refeye *.myeye !=
start
*.refvelup .up store
-1 .shoot store
stop

cond
 *.nrg 7000 >
*.body 2000 >
start
 40 .repro store
stop

My first bot, I'm getting some memory errors with it though, random numbers at random location in the memory..... happens randomly!

My masters said there were no such thing as randomness, but they didnt see my bot!

Anyhow... Is there anything suspicious in the code that would explain such behaviour?

~Marax
Title: Animal Martinis
Post by: Numsgil on March 13, 2007, 01:01:54 AM
Try setting the waste threshold to 0 in the options panel.  It's in like the 2nd or 3rd tab.  It sounds like Alzheimers (a feature when bots build up too much waste).
Title: Animal Martinis
Post by: Jez on March 14, 2007, 08:12:03 AM
I just tried your bot and it seems to work fine, I didn't spot any random numbers but maybe I'm not looking in the right place!
Nums is probably right regarding the cause, it would happen when your bots waste value got to high, you could add a gene like;

cond
*.waste 500 >
start
*.waste .shootval store
-4 .shoot store
stop

to solve that problem.
Another reason you could be getting random numbers is if you are allowing your bot to mutate, that would add the chance of getting random bits in a bots code each time a bot was born.

File, new sim, simulation settings [species], select your bot, mutation rates - should read all disabled [bottom left] if mutations are off for your bot.
Title: Animal Martinis
Post by: Marax on March 14, 2007, 04:10:05 PM
It probaly was the waste problem, but its fixed now