AI Introduction - Adv, Dis, Applications, Techniques
AI Introduction - Adv, Dis, Applications, Techniques
AI Introduction - Adv, Dis, Applications, Techniques
Gaming − AI plays crucial role in strategic games such as chess, poker, tic-
tac-toe, etc., where machine can think of large number of possible positions
based on heuristic knowledge.
o Police use computer software that can recognize the face of criminal
with the stored portrait made by forensic artist.
Disadvantages of AI
increased costs
1. Heuristics
Suppose we have coins with the following denominations: 5 cents, 4 cents, 3 cents,
and 1 cent, and that we need to determine the minimum number of coins to create
the amount of 7 cents. In order to solve this problem we can use a technique called
“Heuristics”.
For some problems, tailored heuristics can be designed that exploits the structure
within the problem. An example of such a tailored heuristic would be a greedy
heuristic for the above mentioned coin-changing problem. We speak of a greedy
heuristic when we always choose the largest denomination possible and repeat this
until we get to the desired value of 7. In our example, that means that we would
start with selecting a 5 cent coin. For the remaining 2 cents, the largest
denomination we can choose is 1 cent, leaving us with the situation where we still
have to cover 1 cent for which we again use 1 cent.
So our greedy heuristic gives us a solution of 3 coins (5, 1, 1) to get to the value of
7 cents. Of course another, better, solution of only 2 coins exists, using the 3 and 4
cent coins. While the greedy heuristic for the coin changing problem does not
provide the best solution for this particular case, in most cases it will result in a
solution that is acceptable.
Besides such tailored Heuristics for specific problems, certain generic heuristics exist
as well. Just like neural networks, some of these generic heuristics are based on
processes in nature. Two examples of such generic heuristics are Ant Colony
Optimization2 and genetic algorithms3. The first is based on how simple ants are able
to work together to solve complex problems; the latter is based on the principle of
survival of the fittest.
A typical problem where heuristics are applied to find acceptable solutions quickly is
vehicle routing, where the objective is to find routes for one or more vehicles visiting
a number of locations.
The main idea behind SVM is that you try to find the boundary line that separates
the two classes, but in such a way that the boundary line creates a maximum
separation between the classes. To demonstrate this, we will use the following
simple data for our classification problem:
In this example, the green circles and the red squares could represent two different
segments in a total set of customers (e.g. high potentials and low potentials), based
on all kinds of properties for each of the customers. Any line that keeps the green
circles on the left and the red squares on the right is considered a valid boundary
line for the classification problem. There is an infinite number of such lines that can
be drawn. Four different examples are presented below:
As stated before, SVM helps you to find the boundary line that maximizes the
separation between the two classes. In the provided example, this can be drawn as
follows:
The two dotted lines are the two parallel separation lines with the largest space
between them. The actual classification boundary that is used will be the solid line
exactly in the middle of the two dotted lines.
The name Support Vector Machine comes from the data points that are directly on
either of these lines. These are the supporting vectors. In our example, there were
three supporting vectors.
If any of the other data points (i.e. not a supporting vector) is moved a bit, the
dotted boundary lines are not affected. However, if the position of any of the
supporting vectors is slightly changed (e.g. data point 1 is moved slightly to the
left), the position of the dotted boundary lines will change and therefore the position
of the solid classification line also changes.
SVM classification models can also be found in image recognition, e.g. face
recognition, or when handwriting is converted to text.
Figure 1: Graphical representation of a biological neuron (left) and an artificial neuron (right)
The basic principle of a neural structure is that each neuron is connected with a
certain strength to other neurons. Based on the inputs taken from the output of
other neurons (also considering the connection strength) an output is generated that
can be used again as input by other neurons, see Figure 1 (left). This basic idea has
been translated into an artificial neural network by using weights to indicate the
strength of the connection between neurons. Furthermore, each neuron will take the
output from the connected neurons as input and use a mathematical function to
determine its output. This output is then used by other neurons again.
The neurons of the ANN can be structured into several layers 5. Figure 2 shows an
illustrative scheme of such layering. This network consists of an input layer, where
all the inputs are received, processed and converted to outputs into the next layers.
The hidden layers consist of one or more layers of neurons each passing through
inputs and outputs. Finally, the output layer receives inputs of the last hidden layer
and converts this into the output for the user.
Figure 2 shows an example of a network in which all neurons in one layer are
connected to all neurons in the next layer. Such a network is called fullyconnected.
Depending on the kind of problem you want to solve, different connection patterns
are available. For image recognition purposes, typically Convolutional networks are
used, in which only groups of neurons from one layer are connected to groups of
neurons in the next layer. For speech recognition purposes, typically Recurrent
networks are used, that allow for loops from neurons in a later layer back to an
earlier layer.
A set of possible states: for example, this can refer to a grid world of a robot or
the states of a door (open or closed).
A set of possible actions: a fixed set of actions that e.g. a robot can take, such
as going north, left, south or west. Or with respect to a door, closing or opening
it.
Rewards: these are used to direct the planning. For instance, a robot may want
to move north to reach its destination. Actually going north will result in a
higher reward.
Once the MDP has been defined, a policy can be trained using “Value Iteration” or
“Policy Iteration”. These methods are used to calculate the expected rewards for
each of the states. The policy then renders the best action that can be taken from
each state.
As an example, we will define a grid that can be considered as an ideal, finite world
for a robot7. This example grid is shown in Figure 3.
The robot can move (action) from each position in the grid (state) in four directions,
i.e. north, left, right and south. The probability that the robot goes into the desired
direction is 0.7 and 0.1 if it moves towards any of the other 3 directions. A reward of
-1 (i.e. a penalty) is given if the robot bumps into a wall and doesn’t move. Also,
there are additional rewards and penalties if the robot reaches the cells that are
colored green and red, respectively. Based on the probabilities and rewards a policy
(function) can be made using the initial and final state.
Another example of MDP usage is the inventory planning problem - a stock keeper
or manager has to decide how many units have to be ordered each week. The
inventory planning can be modeled as an MDP, where the states can be considered
as positive inventory and shortages. Possible actions are for instance ordering new
units or backlogging to the next week. Transition probabilities can be considered as
the action that will be taken based on the demand and inventory for the current
week. Rewards - or in this case, costs - are typically unit order costs and inventory
costs.
Let us examine the sentence “John hit the can.” One of the first steps of NLP is
lexical analysis, using a technique called Part-of-Speech (POS) tagging. With this
technique every word is tagged to correspond to a category of words with similar
grammatical properties, based on its relationship with adjacent and related words.
Not only words are tagged, but also paragraphs and sentences. Part-of-speech
tagging is mainly performed with statistical models, that lead to probabilistic results
instead of hard if-then rules, and is therefore used for processing unknown text.
Also, they can cope with the possibility of multiple possible answers, instead of only
one. A technique that is often used for tagging is a Hidden Markov Model (HMM). An
HMM is similar to the Markov Decision Process, where each state is a part of speech
and the outcome of the process is the words of the sentence. HMMs ‘remember’
sequences of words that came before. Based on this, they can make better
estimates of what Part-Of-Speech a word is. For example: ‘can’ in ‘the can’ is more
likely to be a noun than a verb. The end result is that the words are tagged as
followed: ‘John’ as a noun (N), ‘hit’ as a verb (V), ‘the’ as a determiner (D) and ‘can’
as a noun (N) as well.
Conclusion
The techniques used within the domain of Artificial Intelligence are actually just
advanced forms of statistical and mathematical models. All these models cleverly
put together provide us with tools to compute tasks that were previously thought to
be reserved for humans. In subsequent blogs we will dive deeper into business
applications, some associated technology trends, and the top 5 risks and concerns.
Planning.
Learning.
Expert Systems.