Page 1 of 1
Posted: Fri Jul 02, 2010 8:24 am
The API documentation names it, but it does not exists.
This is a major drawback, because shots tell you something about things you cant see, like if your are seen by someone else.
And I bet there are people who would like to model a bot from their experience as a player, but without knowledge about shots, its only half the fun.
I think it might be possible to simulate the games behavior regarding shots inside a bot (if you can ask for state and state timer of enemy units, havent checked this yet). Maybe not 100% accurate, but good enough for most purposes.
But it would have to be done in full information mode, why care about shots when everything is visible?
What do you think?
Posted: Fri Jul 02, 2010 6:45 pm
Yes, it would be good to be able to access the shots.
A partial solution is the Hit event - you can at least tell that your units are getting shot. I don't know any way to access the data behind each shot though - shots don't seem to appear in the data returned by GetAllUnitData().
Posted: Mon Jul 05, 2010 10:36 pm
I've been thinking about this... I think it is possible to 'triangulate' silo locations using the hit event. Imagine a fighter flying along and a silo shooting at it. The silo has a certain shot frequency and the hit event tells you how often a shot impacts the fighter. But... the hit frequency on the fighter depends on the relative motion of the fighter and the silo. For any given hit frequency there are two possible vectors (one at an angle to the left, one to the right) that the source of the shots could be on.
It's just like the Doppler effect for a passing ambulance - the motion of the fighter changes the frequency of the shot impacts (the shots are equivalent to the peaks of the sounds waves... except that in this example the ambulance is parked and you are driving past it).
Perhaps one algorithm would be that when a fighter detects silo shot frequency hits it turns until the frequency is maximised at a known frequency. Then the fighter would know that it is 'flying down the line' of shots and the silo lies on extension of its movement vector. Do this from two different angles and X marks the spot...
Lots of practical difficulties in this of course: in many cases you'll be getting hits from multiple silos, a fighter might not last more than a couple of hits, and silos often switch targets away from fighters. But it is possible in principle.
Of course if this becomes a standard method the silos could start spoofing their targets and rhythms to throw the fighters frequency detection off
[Edit] Hmmm. Do friendly nukes give hit events? If so you could in principle map the enemy silo location from the first half of the barrage, and take out the silos with the second...
Posted: Mon Jul 05, 2010 10:53 pm
But silo AA fire doesnt travel in straight lines. I assume dopler effect works because light/sounds does travel in straight lines.
Silo fire tends to bend towards the incoming planes. Since we dont know how this bending occurs, it would introduce an unkown variable into the prediction formula. It's almost like the planes and nukes have different amounts of gravity into which the silo fire bends towards. When the fire gets really close to its target it even tends to fall into orbit around it, circling around it a few times before it hits.
Your bot sounds awesome anyway. When will it be finished?
Posted: Mon Jul 05, 2010 11:01 pm
You're right - but that's not necessarily a deal-breaker, and of course it does if you are flying right at it.
Posted: Mon Jul 05, 2010 11:29 pm
I dont't know if it can be implemented in the bot, but silos can be triangulated by a human. All you have to do to escape non-straight-aa-fire is to take into the consideration only first part of shot travel path (~30-60%), they are not affected by that problem. "Leaning" of shots towards the target only occurs when the shot comes close to it.
Posted: Tue Jul 06, 2010 6:33 am
Nice Idea. Would be funny if it works so well, BOTs would send fighters at nukes to prevent silo detection.
Posted: Tue Jul 06, 2010 1:52 pm
rus|Mike wrote:I dont't know if it can be implemented in the bot, but silos can be triangulated by a human. All you have to do to escape non-straight-aa-fire is to take into the consideration only first part of shot travel path (~30-60%), they are not affected by that problem. "Leaning" of shots towards the target only occurs when the shot comes close to it.
Uhm, how can you do that? SInce GetShots() isn't available, your bot cannot see shots until they hit a unit. THey's the only information you have about shots!
Posted: Tue Jul 06, 2010 10:23 pm
As I said, I was only talking about how it is possible to triangulate in-game, I have no idea about programming bots.
Posted: Fri Jul 09, 2010 1:24 am
Trickser - come to think of it you could just tell silos to fire at different nukes alternately...
MVPE - Thanks. Finished? Hmmm, I expect Grace will be beating the CPU in 2-3 months, and might give an intermediate player a run for their money by the end of the year.
Posted: Fri Jul 09, 2010 2:03 am
Don't change the silo's targeting; when you do that, you lose a gunshot (the silo won't fire the next round of AA).
Posted: Fri Jul 09, 2010 5:10 am
Additionally they will pick the closest nuke/bomber/fighter for the next shot. There is no way to make a silo accept a manual order.
EDIT: Except all stuff in range is from the same alliance you are in.
Posted: Mon Jul 19, 2010 12:55 am
Well the original API is in C++, can't someone just code the getshots? Robin never finished it but that doesn't mean someone can't finish it for him.