Skip to content


Repository files navigation

ITEA: Interaction-Transformation Evolutionary Algorithm (v1.0)

License: GPL v3

ITEA is a fast and simple mutation-based Evolutionary Algorithm developed in Haskell. Check out the API documentation if you want to extend the code.


For Haskell-only:

  • BlAS
  • GSL

For Python wrapper:

  • Numpy
  • Pandas
  • Scikit-Learn


  1. Clone the repository with git clone

Using Haskell stack

  1. Install the Haskell Stack tool following the instructions at

  2. Run

Using ghcup

  1. Run (this will also install ghcup)

Using nix flake

  1. Run


In order to run the algorithm, first create the training and test set files as a comma separated values without a header (see datasets folder for some examples) and then create a config file for the experiment (see configs folder for some examples).

The config file is split into three sections where you can set different hyperparameters:

train = path and name of the training set
test  = path and name of the test set
task  = Regression
log   = PartialLog "path and name of the output file"

exponents      = (-3, 3)
termlimit      = (2,15)
nonzeroexps    = 10
transfunctions = [Id, Sin, Cos, Tanh, SqrtAbs, Log, Exp]
measures       = ["RMSE", "NMSE", "MAE", "R^2"]

npop      = 1000
ngens     = 1000
algorithm = ITEA

penalty = NoPenalty
shapes  = []
domains = Nothing

The task parameter can be set to Regression or Classification, transfunctions accepts a list of transformation functions supported (see src/IT/Eval.hs block "Transformation Functions"), measures accepts a list of error (minimization) functions to use in the report generator (see src/IT/Metrics.hs blocks "Regression measures" and "Classification measures"). The penalty option can be NoPenalty, Len <double value> or Shape <double value>. The shapes option is a list of shape constraints, see src/IT/Shape.hs for a list of choices. domains is either Nothing or Just [min_x0 ... max_x0, ...] a list of interval of each variable domain.

Run the algorithm with the command:

stack run config <conf-file> 

where is the path and name of the config file.

As an alternative you can use the python wrapper as illustrated in


Interaction-Transformation (IT) is a representation proposed in 1 to avoid some redundancy in the search space of Symbolic Regression.


de França, F. O., & Aldeia, G. S. I. (2020). Interaction-Transformation Evolutionary Algorithm for Symbolic Regression. Evolutionary Computation, 1-25.


    author = {de Franca, F. O. and Aldeia, G. S. I.},
    title = "{Interaction-Transformation Evolutionary Algorithm for Symbolic Regression}",
    journal = {Evolutionary Computation},
    pages = {1-25},
    year = {2020},
    month = {12},    
    issn = {1063-6560},
    doi = {10.1162/evco_a_00285},
    url = {\_a\_00285},
    eprint = {\_a\_00285/1888497/evco\_a\_00285.pdf},

Experiments Results

Notice that the results in this repository are not the same as those in the referenced paper due to constant improvements to the source code (that sometimes fails). The original results for ITEA and every other algorithm in the paper are available at experiments-ITEA-paper.


Maintained by Fabrício Olivetti de França (folivetti at


This project is supported by Fundação de Amparo à Pesquisa do Estado de São Paulo (FAPESP), grant number 2018/14173-8.