NFLNeural Network Applet

This java applet implements a single output (the score) feed forward neural network. During training, the network looked at each NFL team's wins, losses, points scored, points given up, strength of schedule, opponents strength of schedule, and home field. The biases and connection weights were "discovered" by utilizing a custom genetic algorithm I wrote (in Delphi) which utilized simulated evolution to "evolve" the correct numeric solutions. A more complex and accurate neural network would take into account additional factors like injury information, field type (grass or turf), etc.

The NFL team data is up to date as of November 21, 2001.

Download java source code for this applet (6 kb)

What Are Neural Networks?

Definition: (paraphrasing Kevin Gurney): 
a neural network is an interconnected assembly of simple processing elements whose functionality is modeled after the neuron in the brain. The processing capability of the network is determined by the relative strengths (weights) of these connections. These weights are calculated by the process of adaption to (and learning from) a set of training patterns.

How Does This Neural Network Work?

In the 3 layer feed forward model I used, information flows from the networks inputs to a hidden layer of neurons and finally to the output neuron. The inputs can store information about an NFL team (wins, losses, points scored, points given up, home field, etc.). This information gets passed through the hidden layer of neurons by various connections with varying strengths (weights) and finally to the output neuron. The strength of the output neuron's activation is thus dependent on it's inputs (from the hidden layer) and in the case of my neural net, it denotes by how many points a team will win or lose a game with another team.

The network was trained by feeding it many sets of input data as well as the expected outcome. For example, one training set might be:
  Team A: won 7 games, lost 3 games, scored 157 points over season, gave up 133 points, schedule strength 18.0, is the home team
  Team B: won 2 games, lost 8 games, scored 111 points over season, gave up 177 points, schedule strength 16.0, is the road team
  Expected Result: Team A wins by 10 points.

During training, when the information about team A and B is fed to the network (as inputs), the network may output something like Team B wins by 3. This is an error and the strengths (weights) of the connections will need to be changed so the network will perform better in the future. The tricky part is determining how to change the weights so performance improves. I did this by using a genetic algorithm I've developed in Delphi.

The Genetic Algorithm That Trained This Network

The genetic algorithm is basically a computer program which simulates evolution. Namely, a simulated population of chromosomes is randomly created and allowed to reproduce according to the laws of evolution (the fittest individuals within a population have the greatest probability to reproduce, there is a chance of a mutation with each genetic mating). For my neural network, I made the chromosomes model the floating point numbers which represent the various strengths (weights) of my neuron connections. So each chromosome is comprised of a number of genes (and each gene is a floating point number representing a neural connection weight). 

Each generation during the evolution, I test each chromosome in my neural network against my set of football games data (how strong each team was and who won the game) to see which ones are the fittest (fit chromosomes have small error between team input information and the expected output). So for the Team A/Team B example above, the chromosome would be judged to be very unfit and would thus have little chance to reproduce. Reproduction in my genetic algorithm is diploid (sexual), meaning that when two chromosomes are mated, pieces (genes) of each are combined in the offspring. For you genetic algorithm geeks, I used a two point crossover technique.

As the evolution process goes on, generation after generation, the chromosomes become fitter and fitter, until they converge on the optimal solution. For my NFL neural network model, a population of 600 chromosomes evolved over 2800 generations with a mutation probability of 0.1 to arrive at the optimal solution (the weights for my neural network).

   
Website copyright © 2001-04, SoftTech Design, Inc. All rights reserved worldwide.