Runs the simulation with the given configuration.
the flag indicating whether to run in headless mode (CLI) or with GUI.
an IO effect that runs the simulation and returns an optional final state.