Skip to content

Draw curveball trades among non-empty columns only - #7

Merged
mkborregaard merged 1 commit into
mainfrom
mkb/curveball-nonempty
Sep 26, 2026
Merged

mkborregaard merged 1 commit into
mainfrom
mkb/curveball-nonempty

Conversation

@mkborregaard

Copy link
Copy Markdown
Member

A trade involving an empty column is a no-op, and column sums never change, so trade pairs are now drawn only among the non-empty columns. trades defaults to 5 × the number of non-empty columns. The target distribution is unchanged.

Before this, a matrix with many empty columns barely mixed. A 6-species clade in 60 of 17542 grid cells usually got identical successive draws. The new test fails on 0.2.0 (0 presences moved per draw) and passes here.

Bumps to 0.2.1.

🤖 Generated with Claude Code

A pair involving an empty column is a no-op, and column sums never change,
so the non-empty columns are a fixed set along the chain. Drawing trade pairs
from that set leaves the target distribution unchanged, but a matrix with many
empty columns, such as a clade occupying 60 of 17542 grid cells, no longer
spends almost all its trades on nothing: before, successive draws of such a
matrix were usually identical. `trades` now defaults to five per non-empty
column. Bumps to 0.2.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mkborregaard
mkborregaard merged commit 148d4d0 into main Sep 26, 2026
3 checks passed
@mkborregaard
mkborregaard deleted the mkb/curveball-nonempty branch September 26, 2026 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant