producer/
: all task producer components
backend/
: task producer backendgenetic_algorithm/
: implementation of genetic algorithm as task producergenetic_individual/
: producer individual implementationsshared/
: code shared between genetic algorithm and individualsfrontend/
: web interface of task producerrouter/
: central task router implementationworker/
: all task worker components
worker/
: task worker (capable of executing evaluation code of worker individuals)The following packages should be installed on a central device/environment:
pip install --editable producer/backend/genetic_algorithm/sliding/
pip install --editable producer/backend/shared/
pip install --editable router/
yarn install --cwd producer/frontend/
The worker may be installed on all devices/environments that should act as workers:
pip install --editable worker/worker/
For each individual type there exists a backend and worker part (the frontend is installed by default). The code can be installed from the following directories (replace ...
with the individual type name):
pip install --editable producer/backend/genetic_individual/.../
pip install --editable worker/.../
Note: The directory name is not the individual type. The individual type is contained in the setup.py
file (name
field) within each directory.
The worker part of the neural network individual type has Tensorflow as a dependency. You may want to install this in a different environment (e.g. Docker image). We provide shell scripts for building a Docker image (see worker/genetic_individual_neuralnet/build.sh
).
Custom individuals may be implemented in the aforementioned directories. This repository already contains individuals in producer/backend/genetic_individual/
.
Custom algorithms may be implemented and installed from directories in producer/backend/
.
First, start the central task router:
ditef-router
Next, connect at least one task worker to the task router with the following arguments:
http://localhost:8080/
name
field of setup.py
in worker/.../
directory)For example, for starting a worker for bitvector individual type:
ditef-worker http://localhost:8080/ ditef_worker_genetic_individual_bitvector
Start the sliding genetic algorithm task producer with the following arguments:
http://localhost:8080/
name
field of setup.py
in producer/backend/genetic_individual/.../
directory)For example, for starting an algorithm for bitvector individual type:
ditef-producer-genetic-algorithm-sliding http://localhost:8080/ ditef_producer_genetic_individual_bitvector my_fancy_state
Start the frontend:
cd producer/frontend/
yarn start
After these steps, you can connect to the frontend and use the web interface.
MIT