Author Topic: Using venom to make a bot shoot nrg  (Read 693 times)

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
    • Games And Electronica
Using venom to make a bot shoot nrg
« on: September 10, 2014, 08:49:07 AM »
I'm trying to use venom to make a bot release all it's energy in random directions. How do I do that? I've tried this but it doesn't work:

Code: [Select]
cond
 100 *.venval <
start
 100 .strvenom store
stop

cond
 *.eyef 0 >
 *.refshoot 0 =
start
 -3 .shoot store
 .aimsx rnd .shoot .vloc store
 -2 .venval store
stop
"God is an ever receding pocket of scientific ignorence." - Neil DeGrasse Tyson

"God is a kid with an ant farm" - Constantine

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
    • Games And Electronica
Re: Using venom to make a bot shoot nrg
« Reply #1 on: September 10, 2014, 09:39:11 AM »
I found out myself. I have to use different eye distance values to be able to use more than one venom shot and to make it use feeding shots afterwards.

Code: [Select]
'*********************
'* Venemous Predator *
'*                   *
'*********************

cond
 *.robage 0 =
start
 67 .memloc store
 101 67 store
 0 .fixpos store
stop

cond
 *.venom 50 <
start
 1 .strvenom store
stop

cond
 *.nrg 32 >
start
 16 rnd .aimsx store
 16 rnd .aimdx store
 .up inc
stop

cond
 *.eye5 0 >
 *.memval *67 !=
 *.refeye 0 >
 *.reftie 0 =
 *.reffixed 0 =
 *.venom 16 >
start
 *.refxpos *.refypos angle .setaim store
 *.refvelup .up inc
stop

cond
 *.eyef 5 >
 *.eyef 20 <
 *.memval *67 !=
start
 -3 .shoot store
 .aimsx .vloc store
 314 .venval store
stop

cond
 *.eyef 20 >
 *.eyef 30 <
 *.memval *67 !=
start
 .fdbody .vloc store
 128 .venval store
stop

cond
 *.eyef 30 >
 *.memval *67 !=
 *.venom 100 <
start
 128 .shootval store
 -1 .shoot store
stop

cond
 *.eye5 0 >
 *.memval *67 =
start
 314 rnd .aimright store
stop

cond
 *.eye5 0 >
 *.refeye 0 =
 *.reftie 0 > or
start
 -314 rnd .aimright store
stop

cond
 *.shflav -1 =
 *.shflav -6 = or
start
 *.refxpos *.refypos angle .setaim store
 .fixpos .vloc store
 1 .venval store
 -3 .shoot store
 32 .dn 314 rnd .aimright store
stop

cond
 *.body 16000 <
 *.nrg 8000 >
start
 2 .strbody store
stop

cond
 *.body 16000 >
 *.nrg 8000 >
start
 50 .repro store
 314 rnd .aimright store
stop

end

It would be nice if I also could make a bot explode into a cloud of nrg shots.
"God is an ever receding pocket of scientific ignorence." - Neil DeGrasse Tyson

"God is a kid with an ant farm" - Constantine

Offline Shadowgod2

  • Bot Destroyer
  • ***
  • Posts: 386
    • View Profile
Re: Using venom to make a bot shoot nrg
« Reply #2 on: September 10, 2014, 10:01:53 AM »
first it will never store up venom with that because 100 will never be less than -2

cond
*.venom 100 <
start
100 .strvenom store
stop

now this here is a mess

cond
*.eyef 0 >
*.refeye *.myeye != '(or whatever you want to use as recognizing)
start
-3 .shoot store
1 rnd 6 add .vloc store
-2 *.vloc 2 add sgn -1 mult 1 add mult 314 rnd *.vloc 6 sub sgn 1 add mult add .venval store
stop

random turn and a random -2 shot

i hope you have a good targeting system




...well fine then post while i'm posting lol
« Last Edit: September 10, 2014, 10:39:03 AM by Shadowgod2 »

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
    • Games And Electronica
Re: Using venom to make a bot shoot nrg
« Reply #3 on: September 10, 2014, 10:10:30 AM »
Actually ".strvenom" is correct.

http://wiki.darwinbots.com/w/.strvenom

