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
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
After that, you can input an unknown n-dimensional vector (probe) to the network and retrieve a stable state (the function
The neurons are updated asynchronously, that is, randomly and one at a time.