# Evolving-AI-Lab/cppnx

Source code of the CPPN-Explorer tool. See http://www.evolvingai.org/PicbreederCanalization for the accompanying publication.
Switch branches/tags
Nothing to show
Latest commit 3ae37c9 Nov 1, 2017
 Failed to load latest commit information. CanalizationPicbreederGenomes Apr 20, 2017 cppn-x Oct 31, 2017 icons Oct 31, 2017 libzip-0.11.1 Mar 22, 2017 macx Jun 12, 2017 qtffmpeg Oct 31, 2017 zlib Jun 25, 2013 .gitignore Oct 31, 2017 INSTALL.txt Mar 31, 2017 LICENSE Mar 22, 2017 README.md Jun 12, 2017 VERSION.txt Oct 31, 2017 build_bundle.sh Sep 13, 2013 clean.bat Jun 15, 2013 clean.sh May 30, 2013 compile-debug.sh Mar 17, 2017 compile-mpeg.bat Jul 2, 2013 compile.bat Jun 15, 2013 compile.sh Mar 17, 2017 cppn-x-debug.pro Mar 17, 2017 cppn-x-mpeg.pro Sep 13, 2013 cppn-x-release.pro Mar 17, 2017 cppn-x.pro Oct 31, 2017 qt-path.bat Jul 2, 2013 run.bat Jul 2, 2013

## CPPN-Explorer

This repository contains the source code for the CPPN-Explorer (CPPN-X) tool, which allows the user to examine Compositional Pattern Producing Networks (CPPNs) such as Picbreeder.com genomes. The accompanying publication is:

If you use this software in an academic article, please consider citing:

@article{huizinga2017emergence,
title={The Emergence of Canalization and Evolvability in an Open-Ended, Interactive Evolutionary System},
author={Huizinga, Joost and Stanley, Kenneth O and Clune, Jeff},
journal={arXiv preprint arXiv:1704.05143},
year={2017}
}


## 1. Installation

This files contains the installation instructions for cppn-x. These installations have been tested on Windows XP (SP 3) and Mac OS X 10.6.8, but they might work on other systems as well.

Please chose the instructions for the system that most closely resembles yours and mail to joost.hui@gmail.com, providing as much information as possible, if you encounter any problems.

### UNIX and MAC systems

These are the installation instructions for MAC and UNIX based systems.

For Mac:

#### (optional) Install FFmpeg 1.2

• Install the libraries according the the instruction found in INSTALL. These instructions are usually:
• ./configure
• make
• make install
• If the there are missing packages, install them separately. The following site lists the commands to install most of ffmpegs dependencies, but your probably don't need all of them: http://hunterford.me/compiling-ffmpeg-on-mac-os-x/

#### Compile cppn-x

• Open compile.sh and check that all paths are correct. The compile.sh will have additional comments for setting.
• Open cppnx.pro to set or change deployment target for OSX
• Run compile.sh

For UNIX:

• The executable 'cppn-x' should be placed in the 'build' folder. For MAC:
• The app 'cppn-x.app' should be placed in the 'build' folder.

#### Run cppn-x

For UNIX:

• Run 'cppn-x' in the 'build' folder. For MAC:
• Open 'cppn-x.app' in the 'build' folder from a finder window or execute build/cppn.app/Contents/MacOS/cppn-x.

### Windows systems

These instructions use the open source 'MinGW' (Minimalist GNU for windows) to install both QT and cppn-x. It is probably possible to install everything using Visual Studio 2008 or Visual Studio 2010, but this has not been tested and no instructions are available.

#### Install MinGW 4.4

The MinGW variant of QT explicitly states that it needs MinGW 4.4 in order to function properly when using the pre-compiled binaries. More recent versions are reported to function properly when compiling QT yourself, but these instructions use the pre-compiled binaries.

#### Install QT 4.8.4

• Execute the installer (qt-win-opensource-4.8.4-mingw.exe) and follow the instructions.
• You can install QT anywhere but you have to remember the installation directory.
• When, during the installation of QT, you are asked where MinGW is installed, make sure you provide the installation directory you remembered in the step above. You can now forget this directory.

#### (optional) Install FFmpeg 1.2

• Download the FFmpeg 1.2 shared and the FFmpeg 1.2 dev builds from: http://ffmpeg.zeranoe.com/builds/
• For 32 bit:
• Shared build: ffmpeg.zeranoe.com/builds/win32/shared/ffmpeg-1.2-win32-shared.7z
• Dev build: ffmpeg.zeranoe.com/builds/win32/dev/ffmpeg-1.2-win32-dev.7z
• For 64 bit:
• Shared build: ffmpeg.zeranoe.com/builds/win64/shared/ffmpeg-1.2-win64-shared.7z
• Dev build: ffmpeg.zeranoe.com/builds/win64/dev/ffmpeg-1.2-win64-dev.7z
• You can extract these libraries anywhere, but you have to remember where they are installed.
• Open (edit) qt-path.bat and change the paths after QT_DEV_PATH and QT_SHARED_PATH to the directories of the builds you just extracted. Make sure the QT_DEV_PATH contains the 'include' and 'lib' directories. Make sure the QT_SHARED_PATH contains the 'bin' directory.
• In the instructions below, run compile-mpeg.bat instead of compile.bat
• This build will probably only run using run.bat

#### Compile cppn-x

• Open (edit) qt-path.bat and make sure the path points to the bin directory in the QT installation directory you remembered in the previous step. As such, the second line should read something like: set PATH=C:\path\to\qt\4.8.4\bin Don't forget to save this file.
• Run compile.bat
• An executable (cppn-x.exe) should now be present in build\release

#### Run cppn-x

Usually you can just run build\release\cppn-x.exe If that doesn't work due to dll errors, try running it using run.bat

## 2. Usage

To get started, you can either load an existing CPPN, or start a new CPPN from scratch. Example CPPN genome files are available at: http://www.evolvingai.org/PicbreederCanalization.

### Examining connections

Once a CPPN is loaded, click on any connection to select it. You can now use the slider at the bottom of the screen to change the weight of the selected connection and observe its effect on the final image. Alternatively, you can press the "start scan" button to automatically sweep over the entire range of values for that connection. Changing the values in the step, start, and end boxes will affect where the scan starts and ends, as well as its step size. Once you are done, you can click "reset" to change the weight back to its original value.

### Labeling connections

To label a connection, simply select a connection, type the name of the label in the top right box, and press "add label". Once the label is created, other connections can be labeled by selecting the connection, and then pressing the colored button of the relevant label. Lastly, the first 9 labels can also be assigned via the shortcuts Alt+1 through Alt+9.

### View and positioning

Many different options are available for changing how networks are displayed in the "view" menu, including showing or hiding labels, showing or hiding the sign (red for negative, green for positive) of each connection, showing or hiding the intermediate thumbnails, and showing a leged for all labels. In addition, some positioning options are available in the "Position" menu. Current positioning options are "Layered", "Circle", and "ONP" (Optimal Neuron Placement). The "Layered" and "Circle" options are self-explanatory. The "ONP" option attempts to minimize connection lenght while keeping the input and output in fixed positions. This mode can be helpful for discovering modules within the network.

### Other

CPPN-X has many other experimental functionalities under the "Experimental" options, including adding nodes and edges, changing acitvation functions, comparing different files. These functionalities are still in development, and not fully documented, so use them at your own risk.