Darwinbots Forum

Code center => Bugs and fixes => Topic started by: Shadowgod2 on April 19, 2015, 01:50:08 AM

Title: poison and venom not working
Post by: Shadowgod2 on April 19, 2015, 01:50:08 AM
i know it's a bit late for bugs but i just found a pretty big one.

i was messing around with poison but nothing i put into it works like it should or rather at all. and i just checked venom and it doesn't work either.

cond
*.shflav 0 !=
*.shflav -2 !=
start
50 .vloc store
50 .venval store
1 .strvenom store
*.shang .aimshoot store
-3 .shoot store
stop

cond
*.nrg 30000 >
start
314 rnd .aimdx store
50 .repro store
stop


'Gene 3 I was born!
cond
*.robage 0 =
start
180 .aimdx store
stop


'Gene 4 Moving out

'Gene 5 Almost moved out
cond
*.robage 10 <
start
10 .up store
stop

this is the bot i've been playing with just switching out the poison and venom but doesn't even change basic memory.
Title: Re: poison and venom and possibly aimshoot not working
Post by: spike43884 on April 19, 2015, 06:07:59 AM
on another even simpler bot of mine which doesn't even move, I was using a version of my blind retaliation gene, but whatever value aimshoot had (I was using *.shang X sub .aimshoot store) it would aim right. shang is meant to be 90 degrees to the right (possibly left, I tried 90 and -90 as values in my sub aimshoot) yet it didnt 'appear' atleast to be affecting the aim. Its actually a desperate problem as the bot I created is inevitably even stronger than I thought, because it has virtually 0 energy wastage BUT its useless without its specific aiming. It has to sit there and so its very problematic currently.
Title: Re: poison and venom not working
Post by: Botsareus on April 19, 2015, 07:23:48 PM
Note to self: Spike reported broken memory too.



If you guys find more bugs please post, hopefully by 8 months 75% of the simulator will be dysfunctional. Keep up the good work.  :D
Title: Re: poison and venom not working
Post by: spike43884 on April 20, 2015, 11:30:31 AM
Note to self: Spike reported broken memory too.



If you guys find more bugs please post, hopefully by 8 months 75% of the simulator will be dysfunctional. Keep up the good work.  :D

Lol. Hey botsareus, did you get my message asking if you could run 1 F3 league?
Title: Re: poison and venom not working
Post by: Botsareus on April 20, 2015, 11:33:33 AM
Another note to self: Make sure 4multibot" works.
Title: Re: poison and venom not working
Post by: Botsareus on April 21, 2015, 05:57:06 PM
I will do these tests if I do not have classes or lectures. Otherwise only evolving a zerobot.
Title: Re: poison and venom not working
Post by: spike43884 on April 22, 2015, 11:18:57 AM
I will do these tests if I do not have classes or lectures. Otherwise only evolving a zerobot.
What lectures do you do? :)
Title: Re: poison and venom not working
Post by: Botsareus on April 24, 2015, 04:57:59 PM
Actually, I am just trying to get into a uni and propose a version of Darwinbots as a research project to them. But if I ever do my own lectures it will most likely be on AI controlled biology in areas like long term space missions.
Title: Re: poison and venom not working
Post by: spike43884 on April 25, 2015, 07:19:28 AM
Actually, I am just trying to get into a uni and propose a version of Darwinbots as a research project to them. But if I ever do my own lectures it will most likely be on AI controlled biology in areas like long term space missions.
Space. Ahh I do like space. Have you read about the ESA's TARDIS mission.
Title: Re: poison and venom not working
Post by: Botsareus on May 16, 2015, 11:06:53 AM
I just found a related bug. Waste shooting does not default to a scalar value if shootval is zero.
Title: Re: poison and venom not working
Post by: spike43884 on May 17, 2015, 04:31:48 AM
I just found a related bug. Waste shooting does not default to a scalar value if shootval is zero.
Strange. also DB2 has gotten real quiet..
Title: Re: poison and venom not working
Post by: Botsareus on May 19, 2015, 06:00:41 PM
Spike, it would have helped if you did not assist me in losing my modulator rights. Now getting my mod rights back and running leagues is at the bottom of my list.
Title: Re: poison and venom not working
Post by: spike43884 on May 20, 2015, 12:04:11 PM
Spike, it would have helped if you did not assist me in losing my modulator rights. Now getting my mod rights back and running leagues is at the bottom of my list.
I didn't -assist- you in losing the modular rights. I assisted in another person being able to run the leagues, maybe as a replacement, maybe not as one...
Title: Re: poison and venom not working
Post by: Botsareus on July 05, 2015, 05:29:50 PM
Hey Numsgil. Can you please confirm that venom and poison are broken in the latest version? I can not run code from here. But looking trough the source in notepad I was not seeing anything wrong with it. Thx.
Title: Re: poison and venom not working
Post by: Shadowgod2 on July 06, 2015, 01:27:56 AM
ok i'm really really puzzled now. i went back to make sure it is a bug and i can't get venom to work on any version i try not even the main installer version 2.45.01 or earlier. soo now i don't know what it is. i remember it working at some point but now nothing. i don't know what's going on

