~raphi/djinn-menu-optimizer

Djinn menu optimizer for Golden Sun speedrunning
a month ago
a month ago

#Djinn menu optimizer

Evolutionary algorithm for optimizing Djinn menus in Golden Sun speedruns

#Requirements

meson, ninja, and boost. Also emscripten for compiling to WASM.

When using nix, you can just use nix develop to set up everything.

#Source code overview

  • src: Optimizer backend
  • web: Web frontend
  • test/unit: Unit tests
  • test/quality: Quality tests (tests that for each sample it can find the best known solution in a maximum number of generations)

Boost containers are used in optimizer.cpp because they provide a significant performance boost in the critical path. Outside of that critical path, the normal std:: containers are used.

#Configuring

Example invocations:

CLI:

meson setup build -Doptimization=2
ninja -C build && ./build/djinn-menu-optimizer < samples/tla_reunion.txt

WASM - Development:

emconfigure meson setup build-wasm --cross-file meson_cross_wasm.txt -Dboost_headers=$BOOST_HEADERS
ninja -C build-wasm && cp build-wasm/djinn-menu-optimizer.{js,wasm} web/
(cd web; python -m http.server)

WASM - Production:

emconfigure meson setup build-wasm --cross-file meson_cross_wasm.txt -Doptimization=3 -Db_lto=true -Dboost_headers=$BOOST_HEADERS

#License

GPL 3 or later