The Hopfield neural model is used for recognition of incomplete or inexact patterns. It matches the test pattern on a set of comparison patterns and modifies it until convergence.
Let wi be the set of comparison patterns, for example the words in a vocabulary, and x a test pattern. A pattern is a finite sequence of binary items (with values either +1 or -1). Let D denote the dimension (length) of the patterns. The algorithm is