It's 50 nested ifs, isn't it.
It's 50 nested ifs, isn't it.
There's a tendency to think that everything that isn't completely ab initio like machine learning is bad or inelegant - I often fall for this trap myself, but to just get the job done you can get a very long way with "dumb" algorithms and a practically infinite budget.
(Is a neural network really different from a very large cascade of nonlinear filter elements?)
It's different in theory, but not by much practically. Reverse engineering the former is a fool's errand, but so would be a sufficiently complex version of the latter.
In terms of Kahneman's "Thinking Fast and Slow," ML, at least in its current stage, is like the fast thinking system. It's essential but is exponentially more valuable when combined with the slow system, which is still elusive in AI practice.
Part of it is that predictability is a desirable feature in these systems, but also that problems like the one described in the article you don't really need things like ML. The majority of control problems like this are surprisingly straightforward. They might be complex, in the sense of having a lot of variables, but the physics involved is well understood and can be modelled using traditional techniques.
The progress of self-driving cars is a good example of this. I can remember seeing expeimental self driving cars many years ago, but always going round mostly empty test tracks. Driving a car isn't that difficult for a computer system, what's hard is driving in highly complex urban environments with many other cars around that you need to predict.
Planes, in contrast, have a rather simple environment. The number of objects they have to avoid is massively lower, and their freedom of movement is higher, with established rules for how to behave, there are no traffic signs to interpret. This means that all you are really doing is object detection with radar, and collision avoidance.
In addition, modern combat planes are effectively flown by a computer all the time anyway, with the pilot providing the instructions. A number of fighter planes, especially the most modern, are essentially unflyable without computers due to their aerodynamics. Most are inherently unstable around at least one axis, which makes them more manouverable, but means they will not fly stably in the way a 747 will.
Mind you, I'm talking basic level 1 transformation of raw data streams to human-intelligible images. Once you get into automated object recognition, that's when we start to use machine learning, but the algorithms upstream of that are still plenty smart.
Once you get it right (& get a lock) it works every time, instead of occasionally deciding you are in Nome.
If you're going to make this statement, you need some skin in the game by putting your GH in your bio.
I don't have the balls to boast about my code so there is no GitHub link in mine :). There wouldn't be much to see anyway.
"Old", reliable tech is prevalent there, too.
Sqlite in missiles is a good example.
I'm guessing pointing a missile to the right direction has more to do with fast feedback loops and less about training neural networks.
Laser codes on A2G missiles are a similar thing that interests me.
> It's 50 nested ifs, isn't it.
If that's the case, I don't see an issue if they're spread out among a reasonable number of functions.
I wouldn't want some sexy ML system that will sometime go off the rails because the clouds are in the wrong place to be within 100 feet of an aircraft control system.
which can be complex ... algorithm, can't it?
But it does sound a lot less glamorous, doesn't it?
for me? if it works, then it's great - especially here, where it saved people's life & expensive af aircraft
Or IOW, why do you think the static analyser flagged it in the first place?
You could perhaps have only two code paths: the 50 ifs are true and something happens, or any one of the ifs are false and something doesn’t happen... although that could be written as a single if statement with “and”s.
The 2^50 case would be more code than we can store (unless using techniques that reduce the complexity i.e. not 2^50).
I anything I'd put more trust in "We have a very simple collision avoidance system, you could probably write it yourself."
But I don’t fly fighters so I’m just guessing. Collision avoidance with other planes In a dogfight might be a lot more complex too.
Next is getting the aircraft into a wings-level condition, no matter what direction it's pointing. For fighters, extreme attitudes are normal. Auto-GCAS will make violent maneuvers to do this. "At that instant, the Auto-GCAS commands some of the most aggressive, eye-watering maneuvers this ex-USAF flight test engineer and civil pilot has ever experienced. If inverted (bank angle greater than 90 deg.) and somewhat nose-down, a negative 1g push throws the pilot "up" into his shoulder straps and lap belt to get the aircraft's nose headed skyward. Immediately, a 180-deg./sec. roll is commanded, bringing the aircraft to wings-level, right-side-up."
Only then can the system command a climb: "Somewhere after passing the 90-deg.-bank point, a 5g pull-up is initiated at an approximately 4g/sec. rate. The system commands a maximum angle-of-attack recovery, if flight conditions will not sustain a 5g pull-up."
Pascal uses := for assignments, if I remember correctly?
if pilot.sleeping = true then alarm.playing := true;
// This will check if the property "sleeping" of pilot is true and will then set the property "playing" of alarm to true as well.
You could also do a "while" or "repeat .. until" there which would probably better to stop the alarm if the pilot wakes up again (... then alarm.playing := false).It could totally work this way if you programmed a simple flight simulator with Delphi, even today.
BTW, one exception to := in assignments are initialized variables inside a var section:
var
announcement: string = 'Wake up!';Of course there is FreePascal and Lazarus and all that if you really want to play with Pascal without touching Delphi. Both are neat, even though Delphi is also now available as a free community edition.
What I'm saying is: Go forth and write more `:=`
The art of programming is combining simple things to consisstently produce desired results during general usage.