Showing posts with label algorithms. Show all posts
Showing posts with label algorithms. Show all posts

Monday, July 11, 2016

Fuzzy Logic Air Combat

There are a lot of news on the Artificial Intelligence front today. One which peaked my interest is actually a local story. A UC grad student built an "intelligent foe" for pilots to fight and train against. Nick Ernest worked with the Air Force to create Alpha, an artificial intelligence system that controls the flights of military drones in realistic combat simulations. Gene Lee, a retired U.S. Air Force colonel with decades of experience as a fighter pilot and aerial combat instructor, fought against this foe and was shot down EVERY TIME.

Alpha approaches modern air combat situations the way a human would. It analyzes data from the field and decides what moves to make. It uses a fuzzy-logic tree to make those decisions. A fuzzy-logic tree is a set of IF-THEN statements with one or more inputs and an output. 

How Does Fuzzy Logic Work?

Conventional logic that a computer can understand takes precise input and produces a definite output as TRUE or FALSE.  Fuzzy logic works on the levels of possibilities of input to achieve the definite output.

Fuzzy logic is made up of four components:

The Fuzzification Module which splits input signals into one of five values: LP (x is a large positive number), MP (x is a medium large positive number), S (x is a small number), MN (x is a medium large negative number), LN (x is a large negative number).
The Knowledge Base which is the large IF-THEN database put together by experts in the subject.
The Inference Engine which simulates human thinking by making fuzzy inferences of the IF-THEN rules.
The Defuzzification Module which transforms the fuzzy set from the Inference Engine and returns a crisp result.

For example, let's consider an Artificially Intelligent air conditioner. The Fuzzification Module contains the various temperature values: very cold, cold, warm, very warm, and hot. Then you construct the Knowledge Base by creating various rules such as: if the room is very warm or hot and you want the room to be cool, blow cold air. This can be translated to:

     IF (hot OR very-warm) AND (target-temperature == cold) THEN output Cold. 

The Inference Engine uses the rules and determines what to do, applying the fuzzy value. Finally, the Defuzzification Module returns the value for Cold.

Back to Air Combat

In the case of the air combat "intelligent foe", there could be hundreds or maybe even thousands of variables. Altitude of the plane, location of the plane, is the plane ascending/descending, what is topology around the area, and so on. These values are put into thousands of IF-THEN statements, and a result determines what to do.

So, is there anything that fuzzy logic could do to help the general public? Consider medical diagnosis which is not very simple or straight forward. There are several different conditions that share some of the same symptoms. Based on these symptoms, there may be several possible diagnoses. This uncertainty could prompt the program to ask additional questions; questions the doctor may have not considered relevant, that could result in determining that the patient has a very rare condition that maybe only one in a hundred thousand people have.  

Let's consider another application. Facial recognition. The input images may not be clear and the person won't be standing still facing forward. So, how could a computer program use a moving image to pair up with thousands of potential faces? Again, using various rules of height, hair length, eye color, scars/tattoos and so on, various potential faces can be eliminated until a very small fraction of candidates can be returned. Similarly, you can isolate someone's voice in an audio file and filter out all of the background noises using fuzzy logic.

Another plus with fuzzy logic is that it's easy to add additional rules as the expert learns more about the topic at hand and quite possibly, you could have the system generate its own rules based on the inputs known at the time and the result it witnesses. Returning back full circle, this is how a system can learn how a pilot thinks.


Wednesday, October 10, 2012

ePuzzler

I heard about this on NPR. "When the Berlin Wall came down in 1989, East Germany's secret police, the Stasi, frantically tore up millions of files gathered during decades of spying on its own citizens." The Stasi shredded millions of documents. Much of them were shredded using s pecial shredding machines that were able to shred hundreds of meters of files. They shredded so much stuff, the shredders burnt out and the remaining papers had to be ripped by hand. When the stasi finally abandoned their posts and their headquarters were taken over by angry protesters, they left behind 16,000 of those sacks, containing hundreds of millions of pieces of paper. It was estimated it would take decades if not a millennia to put the pieces back together.
This is where computers and algorithms come in. A piece of software was developed with help from the Fraunhofer Society, that uses pattern recognition computer technology to reassemble the pieces together. It's essentially a reverse shredder and they call it the e-Puzzler. You scan torn-up documents into it. It matches up the pieces using color, paper texture, fonts, tear lines and other details. The E-Puzzler machine can process 10,000 two-sided sheets an hour.
Jan Schneider from the Fraunhofer Institute describes the steps as follows:"First we have to digitise all the pieces from the bags. This is done by a special high-speed scanning device.
"The next step is to segment the image itself from the raw scan - we need the outline of the pieces, pixel-wise, to perform the reconstruction process after that.
"Then all digitised pieces of paper are stored in the database. After that we reconstruct a lot of the descriptive features of the pieces."

References:
Stasi files emerge through software
BBC News, Tuesday June 3, 2008
http://news.bbc.co.uk/2/hi/technology/7396272.stm
Piecing Together 'The World's Largest Jigsaw Puzzle'
by Phillip Reeves, NPR News, Monday October 8, 2012
http://www.npr.org/2012/10/08/162369606/piecing-together-the-worlds-largest-jigsaw-puzzle
The machine that is putting together the Stasi's 600m-piece spy jigsaw
Kate Connolly, the Guardian, Wednesday May 9, 2007
http://www.guardian.co.uk/world/2007/may/10/germany.kateconnolly1