Darwinbots Forum

Bots and Simulations => Bot Tavern => Topic started by: abyaly on March 14, 2008, 02:11:21 AM

Title: Quick question
Post by: abyaly on March 14, 2008, 02:11:21 AM
A few things seem to have changed since the last version I saw. It seems bots can now kill themselves by body feeding. It seems tie feeding works. It seems that bots with very low body have completely useless -1 shots now (in addition to completely useless body shots). Is this all accurate?

Title: Quick question
Post by: EricL on March 14, 2008, 10:17:05 AM
What two versions are you referring to?   It's theoretically possible body feeding can cause nrg loss and lead to death, depending upon shot/tie costs.  Happy to look into it, but you'll have to post a sim for me to dive into it in detail.   Same with the relationship between feeding shots and body.   Tie feeding should work and to my knowledge has worked for a long while.

The specific list of changes from version to version is documented here (http://www.darwinbots.com/Forum/index.php?showtopic=2160).
Title: Quick question
Post by: abyaly on March 14, 2008, 11:08:21 AM
I last used m, and I looked through your release notes for the changes since then. I noticed the body change; I don't know which change could have altered energy shot behavior. Tie feeding didnt work in m, although sharefeeding did. It works now, though.

When I said body feeding, I meant
*.body .fdbody store
Can be fatal if repeated often enough.

Also, it looks like eye vision distance now depends on width. It isn't proportional. Is the formula available somewhere?

*edit - Oh! As long as I'm asking for formulas, the relationship between shot damage and size is pretty big question for me
Title: Quick question
Post by: EricL on March 14, 2008, 11:34:57 AM
Quote from: abyaly
When I said body feeding, I meant
*.body .fdbody store
Can be fatal if repeated often enough.
Ah.  From the code, it looks like there arn't any safeguards when trying to feed from body when that would take your body negative.   I haven't been in this specific code, so I don't think this specific thing is new but I could have closed an nrg leak down the road that now kills bots whose body goes negative instead of properly plugging it upstream here and preventing it from going negative in the first place.  Will change for next drop.  Nice find.

Quote from: abyaly
Also, it looks like eye vision distance now depends on width. It isn't proportional. Is the formula available somewhere?
There's a detailed topic on this in the suggestions forum (http://www.darwinbots.com/Forum/index.php?showtopic=2443).  The formula is there.  

Quote from: abyaly
*edit - Oh! As long as I'm asking for formulas, the relationship between shot damage and size is pretty big question for me

Me too!  This code predates me and is a total mess.  Shot damage depends on a bunch of things including where the shot is in it's range.    I think I tried to figure it all out once and posted on it but I can't seem to find that topic at the moment.
Title: Quick question
Post by: Numsgil on March 14, 2008, 12:57:35 PM
Quote from: EricL
Me too!  This code predates me and is a total mess.  Shot damage depends on a bunch of things including where the shot is in it's range.    I think I tried to figure it all out once and posted on it but I can't seem to find that topic at the moment.

You have to be especially careful with that code, because variables tend to get "recycled".  Shotnrg might refer to something totally different than you think it should.
Title: Quick question
Post by: abyaly on March 14, 2008, 05:36:00 PM
What about shot range in relation to body?
Title: Quick question
Post by: abyaly on March 14, 2008, 07:57:56 PM
After a little testing' I've deduced that -1 shots are completely useless when fired by bots with little to no body. On the chance that this is not intended behavior, I'm attaching a sim and and bot DNA.

RIP
Here lies Etch. Mauled by size calibration.  

RIP
Here lies Aura. Disemboweled by eye revamping.  

Let's take this moment to be impressed by how version resilient excalibur is.
Title: Quick question
Post by: Numsgil on March 14, 2008, 09:30:53 PM
Smaller bots should use ties, and larger bots should use shots.  Or at least, that's the general idea as far as strengths and costs are concerned.  The idea being that smaller bots are hard to hit with shots, including returned nrg shots.  For larger bots, not only is their returned nrg easier to get, but they're stronger, making ties comparatively less useful.
Title: Quick question
Post by: abyaly on March 15, 2008, 01:25:54 AM
Quote from: Numsgil
Smaller bots should use ties, and larger bots should use shots.  Or at least, that's the general idea as far as strengths and costs are concerned.  The idea being that smaller bots are hard to hit with shots, including returned nrg shots.  For larger bots, not only is their returned nrg easier to get, but they're stronger, making ties comparatively less useful.
I think that was the point of -6 shots. -1 shots used to be completely independent of body. I always considered that the main reason for having two flavors of shots. Also, my experiments suggest that tie feeding rate is capped by one tenth of body.
At this rate, the only weapons still available to small bots are venom, viruses, and info shots. Assuming those dont scale with size, anyway; I'm suspiscious of venom.
Title: Quick question
Post by: Moonfisher on March 18, 2008, 08:58:34 AM
I think venom is also scaled... so it only leaves info shots and ties (And ofcourse viruses).
But ties and info shots should be enough to handle anything I've seen so far. Being small is still a big advantage, and it also allows for greater numbers which is a very big advantage, should probably nerf the eyes on small bots or something like that if you want to balance it out. TieFighters stays small and has an attack that uses ties only to kill oponents, and it works against any oponent I've tryed it on, but only if they're not moving too fast, which is why it also acts a bit like pacifist once below a certain amount of nrg to give people shell and slow them down.

And Excalibur is my favorite bot to test against... it's stable and simple and usualy performs well. It was also one of the bots with the best defence against pacifist (Just pushing a value into .up through the tie to bring enemies closer), multiply did better though, because it was focusing on -6 shots, and the thing they both had in comon was killing enemies from a distance which is why they never got within venom range of the pacifist. This is also why I saw it as a chalenge to kill Excalibur only using ties... and TieFighters manages that, but it uses info shots and venom along with it's tie when killing alge, but onyl on alge though (This can also be a problem if facing oponents like pacifist which makes shell on the alge to protect them and confuse enemyes)
Title: Quick question
Post by: Numsgil on March 18, 2008, 05:59:35 PM
It might be that small bots are too advantaged in the current version.  Could one of you master bot programmers try and make a huge, fat bot and see if it can win against the newer, aggressive small bots?  If not, then we might want to do some tweaking.
Title: Quick question
Post by: abyaly on March 18, 2008, 07:08:10 PM
Well, I think small bots will be significantly less fearsome if customizable shot spread is introduced. Also, I think small bots always had a huge advantage that just wasn't being exploited yet.

In a slightly related note, how is shot range calculated in relation to body? This seems like rather important info, but I can't seem to find it.
Title: Quick question
Post by: Numsgil on March 19, 2008, 02:52:29 AM
IIRC it's logarithmic with body.
Title: Quick question
Post by: abyaly on March 19, 2008, 11:04:31 AM
Do you have something more specific?
I guess I could test some values and try to match it, but that seems like wasted effort if someone here knows the answer.
Title: Quick question
Post by: EricL on March 19, 2008, 11:54:20 AM
From a quick look at the code, -1 and -6 shot range appears not to depend on the body of the shooter at all.
Title: Quick question
Post by: abyaly on March 19, 2008, 12:04:25 PM
Quote from: EricL
From a quick look at the code, -1 and -6 shot range appears not to depend on the body of the shooter at all.
Err..  what?
If not body, then it depends on something very closely correlated.
Title: Quick question
Post by: EricL on March 19, 2008, 12:19:32 PM
The code is a total mess and super hard to read.  

Wait, here we go.  Looks like it depends on .vbody, not body, which for single bots is the same thing.

Looks like a shot's range (no .shootval specified) is

(ln(vbody) * 60 + 41) /40

So, shots from a small bot with body of 100 will last about 8 cycles.

A large bot with body of 32000 will last about 16 cycles.
Title: Quick question
Post by: abyaly on March 19, 2008, 01:01:01 PM
Thanks, Eric.

PS - what is vbody?
Title: Quick question
Post by: EricL on March 19, 2008, 01:14:50 PM
It looks like it's a half-finished multi-bot feature - the 'virtual body' of a multibot.   The code calculates it as the sum of the bodies of all the directly connected bots if a bot is a multi-bot and stores it on that bot's structure internally (but curiously, it does not do so transitivly).  The only place it's referenced in the code is for shot range (which is why I was confused before) but the code to provide multibot's greater shooting range based on this appears to be incomplete and ineffective.  I do not beleive multi-bots gain a shot range advantage currently.   .vbody is internal and not reflected out as a sysvar (values could exceed 32000).  My guess is that some previous coder wanted to give multibots advantage proportional to thier combined body and this was a start.
Title: Quick question
Post by: Numsgil on March 19, 2008, 11:01:12 PM
Multibots used to have a whole host of extras that were enabled with .vbody.  Longer range, stronger shots, etc. etc.  After Helios demonstrated that a MB is strong enough on its own, I went through and unplugged .vbody from most of those features.

Those shot routines always have been a huge mess.  The problem is that it's so gnarly I was always afraid to seriously revamp it in case I screwed something up subtley.
Title: Quick question
Post by: EricL on March 20, 2008, 10:06:29 AM
Quote from: Numsgil
Those shot routines always have been a huge mess.  The problem is that it's so gnarly I was always afraid to seriously revamp it in case I screwed something up subtley.
This is exactly why I haven't opened them up.  I'd end up re-writing them and don't have the time presently.   I know I'm going to have to do it at some point, but there's other stuff higher on the list.
Title: Quick question
Post by: abyaly on March 20, 2008, 10:27:57 AM
I was playing around with robots with varying amount ofr body to see how much damage -6 shots do and something interesting happened.

If I make one of the bots with 1000 body fire a shot, it will reliably do 40.8 damage to the opponent's body (point blank).

I wanted to get several more values and try to find a formula, so I got a bot with 32000 body and manually reproduced it to create bots with 16000, 8000, 4000 body and down. Here's where it got interesting. When I got down to testing the one with 1000 body, it did 102 damage (point blank). Every time I've done this, a bot with 1000 body from this method did 102 damage. A bot with 1000 body that started with it did 40.8 damage.

So if you're worried about breaking things on accident, rest assured that it's already broken.
Title: Quick question
Post by: Numsgil on March 20, 2008, 08:52:49 PM
I think it's a piecewise function.  0-1000 is linear, or something like it.  1000-32000 is logarithmic.  If the 1000-32000 code got out of sync with 0-1000, that would explain what you saw.
Title: Quick question
Post by: abyaly on March 20, 2008, 09:33:44 PM
No. 1k to 32k is linear.
0 to 1k is also linear.


*linear being aphine
Title: Quick question
Post by: Numsgil on March 20, 2008, 10:11:59 PM
That might be the problem then.  I'm pretty sure I designed it to be logarithmic after 1000 body.