Skip to content

rbattistini/btree-evolution

Repository files navigation

Evolution of Behavior Trees with a genetic algorithm

Experimentation

To run the genetic algorithm with a specific config file:

 ./gradlew runGA --args="config/<CONFIG_NAME>.json"

The default config is used if no path to a config file is given.

To run the genetic algorithm with a Montecarlo selector, to define a baseline, run:

 ./gradlew runRandomSelectorGA --args="config/<CONFIG_NAME>.json"

To run the genetic algorithm over a set of parameters defined in the GridSearchRunner class, run:

 ./gradlew runGAWithGridSearch --args="config/base.json"

To compare a set of behavior trees over multiple configurations of the test environment and save the gathered data as a CSV run:

./gradlew compareBTrees --args="config/<CONFIG_NAME>.json test.csv"

Documentation

The report, both in HTML and PDF, can be built by issuing the following commands in the doc/ directory. It will be available in doc/output/.

gem install
make doc

The API docs can be built in this way:

./gradlew dokkatooGenerate

They will be available under the build/dokka/ directory.

The notebooks, available under the laboratory/notebook directory, allow analyzing the results of the experiments. In particular:

  • overview: to get a chronological list of experiments, the ones with the best results, and a view of their schema for reference;

  • boxplot: to build a boxplot that summarizes the performance of each behavior tree tested;

  • lineplot: to build a line plot to observe how a given behavior tree evolved;

  • btrees: to see the behavior trees generated by the experiments.

Verification

To run the tests and compute the coverage:

./gradlew koverHtmlReport

The report will be available under the build/reports/kover/html/ directory.

Tip

To browse the HTML files, a local server can be run with the command python -m http.server 8000 in that directory.

About

Intelligent Robotic Systems exam project

Resources

License

Stars

Watchers

Forks