Class MSEvsGenerationPlot

All Implemented Interfaces:
ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible

public class MSEvsGenerationPlot extends PlotPanel
Plot of fitness error vs generation (log x-axis) for the image evolution GA demo.

Two curves are shown:

  • Best MSE — the best (lowest) MSE found so far. Monotonically non-increasing by definition.
  • Mean MSE — population mean MSE. Tracks best MSE closely in a converged population; diverges when diversity is high.

The gap between mean and best is a useful diversity proxy: a large gap means the population is diverse; a gap near zero means it has converged.

See Also:
  • Constructor Details

    • MSEvsGenerationPlot

      public MSEvsGenerationPlot()
  • Method Details

    • update

      public void update(GAState state)
      Add a data point from the current GA state.

      Must be called on the EDT. Typically called from onSimulationRefresh in the view.

      Parameters:
      state - current GA state
    • clearData

      public void clearData()
      Clear all curve data.