Bots and Simulations > Untagged bots

Artemis Minimalis

(1/3) > >>

Gaiacarra:
My first ever full bot, pretty basic but an ok search pattern.


--- Code: ---'Artemis Minimalis
'By Gaiacarra October 2007
'Has basic but fairly efficient hunting instincts.
'Will not kill its own young.

'''''''''''''''''''''''''''''''''''''
'Wander if there's nothing to eat
'''''''''''''''''''''''''''''''''''''
cond
 *.eye5 0 =
start
 314 rnd .aimdx store
 60 .dn store
stop


'''''''''''''''''''''''''''''''''''''
'Don't eat young conspecifics
'''''''''''''''''''''''''''''''''''''
cond
 *.refeye *.myeye =
 500 *.robage > and
start
 314 rnd .aimdx store
stop


'''''''''''''''''''''''''''''''''''''
'Lock-On to targets
'''''''''''''''''''''''''''''''''''''
cond
 *.eye3 *.eye5 >
 *.eye3 *.eye7 <
start
 -25 .aimdx store
stop

cond
 *.eye7 *.eye5 >
 *.eye7 *.eye3 >
start
 25 .aimdx store
stop

cond
 *.eye5 0 >
start
 *.refveldx .dx store
 *.refvelup 30 add .up store
stop


'''''''''''''''''''''''''''''''''''''
'Open fire
'''''''''''''''''''''''''''''''''''''
cond
 *.eye5 50 >
start
-1 .shoot store
 *.refvelup .up store
stop

'''''''''''''''''''''''''''''''''''''
'Reproduce
'''''''''''''''''''''''''''''''''''''
cond
 *.nrg 20000 >
start
 20 .repro store
stop

end
--- End code ---

Numsgil:
You might want to add this condition to the first gene:

*.velscalar 0 =

or maybe a timer gene

...
*.timer 100 mod 0 =
start
0 .timer store
...

The way you're doing it right now would cause the bot to spend a great deal of nrg thrusting every cycle, waisting alot of nrg.

harry:
Hi there,

 nice. I just started writing bots myself - you can try to beat my first creation if you want to (find the code attached to this post). I left it to its own devices for a while and it mutated into a worm or something, not really sure what happened, lol.

At the moment it wins every run against Artemis, but if you add a gene to search larger areas for food they should at least be evenly matched, I think.

Gaiacarra:
Thanks Numsgil, though I changed it to:


--- Code: ---*.velscalar 15 <
--- End code ---

...because at 0 = the bots almost never move because brownian motion or gravity or whatever it is that makes them 'float' when the friction isn't set to sandpaper, keeps their velocity just a little above zero.


--- Code: ---'Artemis Minimalis
'Has basic but efficient hunting instincts.
'Will not kill its own young.

cond
 *.eye5 0 =
 *.velscalar 15 <
start
 314 rnd .aimdx store
 60 .dn store
stop

cond
 *.refeye *.myeye =
 500 *.robage > and
start
 314 rnd .aimdx store
stop

cond
 *.eye3 *.eye5 >
 *.eye3 *.eye7 <
start
 -25 .aimdx store
stop

cond
 *.eye7 *.eye5 >
 *.eye7 *.eye3 >
start
 25 .aimdx store
stop

cond
 *.eye5 0 >
start
 *.refveldx .dx store
 *.refvelup 30 add .up store
stop

cond
 *.eye5 50 >
start
-1 .shoot store
 *.refvelup .up store
stop

' Gene 4 Reproduce
cond
 *.nrg 20000 >
start
 20 .repro store
stop

end
--- End code ---

Yes, A. Minimalis is very basic indeed, I plan on adding a bunch more genes for finding food. I like to just thrown 'em in with some T. Preservans and watch.

Peter:
I like the bot without the condition
--- Quote ---*.velscalar 15 <
--- End quote ---
better, it is more inpredicteble, fooling some opponent bots" including themself in a F1 fight. Becouse of strange circles it is making, an opponent spotting it, misses it becouse of it.
This gene is too taking care the young get away from the mother, I gues becouse this bots shoots it's young that's a little mistake, or was this on purpose  .

I would add some conspec recognition at the food gene, adding a condition of

*.refeye *.myeye =

At this one


--- Quote ---cond
*.eye5 50 >
start
-1 .shoot store
*.refvelup .up store
stop
--- End quote ---

Instead of shooting everything, it shoots everything exept his own specie, just a little smarter.

Navigation

[0] Message Index

[#] Next page

Go to full version