Artificial colorful painter

This program presents an evolutionary approach to generating computer images. The role of a user is to evaluate pictures that are created automatically. These evaluations are the source of information on how to change these pictures so that the user can be more satisfied with the outcome.

In contrast to other, similar programs, this one enables you not only to select the best solution (picture), but also to indicate best fragments of the pictures. This way the program gets more information about user preferences.

Choose language:

How it works?

The program uses evolution directed by a human (you). The only way to generate “better” pictures is to interact with the program.

The general procedure of Artificial Colorful Painter is:

  1. Generate a set of randomly pictures.
  2. Let the user evaluate created pictures and select the best one.
  3. Generate the next set of pictures respecting information from the previous step.
  4. Go back to point 2.

Initially, there are 16 completely random pictures generated. The user has to evaluate them. If some fragments of pictures are especially appealing, he/she can select them. These fragments will be evaluated positively and remembered as patterns. Then, the user should select the best image. This lets program generate the next set of pictures. The whole process can be repeated until results are satisfactory.

A new picture is created by substituting its worst fragment with the best fragment chosen from the the best selected picture. Then (with some probability), analogous substitution follows with a randomly chosen pattern. At last, random modification (mutation) of such a picture takes place.

Pictures coding

A picture is coded symbolically. Its genotype has a form of a tree. Leaves encode information about all the blots, i.e. their color, size and direction. Nodes store information about transformation (changes of color, size, direction and translation) performed on image fragments encoded in its subtrees. There are three types of nodes:
  • pair – has exactly two subtrees which are painted after transforming them with individual transformations
  • simple sequence – has one subtree which is painted repeatedly after transforming it again and again with the same transformation
  • complex sequence – has two subtrees, one is painted like in the simple sequence, and the second subtree is painted only at the end of the sequence

Each element of the tree has an additional parameter, which represents quality of the corresponding fragment of the picture. It is modified according to evaluation of the user.

The background of the picture is coded independently. It is described by colors near edges, corners and in the centre.

User interface

The main window of the program consists of several parts: sliders designed to set basic parameters, list of patterns and the main part which shows presented pictures.

Double click on some picture marks it as the best one and a new generation is created. By pressing and holding down the left mouse button you can select a fragment of the picture that will be positively evaluated. Holding the button and moving up/down will adjust the size of the selected fragment; moving left/right adjusts the quality of the selected part. Right-click shows a context menu that lets you perform additional operations.


  • Number – the number of pictures shown
  • Size – the initial complexity of generated pictures
  • P <–> S – the proportion between node types: complex sequence and simple sequence
  • Growth – the trend of decreasing or increasing amount of blots in pictures in subsequent generations
  • Mutation – the probability of mutation
  • Brush – type of brush used

The Reset button will generate new pictures and start the evolution from scratch.

Sample pictures that the painter created:

Program and text: Bartosz Wieloch
Porting to javascript: Bartosz Radliński
Mentor: Maciej Komosiński