rbp-clustering 1.0.0

Hierarchical k-means clustering with Earth Mover's Distance for poker hand abstraction
Documentation

Hierarchical k-means clustering for strategic abstraction.

This module reduces the 3.1 trillion unique poker situations into a tractable number of strategically-equivalent buckets. The abstraction proceeds street-by-street, clustering hands based on their distributions over next-street outcomes.

Pipeline

  1. River — Cluster by raw equity (win probability against random hands)
  2. Turn — Cluster by distribution over river buckets
  3. Flop — Cluster by distribution over turn buckets
  4. Preflop — Cluster by distribution over flop buckets

Core Types

  • [Layer] — A clustering layer mapping observations to abstract buckets
  • [Histogram] — Distribution over child buckets for a given hand
  • [Lookup] — Precomputed observation → bucket mapping
  • [Metric] — Pairwise EMD distances between buckets

Algorithms

  • [Elkan] — Accelerated k-means with triangle inequality bounds
  • [Sinkhorn] — Entropic optimal transport for EMD computation
  • [Absorb] — Incremental centroid updates during clustering

Persistence

  • [Artifacts] — Serialization of clustering results to PostgreSQL
  • [Distances] — Precomputed distance matrices for online lookup