here's the bot i'm using to test it all with

start
.shoot .vloc store
-2 .venval store
stop

cond
*.robage 10 mod 0 =
start
-3 .shoot store
11 .strvenom store
10 .shootval store
stop
Title: Re: poison and venom not working
Post by: Numsgil on July 06, 2015, 02:02:24 PM
There are some (very) old versions listed here (http://wiki.darwinbots.com/w/Previous_Versions).  You could try and get a baseline of when it was working.  From that we can probably binary search through the releases to find when it broke.
Title: Re: poison and venom not working
Post by: Botsareus on July 06, 2015, 05:12:13 PM
That is my point as well. I know I specifically tested all defenses when it was version 2.46.XX
All the defenses worked. There is something specific with the way Shadowgods code is designed. Numsgil, there should not be a need for the old binaries at this point bc me and shadow are certain it worked at least in v 2.45.01. Shadow, try storing venom for a while and firing it at a later time. One reason I was pissed off is I do not have access to a computer right now to try myself.
In general you guys try stuff and see if it works. Now I am thinking Shadow got hit with the same virus I did.
Sorry, can not help in any other way at this time. Still waiting for an apartment. Over and out.
Title: Re: poison and venom not working
Post by: Botsareus on July 06, 2015, 05:56:01 PM
Take a look at this code here:

Code: [Select]
Private Sub Upkeep(n As Integer)
  Dim Cost As Single
  Dim ageDelta As Long
  With rob(n)
       
    'EricL 4/12/2006 Growing old is a bitch
    'Age Cost
    ageDelta = .age - CLng(SimOpts.Costs(AGECOSTSTART))
    If ageDelta > 0 And .age > 0 Then
      If SimOpts.Costs(AGECOSTMAKELOG) = 1 Then
        Cost = SimOpts.Costs(AGECOST) * Math.Log(ageDelta)
      ElseIf SimOpts.Costs(AGECOSTMAKELINEAR) = 1 Then
        Cost = SimOpts.Costs(AGECOST) + (ageDelta * SimOpts.Costs(AGECOSTLINEARFRACTION))
      Else
        Cost = SimOpts.Costs(AGECOST)
      End If
      .nrg = .nrg - (Cost * SimOpts.Costs(COSTMULTIPLIER))
    End If
 
    'BODY UPKEEP
    Cost = .body * SimOpts.Costs(BODYUPKEEP) * SimOpts.Costs(COSTMULTIPLIER)
    .nrg = .nrg - Cost
   
    'DNA upkeep cost
    Cost = (.DnaLen - 1) * SimOpts.Costs(DNACYCCOST) * SimOpts.Costs(COSTMULTIPLIER)
    .nrg = .nrg - Cost
   
    'degrade slime
    .Slime = .Slime * 0.98
    If .Slime < 0.5 Then .Slime = 0 ' To keep things sane for integer rounding, etc.
    .mem(821) = CInt(.Slime)
   
    'degrade poison
    .poison = .poison * 0.98
    If .poison < 0.5 Then .poison = 0 'Botsareus 3/15/2013 bug fix for poison so it does not change slime
    .mem(827) = CInt(.poison)
   
  End With
End Sub

This is the only fix I ever done that is poison related.  It was setting slime to zero before, ugliness plenty.
Title: Re: poison and venom not working
Post by: Shadowgod2 on July 07, 2015, 12:57:15 AM
um venom is working again and i swear it wasn't earlier at the start of this topic. i do admit that i did forget about the same species rule here recently due to fatigue with new land we got not too long ago and cleaning it up this weekend, sorry.
i however can't get poison to work still on any version. it shoots and hits but to effect. i'll look into it further tomorrow

the bots i am using:

Code: [Select]
' Alga minimalis
'
' Vegetable
'
' This robot has a single gene,
' necessary for it to reproduce.
' Energy is given to it by the program,
' by checking the "autotroph" box.

cond
  *.nrg
  6000
  >
start
  50
  .repro
  store
  15
  .aimdx
  store
stop

start
1 .strpoison store
1000 .pval store
.aimdx .ploc store
stop
end

modified to shoot -1 shots
Code: [Select]
start
10 .strvenom store
.shoot .vloc store
-2 .venval store
stop

cond
*.robage 10 mod 0
start
-1 .shoot store
100 .shootval store0
stop
end

Botsareus (and anyone else in the same boat, me close behind) i don't blame you for not believing me.
Title: Re: poison and venom not working
Post by: Botsareus on July 10, 2015, 11:02:43 AM


For strpoison I would use something like:

Code: [Select]
*.nrg 500 div .strpoison store
Title: Re: poison and venom not working
Post by: Botsareus on July 10, 2015, 11:09:01 AM
Also, get rid of the shootval completely.
Title: Re: poison and venom not working
Post by: Shadowgod2 on July 13, 2015, 12:43:19 AM
ok this is confusing, firstly some bots don't fire poison after a while when hit, then when they do the poison doesn't take effect for like 90% of the time for a start up size and gets worse as the shooting bot gets bigger or the constant store value decreases from 4. 5+ seems to be reliable for a constant store, start up bot size. i also see no drop in poison when hit.
is this supposed to happen?

earlier i couldn't get it to work even with a 100 constant store.
Title: Re: poison and venom not working
Post by: Botsareus on July 14, 2015, 08:07:36 AM
Poison works of a power calculation. If a shot is too powerful or is fired by a bigger bot then there are more chances to get a energy shot back instead of poison. That is why you need large amount of poison for it to work correctly. As far as the poison not going back down, may be you are creating it and it gets normalized too fast by a multiple of .98 and all you are seeing is a false positive.
Title: Re: poison and venom not working
Post by: spike43884 on July 15, 2015, 12:42:14 PM
false positive.
Why are there so many brilliant words and phrases....Like Confabulation.
Title: Re: poison and venom not working
Post by: Botsareus on July 19, 2015, 06:29:46 PM
I am going to go digging trough the code to see if the value passed trough poison effects the poisons effectiveness...
Title: Re: poison and venom not working
Post by: Botsareus on July 19, 2015, 06:43:07 PM
No, apparently not. I see writing a poison ivy plant in my future that stores 32000 for .pval. And .up for .ploc.
Title: Re: poison and venom not working
Post by: spike43884 on July 20, 2015, 05:13:18 AM
No, apparently not. I see writing a poison ivy plant in my future that stores 32000 for .pval. And .up for .ploc.
Could somehow the value being stored increment above what the poison should set it to, or the poison effect it twice over. If so, then it could be exceeding the maximum value a bots memory can hold.
Title: Re: poison and venom not working
Post by: Botsareus on July 20, 2015, 01:07:35 PM
I was not being too serios. Obviosly there should be some kind of safe gard against moving 32000 .up
Just do not recall what and where. Maybe a little more digging may help.
Title: Re: poison and venom not working
Post by: spike43884 on July 22, 2015, 05:13:16 AM
I was not being too serios. Obviosly there should be some kind of safe gard against moving 32000 .up
Just do not recall what and where. Maybe a little more digging may help.
There *should* be a safeguard yes. If theres a fully functioning one, well thats a totally different topic :)
Title: Re: poison and venom not working
Post by: Botsareus on July 22, 2015, 10:06:37 AM
There is a sufficient safe guard based on max velocity that you can set. The costs for movement are calculated afterword.
Title: Re: poison and venom not working
Post by: Botsareus on June 23, 2016, 05:31:14 PM
I have decided to lower the cost of poison by a factor of 5. Hopefully robots will evolve it more.

