Carousel problem: mock experiments

Seed = 20260829. Model: i.i.d. Bernoulli(p) belt occupancy (A ~ Geom(p)), observation G = min(A, ell), W ~ Geometric/Uniform.

Experiment 0: analytic model vs. raw-bit Monte Carlo

Parameters: ell=3, p=0.25, n_trials=400000

Marginal (fresh) law of G, analytic vs empirical:

g analytic_pmf empirical_pmf abs_diff 0 0.250000 0.250885 0.000885 1 0.187500 0.187197 0.000303 2 0.140625 0.140758 0.000133 3 0.421875 0.421160 0.000715

max abs diff = 0.00089 (n_trials=400000, expect ~ 1/sqrt(n) ~ 0.00158 noise floor)

Transition kernel P(G_{t+1}=g’G_t=g), analytic:
 g'=0    g'=1    g'=2    g'=3 g=0  0.25  0.1875  0.1406  0.4219 g=1  1.00  0.0000  0.0000  0.0000 g=2  0.00  1.0000  0.0000  0.0000 g=3  0.00  0.0000  0.2500  0.7500

Transition kernel, empirical (raw-bit simulation):

   g'=0    g'=1    g'=2    g'=3 g=0  0.2509  0.1854  0.1400  0.4238 g=1  1.0000  0.0000  0.0000  0.0000 g=2  0.0000  1.0000  0.0000  0.0000 g=3  0.0000  0.0000  0.2499  0.7501

max abs diff = 0.00212, row sample sizes = [99994, 74823, 56319, 168864]

Validation PASSED (analytic kernel matches raw-bit simulation within Monte Carlo noise).

Experiment 1: Bellman-optimal policy vs. baselines

Parameters: ell=2, p=0.2 (belt occupancy), T=5 (deadline slack), W~Geometric(q=0.4, mean width=2.50), n_trials=300000

Immediate stopping cost c(g) for g=0..2: [1.0, 0.6, 0.1385]

           policy  analytic_collision_prob  mc_collision_prob  mc_mean_stop_delay  n_trials
  bellman_optimal                 0.147008           0.148240            0.772590    300000 naive_greedy (g==ell)                 0.149978           0.148937            0.779493    300000
threshold_theta=2                 0.149978           0.150477            0.782373    300000
threshold_theta=1                 0.230818           0.231423            0.250673    300000
threshold_theta=0                 0.384615           0.384610            0.000000    300000
   immediate_drop                 0.384615           0.384737            0.000000    300000
 wait_to_deadline                 0.384615           0.387977            5.000000    300000
threshold_theta=3                 0.384615           0.384013            5.000000    300000

Best policy by analytic collision probability: bellman_optimal (0.1470). Bellman-optimal policy is the empirical best: True

Bellman-optimal reduces collision probability by 2.0% relative to the naive ‘drop when the detector reports a fully clear view’ rule (0.1500 -> 0.1470).

Experiment 2: threshold structure of the optimal policy

Parameters: ell=4, p=0.2, T=10, W~Geometric(q=0.35, mean=2.86)

k_remaining theta_k is_threshold_form V_k(fresh_g=0) 0 0 True 1.000000 1 1 True 0.416667 2 2 True 0.300000 3 3 True 0.239333 4 3 True 0.207787 5 3 True 0.176837 6 4 True 0.157835 7 4 True 0.141430 8 4 True 0.127917 9 4 True 0.116988 10 4 True 0.108595

Every row policy(k, .) is a threshold rule in g: True theta_k non-increasing as k -> 0 (i.e. theta is non-decreasing in k, ‘less picky as deadline approaches’): True

theta_k by remaining slack k (k=0 is the deadline itself): k=0:theta=0, k=1:theta=1, k=2:theta=2, k=3:theta=3, k=4:theta=3, k=5:theta=3, k=6:theta=4, k=7:theta=4, k=8:theta=4, k=9:theta=4, k=10:theta=4

Experiment 3: what one more cell of view is worth

Parameters: p=0.2, T=6, W~Geometric(q=0.3, mean=3.33), sweeping ell=0..12

ell V_star marginal_gain_over_ell_minus_1 0 0.454545 NaN 1 0.318191 1.363549e-01 2 0.227001 9.118953e-02 3 0.187009 3.999185e-02 4 0.181005 6.004364e-03 5 0.181005 -2.775558e-17 6 0.181005 2.775558e-17 7 0.181005 -2.775558e-17 8 0.181005 0.000000e+00 9 0.181005 2.775558e-17 10 0.181005 0.000000e+00 11 0.181005 0.000000e+00 12 0.181005 0.000000e+00

Saturation point (first ell where marginal gain < 1% of total observed gain over ell=0..12): ell* = 5 E[W] = 3.33, median(W) = 2 ell* / E[W] = 1.50, ell* - median(W) = 3

Experiment 4: sensitivity to belt congestion p and deadline slack T

Parameters: ell=2, W~Geometric(q=0.4, mean=2.50); sweeping p in {0.1,0.2,0.3,0.4}, T in {0,1,2,3,5,8}

Optimal collision probability V*(p, T):

T 0 1 2 3 5 8 p
0.1 0.2174 0.1391 0.0969 0.0856 0.0792 0.0783 0.2 0.3846 0.2615 0.2025 0.1710 0.1470 0.1396 0.3 0.5172 0.3724 0.3116 0.2629 0.2171 0.1940 0.4 0.6250 0.4750 0.4150 0.3610 0.2976 0.2532

Relative reduction vs. always dropping immediately (%):

T 0 1 2 3 5 8 p
0.1 0.0 36.0 55.4 60.6 63.6 64.0 0.2 0.0 32.0 47.4 55.6 61.8 63.7 0.3 0.0 28.0 39.8 49.2 58.0 62.5 0.4 0.0 24.0 33.6 42.2 52.4 59.5

Summary

  • Exp 0 (model validation): PASSED
  • Exp 1 (policy comparison): Bellman-optimal policy achieves the lowest collision probability among all candidates tested, matching Monte Carlo.
  • Exp 2 (threshold conjecture): optimal policy is threshold-form in g: True; theta_k monotone non-decreasing in k (less picky near deadline): True
  • Exp 3 (field-of-view value): observed saturation point ell* = 5
  • Exp 4 (sensitivity sweep): see results/exp4_param_sweep.csv