The applet below demonstrates the Hopfield network.
A square grid is placed on the left side of the applet window. This grid represents a 10x10 input pattern (i.e. input vector size is 100). Clicking in a white square of this grid convert this square to color black, and clicking a black square fills it with color white. A ‘white’ square means ‘-1’ input, and a ‘black square’ represents a ‘+1’ input.
Buttons and other controls on the right of the grid controls the behaviour of the applet. ‘Clear Grid’ button clears the grid to the color white. ‘Save grid as’ button and the combo (choice) control allows us to save the state of the grid to the variables called ‘pattern 0’ and ‘pattern 1’. ‘Load grid from’ button and combo box right on the right of it restores the grid state from 8 predefined patterns (pattern of numbers from to 0 to 7) and 2 saved variables (pattern 0 and 1). ‘Add noise’ and the combo box on the right of it, adds the given number of black squares (‘1’ s) to the grid at random positions.
Training set checkboxes below tells the network which patterns to learn while training.
‘Train’ button lets the applet to calculate the weights associated with the network. Notice that, the ‘Train’ button becomes ‘Recognize’ button after the training is completed.