-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correction of Harm detection table copy #75
base: develop
Are you sure you want to change the base?
Correction of Harm detection table copy #75
Conversation
merge to master
updated version number
Good Catch, seems I tripped over OO basics.... I tested this functionality with this unit test: The mock data in the test creates a new array for each check, therefore the test passes.....
In regard to not picking up in the same loop: Another Idea could be to get rid of the NOT_HARM state and just leave the contact as unknown, if the harm detection of a radar failes. |
Regarding the second point I only mentioned it as a sidenote because it's what led me down this rabbit hole : I was trying and failing to see Skynet try the 80% identification probability. But this one is not a clear coding anomaly as was the first point, so I don't feel very competent to propose an adequate improvement. Intuitively I feel your first idea is great. |
I had the same thought, take into account all radars that have detected the HARM in the next loop, event the ones that previously failed and calculate a combined probability for a new detection chance. This would only happen if a new radar picks up a HARM. Anyway best this would have to be tested in a few real life game scenarios, to test playability. Thanks for you thoughts on this topic! |
Fixed the code and updated unit test, what still needs to be done is: |
This has been addressed in [3.2.0] (https://github.com/walder/Skynet-IADS/releases/tag/3.2.0), and implemented a bit differently that what we were using for a year in our branch. |
Harm identification is currently only done for the first radar that detects the missile. Later detections by other radars will not try to identify again.
This is because when Skynet evaluates the new radars that should try for identification of the contact, it will compare (in function getNewRadarsThatHaveDetectedContact) :
And try the identification only for the ones that are in [1] but not in [2].
Then, it will point list [2] to list [1] (to not retry the evaluation for these radars later).
But then, since list [2] points list [1] , each time a radar is added to list [1], it will in effect also be in list [2]. And from now on, there will never be any difference between [1] and [2], and so never any radar with which to try the HARM identification.
Proposed correction is to copy the content of [1] to [2] instead of just pointing to it.
As a sidenote, it seems that the augmented probability when multiple radars are tracking the contact is almost never triggered because it would need the multiple radars to pick up the contact in the same Skynet loop, and this seldom happens in my experience.