Author Topic: My Bot  (Read 4634 times)

Offline That One Guy

  • Bot Neophyte
  • *
  • Posts: 2
    • View Profile
My Bot
« on: April 03, 2010, 10:08:27 AM »
Hi. Im not really new to darwinbots but i am to coding my own bots and to the community.  anyway i made this bot trying to test how some of the features work and to me it looks as though it should work and for the most part it does but my virus effects my bot so if you could would you help me  ?[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']'Animal_Minimalis

'Contains everything necessary for it
'to survive and reproduce.

cond
.shoot -2 =
start
.shoot 0 store
stop

cond
*.eye1 0 =
*.eye2 0 =
*.eye3 0 =
*.eye4 0 =
*.eye5 0 =
*.eye6 0 =
*.eye7 0 =
*.eye8 0 =
*.eye9 0 =
start
314 .aimdx store
stop

cond
*.robage 0 =
start
.fixpos .vloc store
1 .venval store
stop

cond
100 *.poison >
start
100 *.poison sub .strpoison store
.shoot .ploc store
stop

cond
*.refeye *.myeye !=
*.eye5 0 >
start
.refvelsx .sx .store
.maxvel .up .store
'fire venom
-3 .shoot store
stop

cond
100 *.venom >
start
100 *.venom sub .strvenom store
stop

cond
*.nrg 20000 >
start
.repro store
stop

cond
start
-2 .shoot store
*.thisgene .mkvirus store
50 .vshoot store
stop

cond
*.eye1 0 >
start
30 .aimsx store
stop

cond
*.eye2 0 >
start
30 .aimsx store
stop

cond
*.eye3 0 >
start
30 .aimsx store
stop

cond
*.eye4 0 >
start
30 .aimsx store
stop

cond
*.eye6 0 >
start
30 .aimdx store
stop

cond
*.eye7 0 >
start
30 .aimdx store
stop

cond
*.eye8 0 >
start
30 .aimdx store
stop

cond
*.eye9 0 >
start
30 .aimdx store
stop
end

its based on animal minimalis but i scraped most of its code.  my big problems as i said are the virus affecting my bot (i tried to stop that with gene 1)  also my poison doesn't seem to be firing.  I was thinking of implementing a sexual reproduction gene but that seemed a little confusing. one last thing do you think the virus should stun and the venom make them shoot energy or the other way around like it is now? thanks

Offline Houshalter

  • Bot Destroyer
  • ***
  • Posts: 312
    • View Profile
My Bot
« Reply #1 on: April 03, 2010, 10:41:56 AM »
For the virus, put this as a condition:

Code: [Select]
*971 79 !=
Then put this as a gene in your bot:

Code: [Select]
cond
*971 79 !=
start
79 971 store
stop

Then you have to use another gene to fire your virus. Put this before your virus:

Code: [Select]
cond
start
*.mkvirus 0 =
*.nrg (whateverItNeedsToBe) > and
*.thisgene 1 add .mkvirusstore
*.vtimer 1 =
100 .vshoot store
stop

Also you can't fire poison, its automatically fired at enemies in place of -2 shoots when they fire -1 shots at you.
« Last Edit: April 03, 2010, 10:42:36 AM by Houshalter »

Offline That One Guy

  • Bot Neophyte
  • *
  • Posts: 2
    • View Profile
My Bot
« Reply #2 on: April 03, 2010, 11:34:51 AM »
Code: [Select]
'Animal_Minimalis

'Contains everything necessary for it
'to survive and reproduce.

cond
start
*.mkvirus 0 =
*.nrg 500 > and
*.thisgene 1 add .mkvirusstore
*.vtimer 1 =
100 .vshoot store
stop

cond
*971 79 !=
start
79 971 store
stop

cond
*.eye1 0 =
*.eye2 0 =
*.eye3 0 =
*.eye4 0 =
*.eye5 0 =
*.eye6 0 =
*.eye7 0 =
*.eye8 0 =
*.eye9 0 =
start
314 .aimdx store
stop

cond
*.robage 0 =
start
.fixpos .vloc store
1 .venval store
stop

cond
100 *.poison >
start
100 *.poison sub .strpoison store
.shoot .ploc store
stop

cond
*.refeye *.myeye !=
*.eye5 0 >
start
.refvelsx .sx .store
.maxvel .up .store
'fire venom
-3 .shoot store
stop

cond
100 *.venom >
start
100 *.venom sub .strvenom store
stop

cond
*.nrg 20000 >
start
.repro store
stop

cond
*.eye1 0 >
start
30 .aimsx store
stop

cond
*.eye2 0 >
start
30 .aimsx store
stop

cond
*.eye3 0 >
start
30 .aimsx store
stop

cond
*.eye4 0 >
start
30 .aimsx store
stop

cond
*.eye6 0 >
start
30 .aimdx store
stop

cond
*.eye7 0 >
start
30 .aimdx store
stop

cond
*.eye8 0 >
start
30 .aimdx store
stop

cond
*.eye9 0 >
start
30 .aimdx store
stop
end

I changed it to this and now no virus is firing at all!
not ur fault im just not too good...
« Last Edit: December 22, 2011, 11:55:50 AM by Shasta »

Offline Houshalter

  • Bot Destroyer
  • ***
  • Posts: 312
    • View Profile
My Bot
« Reply #3 on: April 03, 2010, 03:03:21 PM »
Move this gene right before your virus. It makes and fires the gene after it. By the way, where did your virus gene go?

Code: [Select]
cond
start
*.mkvirus 0 =
*.nrg 500 > and
*.thisgene 1 add .mkvirus store
*.vtimer 1 =100 .vshoot store
stop

Also it should have been firing your second gene as a virus anyway, but it didn't because a typo in the code. My bad, I fixed it.

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
My Bot
« Reply #4 on: April 03, 2010, 05:23:46 PM »
The replicator code should really be inside the virus. Not only does that make the virus copy itself in new hosts, it also prevents infections from shifting the DNA and messing it up (this is only really important if the opponent also uses viruses.)
"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 Houshalter

  • Bot Destroyer
  • ***
  • Posts: 312
    • View Profile
My Bot
« Reply #5 on: April 03, 2010, 10:43:08 PM »
But how do you put it in the virus without having the virus activate inside your bot?

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
My Bot
« Reply #6 on: April 04, 2010, 03:45:21 PM »
The point is to have the conditions inside the virus, not outside.
Which reminds me, the virus should only activate after robage > 0. You have no idea how many times a virus went wrong for me because it was inserted as the first gene and screwed everything up on reproduction.
« Last Edit: April 04, 2010, 03:46:36 PM by bacillus »
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan