Author Topic: The Shot Values  (Read 3338 times)

Offline rsucoop

  • Bot Destroyer
  • ***
  • Posts: 166
    • View Profile
The Shot Values
« on: February 01, 2008, 10:07:07 PM »
(Ericl, sorry for the long post, but I read it five times already :-D. Seriously though, I might have to break it away from the sets.

To make for more specialized bot creations and better attack/defense mechanisms, I propose that the randomization of the shot spread by 20 degrees be removed, or moded in a way that it can be disabled.

Doing so would mean that more energy could be allocated not to just the power, but the speed of the shot. Currently the speed is controled at 40 (in terms to bot speed), or 4/5ths the distance of a bot's halfway point of vision. Such a speed limits accuract to only a reading of 60 or greater in terms of the eye; I could see the practicality in specializing for more timid and relaxed agressors, but long range shots are too difficult to perform without having to change the mass of the shot to have it travel farther. The changes of the shot speed should not be cheap, calling for a more stealthy and sleak design of bots to perform such a process; one way would be to limit the type of shot it is, relative to the body (I.e. only body points can be spent to change the speed of a shot at a exponential rate). Then such a system of spending can be setup for an increase in speed X 10, at a cost of some body (see set A).

Despite the outcome of the above ideas, a change in the shot spread would make bots truely controlled, and not so jumpy on the attack. If the idea is to emulate adrenalin, and loss of motor control due top stresses on the processing power of the bot while in combat, perhaps a new tier system could be established to enduce such an effect. (see B set). But mostly I believe that the randomization at least have one activator (I.e. 1999 value .conspreadsht). This could again require great amounts of energy to maintain a set randomization factor of 0, but the reward would have to be worth the stress on a bot. Again, nothing is given without taking in nature, despite the end result for either 'things' be it an element or two beings.
Code: [Select]
Set A:
Values shown could be - (neg, chng)       100% positive values (body)
.shotspeed change(delta)                      .body
10                                                        10
20                                                        100
30                                                        1000
40                                                        10000
(under the current structure of the bots value system in 2.43 no faster shot would be possible, but this is for v3)
50                                                        100000
(and so on)
The body cost is set to a log of the change in shot speed divided by 10. So to double the speed and hit a bot twice the effective distance of the shot in one second, almost 10%-90% of the body must be used, and for the the bot to do so it must feed itself, and this takes a lot of energy. Secondly, the bot would have to really build up for the maximum possible distance, (not sure, possibly 2X the normal speed), requiring more of a multi-bot to be able to draw enough power to make such a shot. Any other system would have some flaws, not that this system has no flaws, but a bot could be making predicted shots at a bot 10X the distance of normal in one second, for even less making the simulations much more difficult for programers, although I do believe that the .shotpeed(delta) should be returned to normal only once a a value other than 0 is stored in the shoot location, that way a bot could deliver a shot at very high spots after some intensive gourging. I predict that any multibot succesful enough to do such a shot, and is intended soully for the shot, that most of the veggies in the game would be gone and the remaining enemies would destroy the weakened multibot (game setup taken as defaulted). Secondly, I see this tool as being a last resort for a dieing species, one left and it needs a lot of energy to repopulate.
Code: [Select]

Set B:
.timespentholding               .shotspreadc(hange)           .shotran                .energy
N/A                                   random                              1                         0
0                                      random or X                       0                          0 or X*0=0
1                                      X                                       0                          (X * 10000)^t
2                                      X                                       0                          ((X^t) * 10000)^t
3                                      X                                       0                          ((X^t) * 10000)^t
and so on...
In order to make a change in the shotspread values, it only requires that the shotran be set to zero, otherwise there is only a 50% chance that any change is taken in the aiming-correction of the shot (leaving room for things like, sighting in your shots before hand, as to not waste massive shots right away). When the timeholding goes above 0, any time you set shotran off to the current, it requries whatever change desired (relative to the previous change so 0 +/- newshotspread) to the power of time, so the longer you take on a shot the less you are charged, but the more you play with it over time as it remains locked in, the more it costs to reset/move the change in spread. This means bot A follows bot B and sets it to aim 100% perfectly from eye1 direction, so the initial cost would be zero, but say bot B moves too fast and bot A is too slow to turn, now bot B is in eye2, so it goes to reset and move the aimshot to eye2 direction, and it all happens in 5 cycles. Given that Eye2 and Eye1 are a said distance of 20 arc (20 div (360*60) for a circle) so thats a change of 20 while holding the lock for five seconds, this will cost 9.2592592592592592592592592592593e-4, extremely cheap for such a move even after bring to an integer of 9^2 = 81 * radius of the bot. If Bot b were to have somehow reversed the direction of Bot A and bot A new it through some reference checking and specialized memory genes, the bot could perform a 360 turn equal to the radius of the bot. However, this system assumes that all changes are based on the arc of the bot, specialization for smaller bots would make for faster and cheaper shotspread change. Secondly, the shotspreadchange would have to record the distance inherent in changing the aim from the aimshot to something different; this would mean that the cost of holding your aim steady would grow very quickly to a bafooon bot that just ran around with the shotran set to 0, and encounters its first enemy bot after 50 cycles, kaboom. However the same bafoon would have been just fine if it doesn't change the aimshot from the aim of itself (I.e. eye5 defaulted position).

Set C (adrenalin):

Perhaps the easiest method is to first decide if a bot is panicked; has it recieved any loss of energy or body without a value stored in repro or mrepro, is their any value stored in the shoot location, has it been hit? I would suggest going with all of them as a requirement of some sort: nrg/body and repro/mrepro or shoot or/and hit. If all this is returned true, then the effect of the randomization of the shot should go up in a logorythmic rate to the overal value of multiplying and adding the values as seen above to the time the effect has been active: log time(pain * repro + shoot */+ hit). The more affective the agressor on the prey, the less effective the prey is at defending and visa-verca.

Both sets should be effective for use in the game, and would require a greater turnout in energy released. This could be easily done by creating a new energy return array that no longer used the defaulted shot speed, and gave more for shots done at some different end of the slow/fast speed shots. Any objections?
« Last Edit: February 01, 2008, 10:26:53 PM by rsucoop »

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
The Shot Values
« Reply #1 on: February 02, 2008, 11:37:28 AM »
Wow.  

Okay, so I was a little off.  From looking at the code, the current shot spread (for voluntary shots) adds an error factor of +/- 20 (in DB aiming units) to the direction of a shot which actually ends up being only about +/- 5.7 degrees for a total maximum shot spread of about 11.4 degrees.

Personally, I don't see a strong reason to charge nrg for modifying the shot spread or base it on body size or have a timer or similar as having the system add a spread to one's shot can be seen as either an advantage (a traditional shot bot gets an automatic shot gun effect from the simulator without having to code for it) or a disadvantage (its added error for sniper bots with advanced targetting).  Animal min. benefits from the current shot spread for example since it's vision is not accurate enough to center on targets.   Without the spread, there are cases where it will fixate on a stationary target and forever shoot past it.

So, I'd be happy just adding a new .shotspread sysvar that worked the same way the .eyeNwidth sysvars do.  A value of 0 would exhibit the exact behaviour as today, giving shots a +/- 20 shot spread.  Positive values would increase the spread incrementally beyond 20.  Negative values would decrease the spread.  A value of -20 (or any negative multiple of 648 or any positive multiple of 608) would provide no spread.  There would be no nrg charge for setting this sysvar other than that potentially associated with the store to mem itself.

Increasing shot speed on the otherhand, I think we should absolutely charge for (if placed under DNA control) and I would be happy to see maximum shot speed be a function of body or similar.





Many beers....

Offline rsucoop

  • Bot Destroyer
  • ***
  • Posts: 166
    • View Profile
The Shot Values
« Reply #2 on: February 02, 2008, 12:14:09 PM »
Quote from: EricL
Wow.  

Okay, so I was a little off.  From looking at the code, the current shot spread (for voluntary shots) adds an error factor of +/- 20 (in DB aiming units) to the direction of a shot which actually ends up being only about +/- 5.7 degrees for a total maximum shot spread of about 11.4 degrees.

Personally, I don't see a strong reason to charge nrg for modifying the shot spread or base it on body size or have a timer or similar as having the system add a spread to one's shot can be seen as either an advantage (a traditional shot bot gets an automatic shot gun effect from the simulator without having to code for it) or a disadvantage (its added error for sniper bots with advanced targetting).  Animal min. benefits from the current shot spread for example since it's vision is not accurate enough to center on targets.   Without the spread, there are cases where it will fixate on a stationary target and forever shoot past it.

So, I'd be happy just adding a new .shotspread sysvar that worked the same way the .eyeNwidth sysvars do.  A value of 0 would exhibit the exact behaviour as today, giving shots a +/- 20 shot spread.  Positive values would increase the spread incrementally beyond 20.  Negative values would decrease the spread.  A value of -20 (or any negative multiple of 648 or any positive multiple of 608) would provide no spread.  There would be no nrg charge for setting this sysvar other than that potentially associated with the store to mem itself.

Increasing shot speed on the otherhand, I think we should absolutely charge for (if placed under DNA control) and I would be happy to see maximum shot speed be a function of body or similar.
Glad it didnt over work you on it  

I like that idead of being able to modify the shotspread, but when I thought of it I thought of real life; what's it take to actually sight in a gun per say? Well, a first shot to see how accurate the bot thinks it is, whichn means checking the spread only once a shot has been fired or something like that. Also, I assumed that the xpos and ypos came from the center of a bot, maybe they should, but it would be nice to know how those two references work in the simulation. Furthermore, my shotpread costs were derived from the radius, it should use pi instead but that's an irrational number and would have a huge decimal place to be accurate.

I deffinitely agree with your ideas on the shotpread, but there should be a cost of at least the store command or something; the idea being that in order to control this for a bot, a lot of energy most be put into the mechanics of the bot which handle the weapon system. Similair to a blow fish that puffs up when you touch it; very effective but not cheap either.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
The Shot Values
« Reply #3 on: February 02, 2008, 12:41:43 PM »
I'll agree with Eric as far as what costs need to be.  One small caveat, though: I don't think you need to necessarily have 0 shot spread represent the default behavior.  Instead, have the shot spread sysvar not get reset (not the new idea) and just set it to 20 when a bot is born (the new idea).

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
The Shot Values
« Reply #4 on: February 02, 2008, 12:50:29 PM »
Not to stifle your enthusiasm, but I think you're overthinking this and designing under the wrong constraints.  DB is not real life.  Bots do not own guns nor do the physics of sighting them really apply.  If we really wanted to draw a strong parallel to the real world (something I typically argue against) then it would be to single celled life, not macro lifeforms touting 30-06's.

It's more important in my mind to keep things simple and evolvable.

Quote from: Numsgil
I'll agree with Eric as far as what costs need to be.  One small caveat, though: I don't think you need to necessarily have 0 shot spread represent the default behavior.  Instead, have the shot spread sysvar not get reset (not the new idea) and just set it to 20 when a bot is born (the new idea).
Ah....  beautiful.  Wish I'd done that with the .eyeblah sysvars...
Many beers....

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
The Shot Values
« Reply #5 on: February 02, 2008, 12:54:06 PM »
I have my moments

Offline rsucoop

  • Bot Destroyer
  • ***
  • Posts: 166
    • View Profile
The Shot Values
« Reply #6 on: February 02, 2008, 01:42:28 PM »
Quote from: EricL
Not to stifle your enthusiasm, but I think you're overthinking this and designing under the wrong constraints.  DB is not real life.  Bots do not own guns nor do the physics of sighting them really apply.  If we really wanted to draw a strong parallel to the real world (something I typically argue against) then it would be to single celled life, not macro lifeforms touting 30-06's.

It's more important in my mind to keep things simple and evolvable.

Quote from: Numsgil
I'll agree with Eric as far as what costs need to be.  One small caveat, though: I don't think you need to necessarily have 0 shot spread represent the default behavior.  Instead, have the shot spread sysvar not get reset (not the new idea) and just set it to 20 when a bot is born (the new idea).
Ah....  beautiful.  Wish I'd done that with the .eyeblah sysvars...


Oh, ok. I tend to overthink alot  

All sounds good.

Offline abyaly

  • Bot Destroyer
  • ***
  • Posts: 363
    • View Profile
The Shot Values
« Reply #7 on: March 18, 2008, 09:19:59 PM »
By any chance, is .shotspread on the list of things to be added? If so, that would make me very happy
Lancre operated on the feudal system, which was to say, everyone feuded all
the time and handed on the fight to their descendants.
        -- (Terry Pratchett, Carpe Jugulum)