Hopfield neural network in Lisp

The code is here

The network consists of n neurons.

It stores M fundamental memories (vectors containing 1’s and -1’s) in a weights matrix (the function weights-matrix).

The activation function is y(x) = if x < 0 -1 else 1.

Then it tests if the network can recall all fundamental memories (the function stable-p).

After that, you can input an unknown n-dimensional vector (probe) to the network and retrieve a stable state (the function hopfield).

The neurons are updated asynchronously, that is, randomly and one at a time.

Published in: on 31/12/2012 at 12:32  Leave a Comment  

The URI to TrackBack this entry is: https://burubaxair.wordpress.com/2012/12/31/hopfield-neural-network-in-lisp/trackback/

RSS feed for comments on this post.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: