Function Generator

Here we provide an Eclipse plugin for programmers that allows to evolve (i.e., to get in an automated way) simple functions that meet specified requirements (pass through given points).

Downloads

FunctionGenerator_1.0.1.jar (~4.2MB)
FunctionGenerator_src_1.0.1.7z (~2.6MB)

Creative Commons LicenseThis program is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License

Installation

To install this Eclipse plug-in:

  1. Install Eclipse if it is not installed already (The plug-in has been tested with Eclipse 3.6, other versions are not officially supported).
  2. Copy file FunctionGenerator_x.x.x.jar to the plugins folder in Eclipse installation directory (The x.x.x part of the name denotes plug-in version number).
  3. Run Eclipse.

Usage

To run the plug-in, you can either click the FG icon on the toolbar, or select Function Generator -> Generate Function in the main menu.

Eclipse main window

The main program window should be shown. There are many options there, from the top:

  • Problem type – defines that floating-point or integer arithmetic should be used.
  • Constraints – constraint point for symbolic regression. Usually more points give more accurate results, but increase computation times. The constraints can be added manually, or by using the linear scaling problem wizard. To use the wizard, click on the "Linear scaling problem" button.
  • Basic settings
    • Size of population – number of individuals in population. Usually more individuals cover search space better, but increase computation times and memory consumption. Default: 25000.
    • Number of generations – number of generations for evolutionary algorithm. Default: 50.
    • Max depth of tree – maximum depth of the genetic programming tree that represents the function expression you look for. Too big tree size may cause overfitting (lack of generalization). The limit set too low may disallow expressions complex enough to describe your data. Default: 6.
  • Available functions – list of available base functions. Function sets for floating-point and integer problems differ a bit.

When problem definition is done, click the OK button to begin computation.

Main plug-in window 

Linear scaling problem wizard lets you define constraints on independent variable x0 and dependent variable y. The constraints can be constant or variable (if a variable constraint is chosen, then a new variable – a new dimension will be added to the problem). The user input interpretation is shown at the bottom.

Linear scaling problem dialog 

When computation begins, the progress window is shown. Each output entry contains fitness value of the best individual in generation (0 – best fitness, ∞ - worst fitness), its adjusted version using the following equation: adjusted = 1/(1+fitness), and hits points – the number of fulfilled constraints.

Progress window 

When evolution is done, the result window is shown. A sample result function is underlined in the screenshot below.

Result window 

Program and text: Tomasz Pawlak
Mentor: Maciej Komosiński