P-adic Gibbs Regression Explorer

Interactive exploration of Gibbs-style p-adic linear regression with Boltzmann sampling

Understanding P-adic Regression

This game implements Zubarev's p-adic polynomial regression using Gibbs sampling. Unlike traditional regression that minimizes Euclidean distance, p-adic regression uses the p-adic norm |·|_p where smaller values indicate better fits.

P-adic valuation: v_p(n) = max{k : p^k divides n}
P-adic norm: |n|_p = p^(-v_p(n))
Loss function: L(w) = (1/N) Σ |y_i - (w_0 + Σ w_j x_ij)|_p

The Gibbs sampler proposes parameter updates w_new = w_old + ξ and accepts them with probability proportional to exp(-β(L_new - L_old)).

0.4
40
3

Sampling Progress

Loss Convergence

Final Results