edit: That means 0.2 nrg per 1 poison.
Title: Re: poison and venom not working
Post by: Botsareus on June 23, 2016, 05:55:47 PM
I have decided to lower the cost of poison by a factor of 5. Hopefully robots will evolve it more.

I need feedback on this before I mod the wiki. If anyone hates this I probably will not finalize it.

edit:

I am also comparing the power of a venom shot and a poison shot when they hit a robot (1000 body robot, F1 rules) and it looks like venom shots are about 1.5 times less powerful. To correct for this I am experimenting with dividing the power of the poison shot by 1.5.
Title: Re: poison and venom not working
Post by: Botsareus on June 23, 2016, 07:54:43 PM
Let me break down what all this means to help people decide:

At 10 .mkpoison per cycle the same amount of energy will be charged as a robot shooting a -1 shot.
Due to the funky half-life this means (if a robot stores each cycle) it can get a max of 500 poison points after about 250 cycles. (250 * 10 * .2 = 500 energy points total)
A robot shooting this thing will likely get back about 3 poison shots back, at that point the poison will run out and the rest will be nrg shots. There is a good chance the robot will be dead by the time the time the poison shots reach the attacking robot. The amount of poison these three shots impart on the robot is going to last 333 cycles.
Title: Re: poison and venom not working
Post by: Botsareus on June 24, 2016, 02:42:32 PM
Bump
Title: Re: poison and venom not working
Post by: Botsareus on June 24, 2016, 07:14:56 PM
How is this related to Shadows bug? Well I infer he was storing very low poison values because higher values where killing his robots.
Title: Re: poison and venom not working
Post by: Shadowgod2 on June 29, 2016, 01:10:25 AM
well i haven't messed with it in a while but yes high values drained the bots nrg too quickly before they could reach any food/enemy so i did use low values. i think that the energy costs to make poison/venom is a bit over done, how it should still be quite a bit harder to get than to just shoot -1 to maintain a simi realistic sim in that aspect of cores. scientists have done studies on venomous snakes and found that it's like running a marathon to regain there stores of venom but here it nearly kills just to start and use venom/poison :(
Title: Re: poison and venom not working
Post by: Botsareus on July 09, 2016, 05:38:14 PM
Meh, found a little feature description bug.

Refpoison and Refvenom return the amount a robot has, not how many commands there are.

Off topic:

I was considering having viruses not infect own species. But than I realized robots will abuse this as instakill viruses so no.
Title: Re: poison and venom not working
Post by: Botsareus on July 09, 2016, 06:12:14 PM
Also a nifty thing I recently discovered about viruses. A virus has a multiplied effect against slime based on the gene it came from. So a virus that generated from the 6th gene will have 6x the effect on slime. That is kinda cool because a really infected bot will destroy slime faster. However I might increase slime effectiveness against virus if robots seriously start abusing this. Last year I lowered slime effectiveness, I wonder if I lowered it too much.
Title: Re: poison and venom not working
Post by: Botsareus on July 19, 2016, 06:57:11 PM
Back on topic:

Poison is more cheaper now. That increases the time window a robot has in anticipation of an attack. Also it lasts a bit shorter. Venom lasts way shorter so it is kinda balance. Hopefully robots will evolve it more now. Before it was mostly a max hit for poison for one cycle and hope and pray I got lucky. Now it should be maybe 10 cycles.
Title: Re: poison and venom not working
Post by: Botsareus on July 19, 2016, 08:36:08 PM
Btw:

I now actually have a robot from the same evolutionary line as Hulk that uses all defenses.
Title: Re: poison and venom not working
Post by: Shadowgod2 on July 20, 2016, 11:43:22 PM
nice :D i kinda crashed on db for a while but since i crashed on playing on my computer i think i'll start/continue some evo sims, poison and venom are kind the thing i want to see evolve the most and to see what kind they evo into...
Title: Re: poison and venom not working
Post by: Botsareus on August 03, 2016, 10:57:16 AM
Looks like it is fixpos for Hulk. Kinda reminds me of our little completely broken vegy system.
Title: Re: poison and venom not working
Post by: Karts on January 04, 2017, 01:31:55 AM
Looks like it is fixpos for Hulk. Kinda reminds me of the crazy bulk site (https://deadliftdonkey.com/crazy-bulk-review) our little completely broken vegy system.

It seems to be working fine now for me anyway.
Title: Re: poison and venom not working
Post by: Botsareus on January 04, 2017, 05:20:07 PM
Yes, I think me and Shadow sorted this out reasonably well. Thanks!
Title: Re: poison and venom not working
Post by: LawrenceFlores on August 07, 2017, 12:10:35 PM
Looks like it is fixpos for Hulk. Kinda reminds me of the crazy bulk site (https://www.fitnessdonkey.com/legal-steroids/crazy-bulk-review) our little completely broken vegy system.

It seems to be working fine now for me anyway.

Yep, works perfectly for a long time now.