Thursday, July 2, 2009

Applying Artificial Intelligence

An interesting question on stackoverflow.com, a question-and-answer site that I frequent, came up about applying artificial intelligence (AI). The question was in the context of trading algorithms but since it's a question that could easily be asked in many other domains I wanted to explore it generally.

Applying AI is an entirely different proposition than creating, discovering or even understanding AI. For the most part one could profitably apply AI to a problem without understanding the internal mathematics of the AI algorithm.

A classical example of this is teaching neural networks how to perform a logical XOR (exclusive or). Exclusive OR is a function that returns 1 if the inputs differ and 0 if they are the same. This example is popular for a number of reasons but, for the purpose of applying AI, the key points are:
  • Neural networks take a vector of numerical inputs and produce a vector of numerical outputs.
  • XOR is a problem that takes a vector of numerical inputs and produces a single numerical output.
  • Applying AI involves training the neural network on a bunch of input vectors until its output matches the expected output.

When it comes to applying the neural network there's really no need to understand exactly how the neural network "learns" the XOR algorithm. (See my master's thesis for an example of spending way too much time on explaining the mathematics behind backpropagation neural networks.) For the purpose of applying the neural network to a given problem the functioning of the network itself can be considered a black box.

Of course, in the real world things are rarely that simple. Most of the problems you encounter in the real world don't present themselves as a vector of numerical inputs. Nor will your boss/client accept a vector of numerical outputs as a solution.

So most of the work of applying neural networks in the real world is that of translating the problem into a form that the AI algorithm can understand then translating its output into a form that your boss/client/audience can use. If you're lucky the solutions will be very good at least 2/3rds of the time.

There are many other techniques in AI (genetic algorithms, fuzzy logic, support vector machines, nearest-neighbor algorithms) but for the most part they all require numerical input, produce numerical output and generally do not require you to develop a formal model of your problem and its solution. If you've already got a formal model of your problem and its solution then you're probably better off using numerical or statistical methods.

No comments :

Post a Comment