Skip to content

Repository files navigation

paper-polyomino-grammatical-evolution

Software artifacts for the experiments on the evolution of polyominoes guided by a 2-D grammar.

Paper

The paper related to these experiments is this one:

@article{megane2025exploring,
  title={Exploring Grammar-Guided Design and Evolution of Polyominoes with Modular Soft Robots},
  author={M{\'e}gane, Jessica and Medvet, Eric and Louren{\c{c}}o, Nuno and Machado, Penousal},
  year={2025}
}

How to reproduce the experiments

Requirements

  • JDK 25

The binary of JGEA, the evolutionary framework these experiments are based on, is already available in this repo.

Evolution of polyominoes (as synthetic problems)

All five grammars on all five targets with GA (with the bits(500) representation):

java \
  -jar jgea.jar \
  -nt 16 -nr 4 \
  -f exp-files/synthetic-all-ga.txt \
  --expHeadLines \
    '$nOfEvals = 20000' \
    '$seeds = [1:1:50]'

Three grammars on two targets (dog and circle) with four EAs (with the reals(200) representation):

java \
  -jar jgea.jar \
  -nt 16 -nr 4 \
  -f exp-files/synthetic-circle+dog-eas.txt \
  --expHeadLines \
    '$nOfEvals = 20000' \
    '$seeds = [1:1:50]'

Evolution of VSRs

Two VSR grammars (biped and worm) for the locomotion problem with NSGA-II (with the bits(1024) representation):

java \
  -jar jgea-vsrs.jar \
  -nt 16 -nr 4 \
  -f exp-files/vsr.txt \
  --expHeadLines \
    '$nOfEvals = 20000' \
    '$seeds = [1:1:10]'

Overview of the results

Evolution of VSRs

Evolution of the velocity and power for the fastest robot

Velocity of the fastest robot during the evolution

Power of the fastest robot during the evolution

Sample videos of the final fastest robot

Videos from runs 1 to 8 (more in results/vsr.txt/).

With grid (no-grammar) representation

Video of fastest evolved robot Video of fastest evolved robot Video of fastest evolved robot Video of fastest evolved robot

Video of fastest evolved robot Video of fastest evolved robot Video of fastest evolved robot Video of fastest evolved robot

With biped-grammar representation

Video of fastest evolved robot Video of fastest evolved robot Video of fastest evolved robot Video of fastest evolved robot

Video of fastest evolved robot Video of fastest evolved robot Video of fastest evolved robot Video of fastest evolved robot

With worm-grammar representation

Video of fastest evolved robot Video of fastest evolved robot Video of fastest evolved robot Video of fastest evolved robot

Video of fastest evolved robot Video of fastest evolved robot Video of fastest evolved robot Video of fastest evolved robot

Objective plots

Plots from runs 1 to 5 (more in results/vsr.txt/).

With grid (no-grammar) representation

Objectives plot at five stages of the evolution

Objectives plot at five stages of the evolution

Objectives plot at five stages of the evolution

Objectives plot at five stages of the evolution

Objectives plot at five stages of the evolution

With biped-grammar representation

Objectives plot at five stages of the evolution

Objectives plot at five stages of the evolution

Objectives plot at five stages of the evolution

Objectives plot at five stages of the evolution

Objectives plot at five stages of the evolution

With worm-grammar representation

Objectives plot at five stages of the evolution

Objectives plot at five stages of the evolution

Objectives plot at five stages of the evolution

Objectives plot at five stages of the evolution

Objectives plot at five stages of the evolution

How to transform mp4 videos to gif

Within the video directory:

for i in {0001..0008}; do
    ffmpeg -i "v100-grammar-biped-$i.mp4" -vf "scale=150:-1:flags=lanczos" "v100-grammar-biped-$i.gif" -y
    ffmpeg -i "v100-grammar-worm-$i.mp4" -vf "scale=150:-1:flags=lanczos" "v100-grammar-worm-$i.gif" -y
    ffmpeg -i "v100-grid-$i.mp4" -vf "scale=150:-1:flags=lanczos" "v100-grid-$i.gif" -y
done

About

Software artifacts for the experiments on the evolution of polyominoes guided by a 2-D grammar.

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors