Hopfield Network - executable, Eclipse and Maven projects

                     Hopfield


The Hopfield program first creates a two-dimensional Hopfield network, links its nodes, stores the patterns and finally activates the network with a noisy pattern. To do this, the methods HopfieldNet.createNet(), HopfieldNet.setActivations() and HopfieldNet.storePattern() are called. The reconstruction process for noisy patterns is then visualised, whereby the program is controlled via keyboard input:

  • key input I stands for Init
    ... calls HopfieldNet.setActivations()
    ... "next noisy pattern"
  • key input S stands for Step
    ... calls HopfieldNet.nextActivations()
    ... "next reconstruction step"
  • key input R stands for Run
    ... calls HopfieldNet.nextActivations() in a loop
    ... "until stable state is reached"
  • key input P stands for Pause
    ... interrupts the programm
  • key input E stands for Exit
    ... terminates the programm

The complete program consists of five classes:

  • HopfieldUnit.java
    models the functionality of a single node
  • HopfieldNet.java
    models the dynamic aspects of the Hopfield Net
  • StdDraw.java (from Princeton University)
    provides basic capabilities for creating drawings
  • HopfieldApp.java
    contains the program's main method
  • Patterns.java
    provides the patterns.

Download links: