This repository contains a framework for solving tasks using linear genetic programming.
To set up the environment and dependencies, follow the instructions below:
# Install required packages
sudo apt-get install docker
sudo apt-get install rust
sudo apt-get install docker-compose
sudo apt-get install python
...
- Setup the environment:
docker-compose up -d
python -m venv venv
pip install -r scripts/requirements.txt
cargo build --release
- Execute the search script:
# Display help
./scripts/search.py -h # help
# Search for the best parameters for a specific environment
./scripts/search.py --env cart-pole-lgp --n-trials 40 --n-threads 4
# Search for the best parameters for all environments
./scripts/search_all.sh
- View search results:
# using optuna dashboard
docker run -it --rm -p 8080:8080 -v `pwd`:/app -w /app \
- Run tests using the updated hyperparameters:
cargo nextest run --no-fail-fast --release --no-capture
- Produce graphs and tables:
./scripts/produce_assets.py
- Determine how well individuals perform after training:
cargo bench
The repository includes a GitHub Actions workflow file that automates the process of running experiments, searching for optimal parameters, and benchmarking. The workflow is triggered manually and accepts the number of experiments as input. The workflow file can be found at .github/workflows/experiments.yml
.
Contributions are welcome. Please refer to the guidelines in CONTRIBUTING.md for more information.