Thanks for the code though. I will check it out.
"God is an ever receding pocket of scientific ignorence." - Neil DeGrasse Tyson

"God is a kid with an ant farm" - Constantine

Offline Shadowgod2

  • Bot Destroyer
  • ***
  • Posts: 386
    • View Profile
Re: Using venom to make a bot shoot nrg
« Reply #4 on: September 10, 2014, 10:34:22 AM »
oop sorry i kinda got use to mk and forgot str

edit: the cond was a bit off though
« Last Edit: September 10, 2014, 10:37:59 AM by Shadowgod2 »

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
    • Games And Electronica
Re: Using venom to make a bot shoot nrg
« Reply #5 on: September 10, 2014, 10:47:14 AM »
This makes the bot shoot info shots instead:

-2 *.vloc 2 add sgn -1 mult 1 add mult 314 rnd *.vloc 6 sub sgn 1 add mult add .venval store

I wanted a venom shot to cause another bot to behave like if it had this gene:

Code: [Select]
start
 314 rnd .aimsx store
 10 .fdbody store
 -2 .shoot store
stop

But maybe that isn't possible to do.

I had this crazy idea that a venom shooting bot would cause another bot to do the above, and while it's doing it, the venom bot would make small bots close to the infected bot which would then feed it's offspring that way.
« Last Edit: September 10, 2014, 10:49:18 AM by Testlund »
"God is an ever receding pocket of scientific ignorence." - Neil DeGrasse Tyson

"God is a kid with an ant farm" - Constantine

Offline Shadowgod2

  • Bot Destroyer
  • ***
  • Posts: 386
    • View Profile
Re: Using venom to make a bot shoot nrg
« Reply #6 on: September 10, 2014, 10:53:30 AM »
Quote

Code: [Select]
start
 314 rnd .aimsx store
 10 .fdbody store
 -2 .shoot store
stop

But maybe that isn't possible to do.

actually i think i can manage that, shouldn't be too difficult. i'll work on it tonight.

Offline Shadowgod2

  • Bot Destroyer
  • ***
  • Posts: 386
    • View Profile
Re: Using venom to make a bot shoot nrg
« Reply #7 on: September 10, 2014, 11:23:19 AM »
What are all the features that you want in it?

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
    • Games And Electronica
Re: Using venom to make a bot shoot nrg
« Reply #8 on: September 10, 2014, 12:17:05 PM »
Once the prey has been infected with venom I want the attacking bot to multiply close to the prey. I think I can do that myself unless you want to.  :)
"God is an ever receding pocket of scientific ignorence." - Neil DeGrasse Tyson

"God is a kid with an ant farm" - Constantine

Offline Shadowgod2

  • Bot Destroyer
  • ***
  • Posts: 386
    • View Profile
Re: Using venom to make a bot shoot nrg
« Reply #9 on: September 11, 2014, 01:00:09 AM »
this is what you wanted but only works if continual shooting...

cond
*.venom 100 <
start
100 .strvenom store
stop

cond
*.eyef 50 >
start
-3 .shoot store
50 inc
0 50 *50 4 sub sgn 1 add mult store
.fdbody *50 sgn -1 mult 1 add mult .shoot *50 1 sub abs -1 mult 1 add mult .aimsx *50 2 sub sgn 1 add mult add add .vloc store
10 *50 sgn -1 mult 1 add mult -2 *50 1 sub abs -1 mult 1 add mult 314 rnd *50 2 sub sgn 1 add mult add add .venval store
store


btw your bot doesn't work very well, always turning away, not towards?

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
    • Games And Electronica
Re: Using venom to make a bot shoot nrg
« Reply #10 on: September 11, 2014, 07:02:07 AM »
It turns out this doesn't work as well as I had hoped. Limitations in the program I guess. The bot can as well just use -1 shots instead.  :sleep:

btw your bot doesn't work very well, always turning away, not towards?

Yeah, it's movement isn't very effective, but that's on purpose. I like to make bots that are good at different things and I try to make them work together in an eco system.

"God is an ever receding pocket of scientific ignorence." - Neil DeGrasse Tyson

"God is a kid with an ant farm" - Constantine