Darwinbots Forum

Bots and Simulations => Bot Tavern => Topic started by: -venom- on January 05, 2007, 12:12:38 AM

Title: I hope this is the right place :(
Post by: -venom- on January 05, 2007, 12:12:38 AM
this is my first bot it is simply an animal_minimalis with a few upgrades
any tips would be nice

'Alge_Minimaxis
'By: -venom-  
'base: nums' animal_minimalis
'it has no regular shoting capabilities but
'it creates a shell and chaces other bots to
'infect them with its virus.
'warning: I recomend having a corpse eater

cond
 *.robage 0 =
start
 7 989 store
stop

cond
 *.vtimer 0 =
start
 3 .mkvirus store
stop

cond
 7 *989 !=
start
*.thisgene 1 rnd 2 mult -1 add add .delgene store
stop

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

cond
 *.shflav 0 !=
 *.shflav -2 !=
start
 1256 *.shang sub .aimshoot store
 8 .shootval store
 100 .vshoot store
 0 .shflav store
stop

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

cond
 *.shell 250 <
start
 100 .mkshell store
stop

cond
 *.nrg 15000 >
start
 30 .repro store
stop
end

'EDIT: Added to bestiary
Title: I hope this is the right place :(
Post by: Jez on January 05, 2007, 07:35:24 AM
First bot of 2007!!  

It is good at chasing the other bots, unfortunately because it doesn't shoot it doesn't gain energy and so never reproduces.

I would suggest using *.vtimer a bit more;

When it is 0 you can start making a new virus and use a normal shoot gene.

When it is 1 you can fire the virus (remember viruses are shot in a random direction)

When it is >1 you can use a normal shoot gene.

Also you have misspelled vtimer in gene 2, easy to spot if you select a bot while the sim is running or paused, r/click on bot and 'show robot info' then select the dna button. Any misspelled words are shown as 0's
Title: I hope this is the right place :(
Post by: -venom- on January 05, 2007, 03:38:41 PM
ok I'v changed it now it still hunts for food and randomly keeps
shooting a newer virus. im thinking of making it only attack
bots that are infected with it's virus. but I dont know how (yet)


'Animal_Minimaxis 2
'By: -venom-
'orij by nums
'now eats to gain energy and randomly fires
'virus wich deletes the infected bots genes and
'replaces them with a new gene that continualy
'spreads the virus.
'  
'note: virus spreads better in v 2.42.9s  


' Gene 1 Food Finder
cond
 *.eye5 0 >
 *.refeye *.myeye !=
start
 *.refveldx .dx store
 *.refvelup 30 add .up store
stop

' Gene 2 Eat Food
cond
 *.eye5 50 >
 *.refeye *.myeye !=
start
-1 .shoot store
 *.refvelup .up store
stop

' Gene 3 shoot back
cond
 *.shflav 0 !=
 *.shflav -2 !=
start
 1256 *.shang sub .aimshoot store
 8 .shootval store
 400 .vshoot store
 0 .shflav store
stop

' Gene 4,5,6,7 Avoiding others
cond
 *.eye5 0 =
 *.refeye *.myeye = or
start
 314 rnd .aimdx store
stop

cond
start
*.refbody 2 div dup
stop

cond
*.eye5 0 >
*.body >
*.refeye 1 >
start
-15 .up store
stop

cond
*.eye5 50 >
*.body >
*.refeye 1 >
start
.setaim .shoot store
*.aim .shootval store
stop

' Gene 8 make shell
cond
 *.shell 250 <
start
 100 .mkshell store
stop

' Gene 9 make slime
cond
 *.slime 100 <
start
 1000 .mkslime store
stop

' Gene 10 Reproduce
cond
 *.nrg 15000 >
start
 30 .repro store
stop

' Gene 11,12,13 virus genes
cond
 *.robage 0 =
start
 7 989 store
stop

cond
 *.vtimer 0 =
start
 3 .mkvirus store
stop

cond
 7 *989 !=
start
 400 .vshoot store
 *.thisgene .mkvirus *.vtimer -1 mult 1 add mult store
 676 .myeye store
 676 *.memloc store
 *.mkvirus 1 add .delgene *.mkvirus *.thisgene sub dup mult sgn mult
 *.thisgene 1 rnd 2 mult -1 add add .delgene store
stop
end

'EDIT: Added to Bestiary
Title: I hope this is the right place :(
Post by: Jez on January 06, 2007, 01:06:11 PM
Very nice, got all the way up to Callidus in the current F1 league before being beaten.

I'm not sure of the best way to identify if another bot has been hit by your virus, I guess you could use memval and memloc (http://www.darwinbots.com/WikiManual/index.php?title=.memloc) If your virus puts one value in memloc but your bots that aren't affected by virus have another value stored in memloc then any bots not affected that aren't one of yours would return a 0  

You might want to consider adding a body/nrg balance to your bot btw. Because they have such small bodies they are easy targets for -6 shots.
Title: I hope this is the right place :(
Post by: -venom- on January 06, 2007, 05:16:26 PM
yes I could but wouldn't that make them attack there own kind too

unless.....
Title: I hope this is the right place :(
Post by: Jez on January 06, 2007, 06:09:38 PM
Let's say that the memloc was 999 and your bots bots used a memval of 1 to identify themselves.

Your virus would need to place a value of, let's say, 2 into memval.

Any other bot would have a value of 0 in memloc 999...
Title: I hope this is the right place :(
Post by: -venom- on January 06, 2007, 07:35:36 PM
ok these are part of the genes. the trouble im having is
that the bot still seeks out and eats any thing that gets in its way
can you please point out the error in the dna.

' Genes 1,2,3 viral genes
cond
 *.robage 0 =
start
 7 989 store
stop

cond
 *.vtimer 0 =
start
 3 .mkvirus store
stop

cond
 7 *989 !=
start
 67 .memloc store
 101 67 store
stop

' Gene 4 food finder
cond
 *.eye5 0 >
 *.memval *67 =
start
 *.refveldx .dx store
 *.refvelup 30 add .up store
 400 .vshoot store
stop

' Gene 5 eat food
cond
 *.eye5 40 >
 *.memval *67 =
start
 -6 .shoot store
 *.refvelup 30 add .up store
stop
Title: I hope this is the right place :(
Post by: Jez on January 06, 2007, 08:37:46 PM
It's far to late for me to judge this properly;

If you could post the whole DNA it would help.

As far as I can see, blurred vision excluded, your memloc is 989 and your memval is 7 (Id of friends).

If it is not a friend you are using a different memloc to store the memval rather than using the same memloc to register the fact. So gene 5 should be;

' Gene 5 eat food
cond
*.eye5 40 >
*.memval (*you don't want star here as that's the value of location) 7 (!)=
*.memval 0 !=
start
-6 .shoot store
*.refvelup 30 add .up store
stop

This would be only want your bot to attack other bots that have been affected by virus btw.

I you post the whole dna I will try to give you a better answer tomorrow!
Title: I hope this is the right place :(
Post by: Light on January 06, 2007, 10:50:08 PM
You need to cut and paste '67 .memloc store' from gene 3 to gene 1, because you dont need it set in enemy bots you only need it set in your own bots. At the moment your bots aren't setting memloc so memval = 0 and *67 = 0 so they attack each other. Im far too tired to understand if what Jez is saying makes sense or is a better suggestion
Title: I hope this is the right place :(
Post by: Jez on January 07, 2007, 08:02:48 AM
No, no, no; don't listen to me!

I'd obviously already started drifting off into dreamland when I wrote that. It makes no sense. Listen to what Light said instead.  
Title: I hope this is the right place :(
Post by: -venom- on January 07, 2007, 08:08:51 PM
Quote
Posted Yesterday, 01:02 PM
No, no, no; don't listen to me!

I'd obviously already started drifting off into dreamland when I wrote that. It makes no sense. Listen to what Light said instead. happy.gif

lol ok

thanks that is working much better
Title: I hope this is the right place :(
Post by: Jez on January 15, 2007, 08:49:59 AM
Moved to bot tavern from the starting gate, the bots posted here have been put in the bestiary now.