Codebase for Solving Inverse Problems in Stochastic Self-Organising Systems through Invariant Representations paper. The codebase contains:
Main directories:
src/models/: Models for reaction-diffusion and Schelling systems.src/trainers/: Training and optimization routines, including evolutionary strategies.src/vision_models/: Tools for creating embedding representations using CLIP.src/visualisations/: Visualization utilities for results and experiments.src/scrips_analysis/: Scripts for analyzing and plotting experiment data.src/utils/: General utility functions.
Install dependencies using uv and the provided pyproject.toml or uv.lock.
First install uv, then simply type uv sync.
To reproduce the reported reaction-diffusion experiment, run:
python experiments/RD_experiment.pyThis will optimize parameters for the Gray-Scott reaction-diffusion system to match target patterns, saving results in the experiments_results/RD/ directory.
To reproduce the reported Schelling segregation model experiment, run:
python experiments/SH_experiment.pyResults will be saved in the experiments_results/SH/ directory.
Running the blastocyst experiment requires installing Morpheus and setting up the environment as per the instructions on their site, then run:
python experiments/BL_experiment.pyTo train for specific target parameters, use the trainer module directly:
- See
src/trainers/trainer.pyand run it with your desired settings. - Edit the configuration at the top of the file to set your target system and parameters.
Run:
python src/trainers/trainer.pyResults and outputs will be saved in the specified run folder.