Skip to main content

Roundabout-network stochastic stream shuffler

Project description

If you ever drove in Spain, you might notice their affinity for roundabouts. If you enter a system of 3 roundabouts in a village and take not of both the cars infront and behind you, by the last roundabout its highly probably you wont be between the same two neighbors.

Instead of a black-box shuffle, you get a tunable process with real controls: routing bias, merge randomness, recirculation depth, and injection strategy. The result is near-classic shuffle quality with more visibility and control.

  • For data and systems teams: mix ordered streams before downstream processing without relying on one monolithic random shuffle step.
  • For simulation and research: study queueing, congestion, and mixing quality in one model.
  • For product and game systems: produce high-entropy but reproducible event ordering from seed-based runs.

Benchmark Snapshot

Our optimized roundabout shuffler is now close to standard random shuffling quality.

  • Kendall-tau: 0.4907 (optimized) vs 0.5030 (Fisher-Yates) -> 97.5% of Fisher-Yates mixing.
  • Chi-squared uniformity p-value: 0.5858 (optimized) vs 0.5546 (Fisher-Yates) -> both pass.
  • Bit bias: +0.0051 (optimized) vs +0.0085 (Fisher-Yates) -> both near zero.
  • Total variation distance: 0.0835 (optimized) vs 0.0824 (Fisher-Yates).

In short: this is not just a metaphor. It delivers near Fisher-Yates quality while staying interpretable, tunable, and simulation-friendly.

Package Usage

pip install -e .
roundamix --profile optimized --size 14 --seed 42
roundamix-benchmark --size 14 --trials 300

You can also run without installing:

python -m roundamix --profile optimized --size 14 --seed 42
python -m roundamix.benchmark --size 14 --trials 300

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

roundamix-0.1.0.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

roundamix-0.1.0-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file roundamix-0.1.0.tar.gz.

File metadata

  • Download URL: roundamix-0.1.0.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for roundamix-0.1.0.tar.gz
Algorithm Hash digest
SHA256 83d313eff2d2da09f7cd9581b60072e4a6e3d91a55cf671091eee90d779cb3ea
MD5 12ae4e9033bdd77572d17c65e8c117a3
BLAKE2b-256 5dec15998e9f5c83d777f99029d36e7d38ff9c15be0b57776ae5679e4e1b8e9b

See more details on using hashes here.

File details

Details for the file roundamix-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: roundamix-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for roundamix-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 56f68dd0d0845b155b0b5d35f3f806dd56f494f4fe52fa6f5f9f56a172e2da22
MD5 f219882d5ae0bf52036c1fbbfb3b0aba
BLAKE2b-256 fb523dac0f6c20286a35f5154ce3ae4567aebe2add50746acaae280cf0351312

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page