At the forefront of Artificial Intelligence
  Home Articles Reviews Interviews JDK Glossary Features Discussion Search
Home » Articles » General » Beginner

Mathematics for AI Beginners

There have been a lot of requests for a mathematical introduction for those of you less acquainted with mathematical notation and their meanings. This essay will introduce the necessary mathematics to understand a variety of formulas within neural networking and genetic algorithms. It will not cover the theory because it is simply too broad.

Neural Network Examples

Let us look at a very simple equation - the Perceptron Learning Rule:

Simple equation

Firstly, the triangle denote the change or "delta" (thus the Greek letter delta). 'w' is an set of numbers and i is used to denote the index of the set. So in english, the above equation would read:

"The change of the ith member of w is equal to the ith member of x multiplied by d"
Ok, let us look at something quite a bit more complicated. Here is the equation that governs weight modification in back-propagation:

Scary? It shouldn't be - mathematical equations are almost never as complex to understand as they look. That funny shaped "E" stands for summation. Here p is used as a counter variable and runs from 0 to P. So here the equation states:

The change of the ith member of w is equal to n divided by P multiplied by the sum xipdp for all p's between 1 and P.

Some Exercises

Those 3 concepts (change, sets and summation) should get you through a lot of rudimentary AI mathematics (at least understand how to compute things from their formulas). Here are some exercises to make sure you understand. Try to equate the outcome of these three exercises:
  1. (Where W is a set of all odd numbers)
  2. (Where E is a set of all even numbers, calculate for i=1...5)
Ok and here are the answers!
  1. 1 + 2 + 3 + 4 + 5 = 15
  2. 1 + 3 + 5 + 7 + 9 + 11 + 13 + 15 + 17 + 19 = 100
  3. For i1 = 4 + 8 + 12 + 16 + 20 + 24 + 28 + 32 + 36 + 40 = 220
    For i2 = 8 + 12 + 16 + 20 + 24 + 28 + 32 + 36 + 40 = 216
    For i3 = 12 + 16 + 20 + 24 + 28 + 32 + 36 + 40 = 208
    For i4 = 16 + 20 + 24 + 28 + 32 + 36 + 40 = 196
    For i5 = 20 + 24 + 28 + 32 + 36 + 40 = 180

Conclusion

Mathematical symbols can look very daunting, but more often than not are just a concise way of representing something long but relatively simple to accomplish. If you are the type that thinks more in computational terms (like myself) write a program or jot down on a piece of paper the necessary steps. Look at code that implements these things (such as BP code) - it will all look a lot simpler. If you feel another mathematical concept should be included here, please mail me.

Last Updated: 21/10/2001

Article content copyright © James Matthews, 2001.
 Article Toolbar
Print
BibTeX entry

Search

Latest News
- New Generation5 Design! (09/04/2007)
- Happy New Year 2007 (02/01/2007)
- Where has Generation5 Gone?! (04/11/2005)
- NeuroEvolving Robotic Operatives (NERO) (25/06/2005)
- Senior Next-Gen Console Programmer at Infinity Ward (25/06/2005)

What's New?
- An Introduction to Hough Transforms (06/01/2008)
- Kohonen-based Image Analysis using the Generation5 JDK (12/12/2007)
- Back-propagation for the Uninitiated (10/04/2007)
- Perceptrons (09/04/2007)
- Modelling Bacteria using the Generation5 JDK (01/04/2007)


All content copyright © 1998-2007, Generation5 unless otherwise noted.
- Privacy Policy - Legal - Terms of Use -