Bots and Simulations > Tips and Tricks
Trajectory prediction and steering control
rsucoop:
--- Quote from: Numsgil ---it would actually be *.refveldx .dx store, refvel always measures relative speed. It's the method used in Animal Minimalis.
That should also handle issues of trying to shoot a shot to go where the bot will be instead of where it currently is. The downside is that you have to actually match their vector. Which means expending energy to alter your course.
If you get in to not wanting to modify your vector, but still fire a shot that will intersect another bot's project path, you get in to a huge mess of crap. The problem is that you'd really need to know the distance to another bot, and the only way to determine that is to decode the values returned from the eyes.
--- End quote ---
I dont think acurately timed shots based on distanced can be derived in this simulation, because decimals are not supported. In order to properly calculate a four dimensional projected path for the bot, you would have to support floating decimal points and imaginary numbers. The easier method is to just use the distance point formula you learn in geometry. sqr((x2 - x1) ^2 + (y2 - y1)^2), but again this will be unsuported in the new version and won't return acurate results in the current version. One cool thing to do would to simply predict which direction the bot is headed and simply use trigonometry to calculate what angle you must shoot at. I'll work on some proofs for this and let everyone know the simple geometric method which may be better in comparision to the algebraic, since we are mostly dealing with spatial patterns to begin with: I.e. the eye returns being 50 = 2 bots, or pieces of arcs within the bot, its all geometric and have simple relations to any angle associated with them. Simply put,
I believe that a bot only needs to know the spatial distance between the bots, the radius of the bot, the amount of energy that can be expended, the max distance for a shot at that distance (important for stealthy kills), refvel and ones own vel, and the speed of the shots, and refaim. The distances and the speeds would all be relative to the radius of the bot, therefore no true distance need to be calculated, only the number of bots between and the ratio of the bots size to the shots change in distance in one second, something easily calculated by hand and hard coded for ease of use. The amount time necessary would be equal to the number of bots between them divided by the speed of the shot. The amount of energy necessary could come from either the time required, or the number of bots between. The projected future time between would be equal to the following reductions
(#botsbetween / .shotspeed) * (.refxpos .refypos angle ... to be continued I must rest
googlyeyesultra:
I wonder what kind of targeting systems we could write. . .
Obviously, what most bots use now involves simply aiming at the target and firing. Then, there's linear aiming that tries to predict where the target will be when the shot arives assuming a constant speed/direction. Then, there's rotational aiming, which assumes a constant rate of rotation as well (check *.refaim over two cycles). Then, I suppose if we had arrays and trig we could set up pattern matching, which would record a number of previously encountered movement patterns, try to match the target to one of those patterns, and then use the next step in the pattern to decide the shot position.
All conjecture.
rsucoop:
--- Quote from: googlyeyesultra ---I wonder what kind of targeting systems we could write. . .
Obviously, what most bots use now involves simply aiming at the target and firing. Then, there's linear aiming that tries to predict where the target will be when the shot arives assuming a constant speed/direction. Then, there's rotational aiming, which assumes a constant rate of rotation as well (check *.refaim over two cycles). Then, I suppose if we had arrays and trig we could set up pattern matching, which would record a number of previously encountered movement patterns, try to match the target to one of those patterns, and then use the next step in the pattern to decide the shot position.
All conjecture.
--- End quote ---
I say use a shotgun affect, you would ahve a 1/3 chance of hiting your target with either shot and 100% of hitting the target. Problem is the amount of energy needed for such precision and distance. Three shots, one centered, one left of bot, one right of bot with a small spread about 1 botditance * refvel * refaim * shottime - (vel), assuming you are facing the saim directions, other wise it would be: refvel * refaim * shottime - (vel * aim), obviously the spread is more like bird shot if the distance is expected to remain the same (I.e you are chasing after the bot), and the shot would b ecome more like buck shot when the incoming bot is expected to be closer, for more effective shots.
Numsgil:
This gets me thinking: currently shots have a very slight random angle added that give them a nozzle spray like effect. This would be a great thing to open up to DNA control. Have shots be able to shoot exactly accurate shots or spread out the control and get a vague field of shots.
rsucoop:
--- Quote from: Numsgil ---This gets me thinking: currently shots have a very slight random angle added that give them a nozzle spray like effect. This would be a great thing to open up to DNA control. Have shots be able to shoot exactly accurate shots or spread out the control and get a vague field of shots.
--- End quote ---
That would be awesome. Then the bots would niot be so similair to 007 stylzed hunting.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version