|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Phase 13 example: how the update scheme reshapes Schelling segregation dynamics. More...
#include <cstddef>#include <cstdint>#include <iostream>#include <random>#include <string>#include <ca-rng.H>#include <ca-traits.H>#include <tpl_ca_async_engine.H>#include <tpl_ca_lattice.H>#include <tpl_ca_neighborhood.H>#include <tpl_ca_storage.H>#include <tpl_ca_stochastic_rules.H>#include <tpl_ca_update_scheme.H>Go to the source code of this file.
Functions | |
| int | main (int argc, char **argv) |
Phase 13 example: how the update scheme reshapes Schelling segregation dynamics.
Schelling's local CA segregation model is sensitive to the update scheme: synchronous updates can produce oscillating ghosts (an agent leaves a cell that another agent moves into in the same step), while asynchronous updates evolve more like the original non-local model and converge to stable clusters. This example runs the same initial configuration under three schemes side by side and prints a "segregation" metric (fraction of same-type neighbours among occupied cells) so the difference is visible at a glance.
Run: ./ca_schelling_async_vs_sync_example [steps] [side] [seed]
Definition in file ca_schelling_async_vs_sync_example.cc.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 121 of file ca_schelling_async_vs_sync_example.cc.
References Aleph::blossom_maximum_cardinality_matching(), and steps.