#Metrics Internals
#Live Metrics
Live metrics are computed in the WebGPU worker. They are planned by section and device-safe counter limits, then encoded as compute passes against the current packed grid.
Population and diversity depend on the histogram pass:
- The histogram shader uses atomic counters in workgroup memory and global storage.
- Counts are by numeric tribe index.
- Alive cells are total cells minus the dead tribe count.
- Occupancy is alive cells divided by total cells.
- Shannon entropy and Simpson index are computed from alive tribe probabilities.
Interfaces use a boundary pass:
- Each cell checks only right and bottom neighbors.
- Toroidal grids wrap those checks and have total contact edges.
- Bounded grids skip checks beyond the right and bottom edges and have total contact edges.
- Cross-state edges are counted directly.
- Same-state edges are total contact edges minus cross-state edges.
#Offline Metrics
Download metrics scan recorded frames in the download worker. They decode packed rows, update population histograms, count frontier/contact edges using the recorded grid topology, and compare with the previous frame when generations are consecutive. Toroidal exports wrap edge contacts; bounded exports count only contacts between stored cells and do not include virtual boundary cells.
Offline transition metrics include:
- Changed cells.
- Births.
- Deaths.
- Tribe switches.
#Limits
Live metrics rely on -bit unsigned GPU counters:
- Population and diversity are available when .
- Interfaces are available when .
If a section is enabled but not safe for counters, the UI marks it unavailable. If disabled globally or per section, it is marked disabled.
Download metric estimates use these constants:
- Metric entry base: .
- Metric entry per tribe: .
- Metrics CSV row base: .
- Metrics CSV row per tribe: .
- Streaming metric-entry threshold: .
- Large metrics CSV warning threshold: .