<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by NN_Ronin on Medium]]></title>
        <description><![CDATA[Stories by NN_Ronin on Medium]]></description>
        <link>https://medium.com/@nnronin?source=rss-f02be0ea9f77------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*RrJl6kTbf5sGTcXG</url>
            <title>Stories by NN_Ronin on Medium</title>
            <link>https://medium.com/@nnronin?source=rss-f02be0ea9f77------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 14:50:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nnronin/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Teaching an AI to Play UniRun in Unity]]></title>
            <link>https://nnronin.medium.com/teaching-an-ai-to-play-unirun-in-unity-fd9016b380e3?source=rss-f02be0ea9f77------2</link>
            <guid isPermaLink="false">https://medium.com/p/fd9016b380e3</guid>
            <category><![CDATA[game-ai]]></category>
            <category><![CDATA[unity-ml-agents]]></category>
            <category><![CDATA[ppo]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[reinforcement-learning]]></category>
            <dc:creator><![CDATA[NN_Ronin]]></dc:creator>
            <pubDate>Thu, 19 Nov 2026 15:51:04 GMT</pubDate>
            <atom:updated>2026-11-19T15:51:04.524Z</atom:updated>
            <content:encoded><![CDATA[<h3>Failure modes, a silent tensor layout bug, and lessons from 21+ ML-Agents runs.</h3><p><em>Stack: Unity 6000.2.5f1 · ML-Agents Release 23 (PPO + ICM Curiosity) · PyTorch / ONNX Runtime / Unity Sentis</em></p><blockquote><strong><em>Play Live Against the AI:</em></strong><em> Try our interactive Unity WebGL (Sentis) demo powered by the peak-scoring </em><em>trial_1005.onnx policy (Peak Score 48.29) and race side-by-side against the agent in your browser: </em><a href="https://huggingface.co/spaces/nnronin/AIUniRun"><em>https://huggingface.co/spaces/nnronin/AIUniRun</em></a></blockquote><h3>1. Environment &amp; Action Space Formulation (AIUniRun)</h3><p><strong>AIUniRun</strong> is a 2D endless-runner benchmark built in Unity where autonomous agents learn to clear gaps between platforms and avoid lethal hazards from pixel observations. To parallelize experience collection across diverse platform heights and obstacle layouts, the scene executes <strong>16 independent agents in a 4×4 spatial grid</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/524/1*RBMcgS4kWHoMp_6ij8gqsw.png" /><figcaption>Figure 1. Live 84×84 CameraSensor views across all 16 parallel arenas (4×4 grid), exposing agents simultaneously to randomized gap widths and hazard placements.</figcaption></figure><p><strong>Discrete Action Space (1 Branch, Size 2):</strong> Action 0 releases the jump button (Run); Action 1 depresses it (Jump).</p><ul><li><strong>Rising Edge (0 → 1, Jump Start):</strong> Initiates a jump impulse (jumpForce = 700f), capped at jumpCount &lt; 2 for double jumping.</li><li><strong>Falling Edge (1 → 0, Variable Jump Height):</strong> Attenuates positive vertical velocity (velocity *= 0.5f), enabling continuous-like jump height control via hold duration.</li><li><strong>Decision Cadence:</strong> DecisionPeriod = 3 physics ticks (FixedUpdate), holding the previous action across intermediate steps.</li></ul><h3>2. State Representation &amp; Reward Shaping</h3><p>Rather than relying exclusively on latent recurrence, our state pipeline pairs consecutive visual frames with optional low-dimensional kinematics so the Markov state captures both obstacle geometry and vertical momentum.</p><ul><li><strong>Visual State (obs_0):</strong> 84×84 RGB × 2 frame stack (6×84×84 tensor via CameraSensor with ObservationStacks = 2), providing instantaneous velocity cues directly in pixel space.</li><li><strong>Optional Vector State (obs_1, 3D Float):</strong> [Velocity.y / 15.0, IsGrounded, JumpCount], enabled in hybrid runs and omitted in visual-only ablations.</li><li><strong>Platform Progression Reward:</strong> Excludes the initial spawn platform (platformCount ≥ 2 &amp; landedFromJump) and grants 1.2 + 0.4 * ln(platformCount + 1) plus Score +1 upon each newly cleared platform.</li><li><strong>Cliff-Edge &amp; Step Regularization:</strong> Awards +0.2 for initiating the first jump inside a cliff-edge trigger zone, alongside a per-tick time penalty (-0.0005 / 3), a double-jump penalty (-0.01), and a death penalty (-1.0).</li><li><strong>PPO &amp; Curiosity Configuration:</strong> Trained with PPO (lr = 1e-4 linear decay, beta = 5e-3 linear decay, batch_size = 512, buffer_size = 20480, epsilon = 0.2, lambd = 0.95, num_epoch = 3, time_horizon = 64, nature_cnn + 2×256 MLP) plus an Intrinsic Curiosity Module (strength = 0.05). Recurrent variants add an LSTM (sequence_length = 64, memory_size = 128).</li></ul><h3>3. Six Empirical Failure Modes &amp; Engineering Lessons</h3><p>Across more than 20 logged runs spanning early reward prototypes to 50M-step experiments, six recurring failure patterns emerged in our TensorBoard diagnostics, source diffs, and profiler traces.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HhNZ3ln8axoZUMczg4fMQA.png" /><figcaption>Figure 2. (A) Survival bonus induces risk-averse stalling while balanced penalties climb steadily; (B) double-jump penalty miscalibration triggers 4× airtime exploitation; © cumulative reward diverges from true task Score.</figcaption></figure><h3>3.1 Survival Bonus (+) vs. Time Penalty (-)</h3><p>Granting a small positive survival bonus (+0.001 per step in run 20260526_1) actively penalized progress: the agent peaked at Score 0.45 before regressing to 0.31 because lingering safely on the first platform yielded reliable positive return without risking a cliff jump. An overly steep penalty (-0.001, run 20260526) rushed premature deaths, whereas attenuating the penalty to <strong>-0.0005</strong> (run 20260812) reached Score 1.07.</p><h3>3.2 Reward Hacking: Airtime Stalling &amp; Collider Exploitation</h3><ul><li><strong>Airtime Exploitation:</strong> Removing the double-jump penalty (0 in run 20260605) or making it overly punitive (-0.05 in run 20260604) inflated average Episode Length roughly 4× (to 162–187 steps vs. 46.3 under -0.02) while depressing actual platform Score to 0.39–0.58 — agents maximized hovering time rather than crossing gaps.</li><li><strong>Surface Grazing &amp; Spawn Farming:</strong> Iterative refinements to our platform collision and landing logic reflect repeated tightening against reward exploits: enforcing an upward contact normal check (normal.y &gt; 0.7f), requiring prior airborne state (landedFromJump), guarding re-triggers via a stepped flag, and gating rewards on platformCount ≥ 2.</li></ul><h3>3.3 Divergence Between Cumulative Reward and Task Score</h3><p>In early shaping runs, 20260514 posted a positive peak Cumulative Reward (+0.05) yet only scored 0.84. Conversely, 20260602 (Score 1.04) and 20260812 (Score 1.07) both achieved higher platform progression while recording negative peak returns (-0.53 and -0.26) due to accumulated step and death penalties. Always log a shaped-reward-free domain metric (Environment/Episode Score) as the primary evaluation criterion.</p><h3>3.4 Policy Entropy Collapse &amp; Observation I/O Flood (Run 20260904)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z5-JvUQEoZX06YuoGv07FA.png" /><figcaption>Figure 3. Run aiunilab_dist_reward20260904 diagnostics: (A) abrupt entropy collapse at 8.54M steps; (B) episode length drops 4.7×, flooding Python with reset observations and repeated external Ctrl+C interrupts; © 75.2% of runtime consumed by gRPC exchange and uncompressed tensor casting.</figcaption></figure><p>After climbing to Score 1.05 at 7.70M steps, run <strong>20260904</strong> suffered catastrophic entropy collapse at 8.54M steps (Policy/Entropy plummeted from 0.0215 at 8.53M to 0.0000 by 8.55M). Episode duration simultaneously collapsed from ~70 steps to 14.67 steps, multiplying reset throughput by ~4.7×. Because raw uncompressed frames kept streaming across the gRPC bridge, ML-Agents&#39; built-in profiler summary (14,386.6s total) shows communicator.exchange (51.9%) and _observation_to_np_array (23.3% across 398,142 calls) consuming <strong>75.2% of total wall-clock time</strong>, repeatedly tripping external Ctrl+C safety interrupts between 12.02M and 12.39M steps.</p><h3>3.5 Is Recurrence (LSTM) Necessary?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FWZd-WEL4t4lcOBFrjoltw.png" /><figcaption>Figure 4. Long-horizon (50M-configured) comparison: Feed-Forward run 20261012 broke out at 1M steps and reached Score 38.97 without recurrence, whereas LSTM runs 1013 and 1023 remained trapped below 57 steps for 20M–31.1M steps.</figcaption></figure><p><strong>No — recurrence is unnecessary here and increased optimization fragility.</strong> With ObservationStacks = 2 already encoding frame-to-frame motion, the environment is effectively Markovian. The strictly Feed-Forward policy (<strong>20261012</strong>) cleared the first cliff at 1.0M steps and reached <strong>peak Score 38.97 (EpLen 1,282.6)</strong>. While LSTM run <strong>20261005</strong> holds our highest raw score (48.29; ONNX inspection shows 3D vector obs_1 remained active), two comparable LSTM runs (<strong>1013</strong> and <strong>1023</strong>) suffered gradient and exploration stagnation at 52–57 steps across 20M–31.1M steps.</p><h3>3.6 Silent Rendering Failure Under — no-graphics</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*kWewdFk9pHDYjT_06CBjMw.png" /><figcaption>Figure 5. Actual observation tensors captured from the built Unity player. Passing — no-graphics feeds the network a constant 0.8039 uniform wall while GPU rendering delivers valid stacked RGB frames.</figcaption></figure><p>Early CLI runs (20260522 through 20260812) invoked Unity with --no-graphics. Without a graphics context, Unity cannot populate CameraSensor render targets—the Unity player log accumulated 398,232 lines of NullGfxDevice warnings, and Python received a constant scalar tensor (min = max = 0.8039), blinding visual policies entirely.</p><h3>4. Policy Rollout Analysis: Why Runs 1023 and 1013 Stagnated</h3><p>Below is a synchronized real-time capture of three representative ONNX policies evaluated inside the compiled Unity environment (each fed clean NCHW visual tensors), contrasting a successful runner against the two recurrent failure modes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*BHxTHwLyUqfXOLAwqWZboQ.gif" /><figcaption>Figure 6. Synchronized ONNX inference rollouts in Unity with live 28-step action timelines (blue = RUN, green = JUMP). Left: Feed-Forward 20261012 runs steadily and triggers timed jumps only at gaps and spikes. Center: 1023 (deterministic, det=0) never triggers a jump (Total Jumps: 0) and walks straight off the first cliff at step 39. Right: 1013 (stochastic) spams jumps indiscriminately (14 jumps in 59 steps) before missing a landing.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4zPY-NK-P5t0d2ybckM3GQ.png" /><figcaption>Figure 7. (A) Switching from a single 50M run to short 3M multi-seed runs enabled all tested seeds to break past the 60-step cliff threshold; (B) under max_steps = 50M, linear entropy coefficient beta remains at 0.00471 (94% of initial noise) at 3M steps.</figcaption></figure><p>Follow-up multi-seed ablation experiments explain why runs <strong>1023</strong> and <strong>1013</strong> remained flat for tens of millions of steps while short runs succeeded:</p><ul><li><strong>Coupled Entropy Regularization (beta) Decay:</strong> ML-Agents schedules beta linearly with step / max_steps. Setting max_steps = 50M kept beta at 0.00471 (94% of initial 0.005) at 3M steps—continually injecting high stochasticity that prevented recurrent policies from locking in fragile cliff-jump sequences.</li><li><strong>High Seed Variance &amp; Methodological Caveats:</strong> Fixing seeds in a 3M schedule yielded immediate breakouts (e.g., png_b64_s42 crossed the cliff at 390k steps, reaching EpLen 101.62 / Score 1.99, and all 9 screening seeds cleared EpLen ≥ 60 within 2.25M steps). Crucially, however, two confounding factors prevent attributing success to seed alone: (1) shrinking max_steps to 3M also decayed linear learning_rate to 1.92e-7 (stalling late fine-tuning), while c32/c16 variants co-varied time_horizon; and (2) binary inspection of the compiled executables showed that the earlier PNG-labeled build had actually been packaged with m_Compression = 0 (None), unlike the Oct 12 / Oct 13 PNG builds.</li></ul><h3>5. Key Takeaways for Practical Deep RL</h3><h3>5.1 Start from a Minimal Baseline (Frame-Stacked Image + Feed-Forward Policy)</h3><p>Combining raw pixels, physics vectors, curiosity bonuses, and LSTM memory simultaneously obscures whether stagnation stems from reward design, sensor glitches, or temporal credit assignment. Establishing a minimal <strong>frame-stacked CNN + MLP baseline (No LSTM)</strong> first — matching our 20261012 configuration — validates environment dynamics rapidly before adding recurrence or auxiliary complexity.</p><h3>5.2 Replace Monolithic 50M Runs with Short (3M) Multi-Seed Screening</h3><p>Even under identical hyperparameters, first-cliff breakout varied widely across random seeds (610k to 1,110k steps). Running <strong>3–5 independent seeds for 2M–3M steps</strong> to screen for policy commitment is far more compute-efficient than waiting days on a single 50M run stuck in a local optimum. When shortening max_steps for screening, decouple or lower beta explicitly rather than shrinking both learning_rate and beta via coupled linear decay.</p><h3>5.3 Audit Raw Observation Tensors End-to-End (None vs. PNG Layout Mismatch)</h3><p>Figure 8. Actual network tensors received by PyTorch. Left: Uncompressed None transmission exhibits periodic striped corruption from an HWC/NCHW stride mismatch. Right: Lossless PNG compression restores the true RGB scene and aligns Python training with Unity Sentis runtime inference.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/1*4wqq0uSuv12BEjSi0XtMjg.png" /><figcaption>Figure 8. Actual network tensors received by PyTorch. Left: Uncompressed None transmission exhibits periodic striped corruption from an HWC/NCHW stride mismatch. Right: Lossless PNG compression restores the true RGB scene and aligns Python training with Unity Sentis runtime inference.</figcaption></figure><p>In ML-Agents Release 23, Unity’s 1D tensor writer indexes buffers in <strong>NHWC</strong> order despite its (n, c, h, w) method signature, whereas Python&#39;s uncompressed receiver reshapes the flat buffer directly into <strong>NCHW</strong> without axis transposition:</p><pre># Python receiver: reshapes flat buffer directly as NCHW with no axis transpose<br>if obs.compression_type == COMPRESSION_TYPE_NONE:<br>    img = np.array(obs.float_data.data, dtype=np.float32)<br>    img = np.reshape(img, obs.shape)  # obs.shape == (6, 84, 84)<br>    return img</pre><blockquote><strong><em>Root-Cause Warning:</em></strong><em> Because of this silent NHWC-to-NCHW mismatch, policies trained on </em><em>CompressionType.None adapt to striped aliasing artifacts like &quot;kaleidoscope goggles&quot;—performing well during Python gRPC inference, only to panic (</em><em>P(jump) = 0.99999) when Unity Sentis passes uncorrupted NCHW tensors locally. </em><strong><em>Always dump Python&#39;s received observation tensors to image files during steps 1–10 before launching long training jobs.</em></strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fd9016b380e3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Teaching an AI to Play Chess on Ice (Part 3) — Executive Standings & Results Dashboard]]></title>
            <link>https://nnronin.medium.com/teaching-an-ai-to-play-chess-on-ice-part-3-executive-standings-results-dashboard-d50e78060b28?source=rss-f02be0ea9f77------2</link>
            <guid isPermaLink="false">https://medium.com/p/d50e78060b28</guid>
            <dc:creator><![CDATA[NN_Ronin]]></dc:creator>
            <pubDate>Tue, 10 Nov 2026 14:23:48 GMT</pubDate>
            <atom:updated>2026-11-12T05:21:10.075Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xA80jX7h_NvZ83SJzJyX2A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DQsw0KKjRA38bdHyWXVObg.png" /></figure><h3>1. Women’s 10-Nation League Standings (90 Games per Repr., 270 Games Total)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_WIyffXyqwpR7uW9jGnoqg.png" /></figure><p><em>The curling board can be represented in three different ways: DSV (Distance-Sorted Vector) turns the stones into a simple distance-ordered list, Grid CNN (Convolutional Neural Network) views the board as a 2D image-like grid, and SST (Stone Set Transformer) treats each stone as an individual object and learns the relationships between them.</em></p><p>Independent double round-robin leagues (18 games per team) across Distance-Sorted Vector (DSV), 2D Grid CNN, and Stone Set Transformer (SST).</p><pre>┌──────┬──────────────────────────┬──────────────────────────┬──────────────────────────┐<br>│ Rank │ DSV League (1D Vector)   │ Grid CNN League (2D Grid)│ SST League (Set Tx)      │<br>├──────┼──────────────────────────┼──────────────────────────┼──────────────────────────┤<br>│  1st │ SWE (11-2-5, +6, 24 pts) │ GER (8-6-4, +13, 22 pts) │ USA (9-8-1, +10, 26 pts) │<br>│  2nd │ GER (7-7-4,  +5, 21 pts) │ JPN (8-6-4,  +8, 22 pts) │ SCO (8-5-5,  +6, 21 pts) │<br>│  3rd │ CAN (5-10-3, +3, 20 pts) │ CAN (8-5-5,  +2, 21 pts) │ CAN (7-6-5,  +5, 20 pts) │<br>│  4th │ SUI (7-5-6,  +3, 19 pts) │ USA (9-1-8,  -1, 19 pts) │ SWE (8-3-7,  +3, 19 pts) │<br>│  5th │ USA (4-11-3, +0, 19 pts) │ SUI (7-4-7,  +2, 18 pts) │ ITA (5-8-5,  +0, 18 pts) │<br>│  6th │ SCO (7-4-7,  +1, 18 pts) │ SWE (6-6-6,  +0, 18 pts) │ SUI (7-4-7,  -1, 18 pts) │<br>│  7th │ KOR (5-8-5,  -3, 18 pts) │ KOR (6-6-6,  -4, 18 pts) │ KOR (5-8-5,  -2, 18 pts) │<br>│  8th │ ITA (4-7-7,  -4, 15 pts) │ SCO (7-4-7,  -5, 18 pts) │ NOR (4-7-7,  -4, 15 pts) │<br>│  9th │ JPN (4-5-9,  -5, 13 pts) │ ITA (5-4-9,  -4, 14 pts) │ JPN (3-7-8,  -7, 13 pts) │<br>│ 10th │ NOR (4-5-9,  -6, 13 pts) │ NOR (3-4-11,-11, 10 pts) │ GER (4-4-10,-10, 12 pts) │<br>└──────┴──────────────────────────┴──────────────────────────┴──────────────────────────┘</pre><p><strong>💡 Key Insight:</strong> Each representation crowned a different champion (SWE on DSV, GER on Grid, USA on SST). <strong>Canada (CAN)</strong> consistently took 3rd place across all three, while <strong>Korea (KOR)</strong> maintained an exact 18-point tally (50.0% win rate, 7th) across all three formats.</p><h3>2. Men’s 10-Nation League Standings (90 Games per Repr., 270 Games Total)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BbIC245oPsBl_qOqwLoy5g.png" /></figure><p>In the Men’s division, tactical styles aligned strongly with specific representations, triggering dramatic ranking shifts:</p><pre>┌──────┬──────────────────────────┬──────────────────────────┬──────────────────────────┐<br>│ Rank │ DSV League (1D Vector)   │ Grid CNN League (2D Grid)│ SST League (Set Tx)      │<br>├──────┼──────────────────────────┼──────────────────────────┼──────────────────────────┤<br>│  1st │ SWE (10-7-1, +14, 27 pts)│ CAN (13-4-1, +19, 30 pts)│ NOR (6-9-3,  +5, 21 pts) │<br>│  2nd │ USA (9-5-4,   +6, 23 pts)│ NOR (9-3-6,   +6, 21 pts)│ KOR (7-7-4,  +2, 21 pts) │<br>│  3rd │ NOR (7-7-4,   +4, 21 pts)│ GER (8-4-6,   +3, 20 pts)│ SCO (6-7-5,  +5, 19 pts) │<br>│  4th │ SUI (5-10-3,  +8, 20 pts)│ JPN (7-5-6,   +6, 19 pts)│ SWE (6-7-5,  -1, 19 pts) │<br>│  5th │ CAN (5-9-4,   +4, 19 pts)│ SCO (6-6-6,   +0, 18 pts)│ SUI (7-4-7,  +1, 18 pts) │<br>│  6th │ ITA (7-5-6,   -1, 19 pts)│ SUI (6-5-7,   +1, 17 pts)│ CAN (5-7-6,  +5, 17 pts) │<br>│  7th │ SCO (6-5-7,   +0, 17 pts)│ USA (7-2-9,   -2, 16 pts)│ JPN (3-11-4, -1, 17 pts) │<br>│  8th │ GER (5-5-8,   -1, 15 pts)│ ITA (4-8-6,   -2, 16 pts)│ USA (4-9-5,  -3, 17 pts) │<br>│  9th │ JPN (2-7-9,  -11, 11 pts)│ KOR (5-4-9,  -17, 14 pts)│ GER (3-10-5, -5, 16 pts) │<br>│ 10th │ KOR (2-4-12, -23,  8 pts)│ SWE (4-1-13, -14,  9 pts)│ ITA (2-11-5, -8, 15 pts) │<br>└──────┴──────────────────────────┴──────────────────────────┴──────────────────────────┘</pre><p><strong>💡 Key Insight:</strong> On Grid CNN, hitting-heavy <strong>Canada (CAN)</strong> dominated with 30 pts (83.3% win rate). Meanwhile, <strong>Korea Men (KOR_MEN)</strong> — which finished 10th (8 pts) on DSV — vaulted to <strong>tied-1st/2nd place on SST (21 pts, +2 diff)</strong>, proving that relational set attention unlocks its high-placement defensive style.</p><h3>3. Representation Champions Clash (Each Board’s #1 Teams, 12 Games)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bHiXCX_3evdJrZfXEV9mWQ.png" /></figure><p>3-team double round-robin between the winners of each representation league using their native board representations:</p><pre>┌──────────┬──────┬────────────────────────┬──────────┬──────┬────┬────┬────┬──────┬──────┬──────┬──────┐<br>│ Division │ Rank │ Agent (League Winner)  │ Repr.    │ Games│  W │  D │  L │  PF  │  PA  │ Diff │  Pts │<br>├──────────┼──────┼────────────────────────┼──────────┼──────┼────┼────┼────┼──────┼──────┼──────┼──────┤<br>│ WOMEN    │  1st │ GER_WOMEN (Grid #1)    │ Grid CNN │    4 │  3 │  1 │  0 │   12 │    7 │   +5 │    7 │<br>│ WOMEN    │  2nd │ USA_WOMEN (SST  #1)    │ SST      │    4 │  2 │  0 │  2 │   10 │    9 │   +1 │    4 │<br>│ WOMEN    │  3rd │ SWE_WOMEN (DSV  #1)    │ DSV      │    4 │  0 │  1 │  3 │    8 │   14 │   -6 │    1 │<br>├──────────┼──────┼────────────────────────┼──────────┼──────┼────┼────┼────┼──────┼──────┼──────┼──────┤<br>│ MEN      │  1st │ NOR_MEN   (SST  #1)    │ SST      │    4 │  3 │  1 │  0 │   13 │    8 │   +5 │    7 │<br>│ MEN      │  2nd │ CAN_MEN   (Grid #1)    │ Grid CNN │    4 │  2 │  1 │  1 │   13 │    9 │   +4 │    5 │<br>│ MEN      │  3rd │ SWE_MEN   (DSV  #1)    │ DSV      │    4 │  0 │  0 │  4 │   10 │   19 │   -9 │    0 │<br>└──────────┴──────┴────────────────────────┴──────────┴──────┴────┴────┴────┴──────┴──────┴──────┴──────┘</pre><p><strong>💡 Key Insight:</strong> <strong>GER_WOMEN (Grid CNN)</strong> and <strong>NOR_MEN (SST)</strong> both finished undefeated (3W 1D, 7 pts) to become their divisions’ cross-representation champions. DSV champions SWE_WOMEN (0–1–3) and SWE_MEN (0–0–4) won zero games against them.</p><h3>4. Partial Champions (52.3%) vs. Unified Full Champions (100.0%)</h3><p>Head-to-head match play between Part 2’s partial data champions and Part 3’s unified full champions:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e1epZELEAThKqszwVouE_w.png" /></figure><p><strong>💡 Key Insight:</strong> When paired with spatial (Grid CNN) or relational (SST) representations, complete 432K dataset models decisively defeated the Partial champions in both divisions.</p><h3>5. 432K Overall Grand Final (Cross-Division Unified Championship)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a9M6ys6WcGMj-D8iV_X0og.png" /></figure><p>Women’s Unified Champion `GER_WOMEN (Grid CNN)` vs. Men’s Unified Champion `NOR_MEN (SST)` in a two-game 10-end Grand Final:</p><pre>[Table 5-1. Grand Final Match Scoreboard]<br>┌────────┬──────────────────────────────────────┬──────────────┬──────────────┬────────┬──────────────┐<br>│  Game  │ Matchup &amp; Team (*NoHammer, H=Hammer) │ Front (1~5E) │ Back (6~10E) │ Final  │ Match Result │<br>├────────┼──────────────────────────────────────┼──────────────┼──────────────┼────────┼──────────────┤<br>│ Game 1 │GER_WOMEN (Grid CNN, *NoHammer)       │  0-0-0-1-0   │  0-0-1-0-0   │ 2 pts  │ Lost (2 : 3) │<br>│        │NOR_MEN   (SST, H=Hammer)             │  0-1-0-0-0   │  1-0-0-1-0   │ 3 pts  │ Won  (3 : 2) │<br>├────────┼──────────────────────────────────────┼──────────────┼──────────────┼────────┼──────────────┤<br>│ Game 2 │NOR_MEN   (SST, *NoHammer)            │  0-0-0-1-0   │  0-0-0-0-1   │ 2 pts  │ Tie  (2 : 2) │<br>│        │GER_WOMEN (Grid CNN, H=Hammer)        │  0-1-0-0-0   │  0-0-1-0-0   │ 2 pts  │ Tie  (2 : 2) │<br>└────────┴──────────────────────────────────────┴──────────────┴──────────────┴────────┴──────────────┘</pre><pre>[Table 5-2. Series Standings &amp; Tactical Shot Breakdown]<br>┌───────────┬────────────────────────┬──────────┬───────────────┬──────────────┬─────────────┬─────────────┬──────────────┐<br>│Final Rank │ Agent (Division Rank)  │  Repr.   │ Series Record │  Agg. Score  │ Hit &amp; Roll  │   Takeout   │ Draws/Guards │<br>├───────────┼────────────────────────┼──────────┼───────────────┼──────────────┼─────────────┼─────────────┼──────────────┤<br>│  Winner   │NOR_MEN   (Men&#39;s #1)    │   SST    │   1W 1D 0L    │ 5 pts (3, 2) │   74 (46.3%)│   50 (31.3%)│    35 (21.9%)│<br>│ Runner-Up │GER_WOMEN (Women&#39;s #1)  │ Grid CNN │   0W 1D 1L    │ 4 pts (2, 2) │   83 (51.9%)│   53 (33.1%)│    21 (13.1%)│<br>└───────────┴────────────────────────┴──────────┴───────────────┴──────────────┴─────────────┴─────────────┴──────────────┘</pre><p><strong>💡 Key Insight:</strong> Against Germany’s aggressive hitting barrage (85.0%), Norway’s balanced tactical play (77.5% hitting, 21.9% draw/freeze) and disciplined hammer management (intentional blank in 9th end to score in the 10th) secured the <strong>5:4 aggregate victory</strong>.</p><h3>6. Appendix: 10-Nation Shot Selection Style Index Rankings</h3><p>Style Index = Placement Ratio (Guard + Draw) ÷ Hitting Ratio (Takeout + Peel) across 2,500 test boards:</p><pre>┌──────┬─────────────────────────┬─────────────┬──────────────┬─────────────┬─────────────┬────────────────────────┐<br>│ Rank │   Country &amp; Division    │ Train Shots │ Label Place% │ Label Hit%  │ Style Index │    Tactical Profile    │<br>├──────┼─────────────────────────┼─────────────┼──────────────┼─────────────┼─────────────┼────────────────────────┤<br>│ [Women&#39;s Division (5 Nations)]                                                                                   │<br>├──────┼─────────────────────────┼─────────────┼──────────────┼─────────────┼─────────────┼────────────────────────┤<br>│ 1st  │KOR_WOMEN (Korea)        │        6,985│         47.6%│        24.1%│        1.974│   Placement-Leaning    │<br>│ 2nd  │SCO_WOMEN (Scotland)     │       10,153│         45.0%│        24.9%│        1.806│   Placement-Leaning    │<br>│ 3rd  │CAN_WOMEN (Canada)       │        8,545│         44.7%│        25.4%│        1.762│        Balanced        │<br>│ 4th  │SWE_WOMEN (Sweden)       │       11,911│         43.9%│        26.0%│        1.690│        Balanced        │<br>│ 5th  │SUI_WOMEN (Switzerland)  │       11,164│         41.7%│        27.6%│        1.509│ High Hitting (Lowest)  │<br>│ [Men&#39;s Division (4 Nations)]                                                                                     │<br>├──────┼─────────────────────────┼─────────────┼──────────────┼─────────────┼─────────────┼────────────────────────┤<br>│ 1st  │KOR_MEN   (Korea)        │        5,303│         50.7%│        20.9%│        2.426│ Highest Placement (#1) │<br>│ 2nd  │SUI_MEN   (Switzerland)  │       12,041│         46.2%│        24.0%│        1.924│        Balanced        │<br>│ 3rd  │SWE_MEN   (Sweden)       │       12,199│         46.1%│        24.2%│        1.909│        Balanced        │<br>│ 4th  │CAN_MEN   (Canada)       │        8,226│         44.4%│        23.3%│        1.904│        Balanced        │<br>└──────┴─────────────────────────┴─────────────┴──────────────┴─────────────┴─────────────┴────────────────────────┘</pre><p><strong>💡 Key Insight:</strong> Korea showed the highest placement tendency across both divisions (Men 2.426, Women 1.974), whereas Switzerland Women favored the most aggressive takeout approach (1.509).</p><h3>7. Appendix: Representation Benchmark Offline Accuracy (18,037 Test Shots)</h3><p>14-Class accuracy, Action RMSE, and inference latency across 18,037 test shots by game scenario:</p><pre>[Table 7-1. Scenario-by-Scenario 14-Class Intent Accuracy Matrix]<br>┌────────────────────────────┬─────────┬────────────────┬───────────────┬─────────────────────┬─────────────────────┬───────────────┐<br>│  Scenario (Curling Phase)  │ Samples │DSV (1D Vector) │ SST (Set Tx)  │ Grid CNN (2D Grid)  │ Grid vs DSV Margin  │  Best Model   │<br>├────────────────────────────┼─────────┼────────────────┼───────────────┼─────────────────────┼─────────────────────┼───────────────┤<br>│0. Overall Benchmark        │   18,037│          29.46%│         32.23%│               35.82%│    +6.36%p Lead     │ Grid CNN (#1) │<br>│1. Opening (Shots 1 to 4)   │    5,007│          36.89%│         37.05%│               39.86%│    +2.97%p Lead     │ Grid CNN (#1) │<br>│2. House Threat (Opp. In)   │   12,953│          25.93%│         30.04%│               33.40%│    +7.47%p Lead     │ Grid CNN (#1) │<br>│3. Guard Midgame (In FGZ)   │   13,740│          26.81%│         30.47%│               34.10%│    +7.29%p Lead     │ Grid CNN (#1) │<br>│4. Multi-Stone Clutter      │    3,001│          21.33%│         28.66%│               31.66%│ +10.33%p Dominance  │ Grid CNN (#1) │<br>│5. Clutch (Ends 9~10)       │    1,696│          31.66%│         32.13%│               37.21%│    +5.55%p Lead     │ Grid CNN (#1) │<br>└────────────────────────────┴─────────┴────────────────┴───────────────┴─────────────────────┴─────────────────────┴───────────────┘</pre><pre>[Table 7-2. Representation Macro Performance &amp; Computational Efficiency]<br>┌────────────────────┬───────────────────────────┬───────────────┬──────────────┬─────────────┬───────────────────────────┐<br>│Representation Model│Underlying State Structure │ 14-Class Acc. │ 7-Macro Acc. │ Action RMSE │   Latency (Single Shot)   │<br>├────────────────────┼───────────────────────────┼───────────────┼──────────────┼─────────────┼───────────────────────────┤<br>│DSV (Dense Vector)  │1D Flat Feature Vector     │         29.46%│        49.50%│       0.4887│   0.027 ms (Ultra Fast)   │<br>│SST (Set Tx)        │Permutation-Invariant Set  │         32.23%│        52.23%│       0.4785│      0.151 ms (Fast)      │<br>│Grid CNN (2D Grid)  │3-Channel Spatial Raster   │         35.82%│        52.39%│       0.4712│0.889 ms (Real-time Ready) │<br>└────────────────────┴───────────────────────────┴───────────────┴──────────────┴─────────────┴───────────────────────────┘</pre><p><strong>💡 Key Insight:</strong> Grid CNN swept #1 ranking across all 6 scenarios, reaching an overwhelming <strong>+10.33%p accuracy advantage in multi-stone clutter (31.66% vs 21.33%)</strong> where flat vectors failed to model stone-to-stone occlusion.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d50e78060b28" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Teaching an AI to Play Chess on Ice (Part 3): The Full 432K-Shot Dataset, 540-Game Leagues Across…]]></title>
            <link>https://nnronin.medium.com/teaching-an-ai-to-play-chess-on-ice-part-3-the-full-432k-shot-dataset-540-game-leagues-across-afdbd939f3f5?source=rss-f02be0ea9f77------2</link>
            <guid isPermaLink="false">https://medium.com/p/afdbd939f3f5</guid>
            <dc:creator><![CDATA[NN_Ronin]]></dc:creator>
            <pubDate>Tue, 10 Nov 2026 05:59:49 GMT</pubDate>
            <atom:updated>2026-11-10T05:59:49.085Z</atom:updated>
            <content:encoded><![CDATA[<h3>Teaching an AI to Play Chess on Ice (Part 3): The Full 432K-Shot Dataset, 540-Game Leagues Across Three Representations, and Partial vs. Full Showdowns</h3><p><em>We have completed 100% of the physics inverse-fitting across all 432,139 shots from 51 international championship results books. With the addition of the entire World Women’s Curling Championship (WWCC) archive and the later World Men’s Curling Championship (WMCC) seasons — which were absent from Part 2’s 52.3% dataset — our quality-controlled training corpus grew by 80.7%, from 181,456 to 327,880 shots. In this post, we re-evaluate our three board representations (DSV, Grid CNN, and SST), run independent 10-nation simulation leagues for each representation (540 games in total), and test Partial-Data (52.3%) models directly against Full-Data (100.0%) models.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VhUuZoEOJfLdC43u7QONJQ.png" /></figure><blockquote><strong><em>Previously in Part 1 &amp; Part 2</em></strong><em><br>In </em><strong><em>Part 1</em></strong><em>, we started with official competition PDFs (ResultsBooks) that record only where stones come to rest, and used a physics simulator to inverse-fit each shot’s initial velocity (</em><em>v), angle (</em><em>θ), and curl direction (</em><em>CW/CCW).<br>In </em><strong><em>Part 2</em></strong><em>, using the first 52.3% of inverse-fitted shots (225,982 raw; 181,456 valid), we built a 14-intent candidate-generating network, an Expected Win Probability (EWP) physics lookahead planner, and a country- and division-conditioned model (</em><em>CountryTop2Planner), culminating in a 180-game 10-nation simulation league.<br>In </em><strong><em>Part 3 (this post)</em></strong><em>, with the remaining 47.7% of shots now inverse-fitted, we examine how models retrained on the complete dataset behave across different board representations and head-to-head matchups.</em></blockquote><h3>0. Completing the Full Dataset (From 52.3% to 100.0%)</h3><p>Running across 8 parallel worker processes, our physics inverse-fitting pipeline has finished processing the entire target corpus: <strong>51 championship results books, 3,012 games, 27,017 ends, and 432,139 shots (100.0%)</strong>.</p><p>Because tournaments were processed in alphabetical order in Part 2, the World Women’s Curling Championship (WWCC, 2015–2026) had not been reached at all, and the World Men’s Curling Championship (WMCC) was covered only through early 2018. The completed dataset adds <strong>all 107,128 WWCC shots</strong> alongside <strong>99,029 additional WMCC shots from 2018–2024</strong>.</p><pre>┌──────────────────────────────────┬────────────┬────────────┬────────────┬──────────────────────────┐<br>│ Championship Series              │ Total Shots│ Part 2     │ Part 3     │ Coverage Status          │<br>├──────────────────────────────────┼────────────┼────────────┼────────────┼──────────────────────────┤<br>│ ECC  (European, 2014–2025)       │    123,138 │    123,138 │    123,138 │ Complete                 │<br>│ OWG  (Winter Olympics, 2010–2026)│     44,468 │     44,468 │     44,468 │ Complete                 │<br>│ PCCC (Pan Continental, 2022–2025)│     29,332 │     29,332 │     29,332 │ Complete                 │<br>│ WMCC (World Men&#39;s, 2014–2024)    │    128,073 │     29,044 │    128,073 │ Complete (+99,029 added) │<br>│ WWCC (World Women&#39;s, 2015–2026)  │    107,128 │          0 │    107,128 │ Newly added (+107,128)   │<br>├──────────────────────────────────┼────────────┼────────────┼────────────┼──────────────────────────┤<br>│ Total                            │    432,139 │    225,982 │    432,139 │ 52.3% -&gt; 100.0% Complete │<br>└──────────────────────────────────┴────────────┴────────────┴────────────┴──────────────────────────┘</pre><h3>Physics Quality Control (QC) and Dataset Splits</h3><p>Out of all 432,139 shots, <strong>327,880 valid shots (91.84% solve rate)</strong> passed our physics quality thresholds (maximum stone position error ≤ 0.30 m and exact stone count match) and were labeled into 14 tactical intents. Compared to Part 2’s 181,456 valid shots, this is an increase of <strong>146,424 shots (+80.7%)</strong>.</p><ul><li><strong>Training Split:</strong> 262,277 shots (524,554 effective samples with left-right symmetry augmentation)</li><li><strong>Validation Split:</strong> 32,557 shots</li><li><strong>Test Split:</strong> 33,046 shots (retaining Part 2’s 18,037-shot test games while adding held-out games from the newly added tournaments)</li></ul><p>With the inclusion of the WWCC archive, the division distribution is now evenly balanced at <strong>165,263 Men’s shots (50.4%) and 162,617 Women’s shots (49.6%)</strong>, with zero UNKNOWN tags. Sample counts for key nations increased substantially:</p><ul><li><strong>Korea (KOR):</strong> Women’s 8,776 shots (2.8× Part 2), Men’s 6,640 shots (3.5×) — 15,416 total</li><li><strong>Canada (CAN):</strong> Women’s 10,518 shots, Men’s 10,969 shots — 21,487 total</li><li><strong>Switzerland (SUI):</strong> Women’s 14,353 shots, Men’s 14,668 shots — 29,021 total</li><li><strong>Sweden (SWE):</strong> Women’s 14,472 shots, Men’s 14,789 shots — 29,261 total</li></ul><h3>1. Re-evaluating National Shot Selection Tendencies</h3><p>In Part 2, we measured each nation’s Style Index — defined as <strong>Placement Ratio [Guard + Draw] ÷ Hitting Ratio [Takeout + Peel]</strong> — without any World Women’s Championship games. After adding 107K WWCC shots and 99K WMCC shots, we re-measured the Style Index both in the ground-truth training labels and in the neural policy’s predictions across 2,500 identical test boards.</p><pre>┌────────────────────┬────────────┬──────────────┬──────────────┬────────────┬────────────┐<br>│ Country_Division   │ Train Shots│ Label Place% │ Label Hit%   │ Label Idx  │ Model Idx  │<br>├────────────────────┼────────────┼──────────────┼──────────────┼────────────┼────────────┤<br>│ KOR_WOMEN (Korea)  │      6,985 │        47.6% │        24.1% │      1.974 │      2.172 │<br>│ SCO_WOMEN (Scot.)  │     10,153 │        45.0% │        24.9% │      1.806 │      2.003 │<br>│ CAN_WOMEN (Canada) │      8,545 │        44.7% │        25.4% │      1.762 │      2.077 │<br>│ SWE_WOMEN (Sweden) │     11,911 │        43.9% │        26.0% │      1.690 │      2.045 │<br>│ SUI_WOMEN (Switz.) │     11,164 │        41.7% │        27.6% │      1.509 │      1.907 │<br>├────────────────────┼────────────┼──────────────┼──────────────┼────────────┼────────────┤<br>│ KOR_MEN   (Korea)  │      5,303 │        50.7% │        20.9% │      2.426 │      2.315 │<br>│ SUI_MEN   (Switz.) │     12,041 │        46.2% │        24.0% │      1.924 │      1.954 │<br>│ SWE_MEN   (Sweden) │     12,199 │        46.1% │        24.2% │      1.909 │      1.968 │<br>│ CAN_MEN   (Canada) │      8,226 │        44.4% │        23.3% │      1.904 │      1.982 │<br>└────────────────────┴────────────┴──────────────┴──────────────┴────────────┴────────────┘</pre><p>In the Women’s division, the ground-truth ordering of <strong>Korea (placement-oriented, 1.974) &gt; Scotland (1.806) &gt; Canada (1.762) &gt; Sweden (1.690) &gt; Switzerland (hitting-oriented, 1.509)</strong> held after integrating the World Championship archives. Swapping country tokens on the exact same 2,500 test boards likewise produced the highest placement index for Korea (2.172) and the lowest for Switzerland (1.907).</p><h3>2. Re-evaluating Three Board Representations: Offline Accuracy and Controlled Matches</h3><p>We retrained all three board state encoders on the full dataset: <strong>DSV (Distance-Sorted 64D Vector + Residual MLP, ~181K parameters)</strong>, <strong>Grid CNN (32×64 6-channel CoordConv Grid, ~1,419K parameters)</strong>, and <strong>SST (16×5 Stone Set Transformer, ~295K parameters)</strong>.</p><h3>2.1 Offline Classification Accuracy Across Game Scenarios</h3><p>To compare directly against Part 2, we evaluated all three models on the 18,037-shot benchmark across Overall and five tactical scenarios (Opening, House Threat, Guard Midgame, Multi-Stone Clutter, and Clutch), measuring 14-Class accuracy, 7-Macro accuracy (merging CW/CCW curl directions into 7 shot families), continuous Action RMSE, and single-shot inference latency.</p><pre>┌───────────────────────────────┬──────────┬──────────┬──────────┬───────────┬──────────┐<br>│ Scenario (Sample Count)       │ Model    │ 14-Class │ 7-Macro  │ Act. RMSE │ Latency  │<br>├───────────────────────────────┼──────────┼──────────┼──────────┼───────────┼──────────┤<br>│ 0. Overall (18,037)           │ DSV      │   29.46% │   49.50% │    0.4887 │ 0.027 ms │<br>│                               │ SST      │   32.23% │   52.23% │    0.4785 │ 0.151 ms │<br>│                               │ Grid CNN │   35.82% │   52.39% │    0.4712 │ 0.889 ms │<br>├───────────────────────────────┼──────────┼──────────┼──────────┼───────────┼──────────┤<br>│ 1. Opening (5,007)            │ DSV      │   36.89% │   62.65% │    0.2709 │ 0.026 ms │<br>│    (Shots 1 to 4)             │ SST      │   37.05% │   63.43% │    0.2681 │ 0.151 ms │<br>│                               │ Grid CNN │   39.86% │   64.01% │    0.2585 │ 0.877 ms │<br>├───────────────────────────────┼──────────┼──────────┼──────────┼───────────┼──────────┤<br>│ 2. House Threat (12,953)      │ DSV      │   25.93% │   43.33% │    0.5856 │ 0.027 ms │<br>│    (Opponent stone in house)  │ SST      │   30.04% │   46.60% │    0.5725 │ 0.152 ms │<br>│                               │ Grid CNN │   33.40% │   46.58% │    0.5656 │ 0.893 ms │<br>├───────────────────────────────┼──────────┼──────────┼──────────┼───────────┼──────────┤<br>│ 3. Guard Midgame (13,740)     │ DSV      │   26.81% │   45.47% │    0.5095 │ 0.027 ms │<br>│    (Guards present in FGZ)    │ SST      │   30.47% │   48.69% │    0.4964 │ 0.152 ms │<br>│                               │ Grid CNN │   34.10% │   48.60% │    0.4890 │ 0.893 ms │<br>├───────────────────────────────┼──────────┼──────────┼──────────┼───────────┼──────────┤<br>│ 4. Multi-Stone Clutter (3,001)│ DSV      │   21.33% │   36.89% │    0.5979 │ 0.028 ms │<br>│    (6+ stones in play)        │ SST      │   28.66% │   42.39% │    0.5794 │ 0.153 ms │<br>│                               │ Grid CNN │   31.66% │   43.45% │    0.5815 │ 0.908 ms │<br>├───────────────────────────────┼──────────┼──────────┼──────────┼───────────┼──────────┤<br>│ 5. Clutch (1,696)             │ DSV      │   31.66% │   52.12% │    0.4542 │ 0.027 ms │<br>│    (Ends 9–10, diff &lt;= 2)     │ SST      │   32.13% │   53.95% │    0.4517 │ 0.152 ms │<br>│                               │ Grid CNN │   37.21% │   52.59% │    0.4489 │ 0.889 ms │<br>└───────────────────────────────┴──────────┴──────────┴──────────┴───────────┴──────────┘</pre><p>Overall 14-Class accuracy rose across all three representations compared to Part 2 (<strong>DSV 28.50% → 29.46%, SST 30.48% → 32.23%, Grid CNN 34.22% → 35.82%</strong>). In Multi-Stone Clutter (6+ stones on the sheet), the gap between Grid CNN (31.66%) and DSV (21.33%) reached <strong>10.33 percentage points</strong>. When only a few stones are in play, a 1D distance-sorted vector captures most of the state; as guards and house stones accumulate, 2D spatial convolutions and set attention better resolve occlusion and angles of entry.</p><h3>2.2 Controlled Comparison and Head-to-Head Matches Under KOR_WOMEN</h3><p>In Part 2, when all three representations were conditioned on KOR_WOMEN and played a 6-game double round-robin (alternating hammer), every pairing split 1W–1L (<strong>SST 6:5 DSV, DSV 7:6 Grid CNN, Grid CNN 7:6 SST</strong>). With Korean Women&#39;s training data expanded 2.8× (to 8,776 valid shots), we repeated both the offline breakdown and the 6-game head-to-head series.</p><h4>(1) Offline Accuracy on KOR_WOMEN Test Shots (791 Samples)</h4><pre>┌───────────────────────────────┬──────────┬──────────┬──────────┬───────────┬──────────┐<br>│ KOR_WOMEN Scenario (Samples)  │ Model    │ 14-Class │ 7-Macro  │ Act. RMSE │ Style Idx│<br>├───────────────────────────────┼──────────┼──────────┼──────────┼───────────┼──────────┤<br>│ 0. Overall (791)              │ DSV      │   28.82% │   49.05% │    0.5547 │    1.916 │<br>│                               │ SST      │   30.59% │   50.06% │    0.5404 │    1.832 │<br>│                               │ Grid CNN │   35.02% │   52.84% │    0.5358 │    1.522 │<br>├───────────────────────────────┼──────────┼──────────┼──────────┼───────────┼──────────┤<br>│ 1. Opening (221)              │ DSV      │   36.20% │   65.61% │    0.2829 │        - │<br>│                               │ SST      │   39.37% │   64.71% │    0.2767 │        - │<br>│                               │ Grid CNN │   37.56% │   66.06% │    0.2772 │        - │<br>├───────────────────────────────┼──────────┼──────────┼──────────┼───────────┼──────────┤<br>│ 2. House Threat (527)         │ DSV      │   24.48% │   41.37% │    0.6892 │        - │<br>│                               │ SST      │   26.57% │   42.69% │    0.6677 │        - │<br>│                               │ Grid CNN │   30.74% │   44.40% │    0.6655 │        - │<br>├───────────────────────────────┼──────────┼──────────┼──────────┼───────────┼──────────┤<br>│ 3. Guard Midgame (581)        │ DSV      │   24.96% │   44.06% │    0.5502 │        - │<br>│                               │ SST      │   27.19% │   45.09% │    0.5317 │        - │<br>│                               │ Grid CNN │   32.01% │   48.19% │    0.5234 │        - │<br>├───────────────────────────────┼──────────┼──────────┼──────────┼───────────┼──────────┤<br>│ 4. Multi-Stone Clutter (135)  │ DSV      │   15.56% │   30.37% │    0.6885 │        - │<br>│                               │ SST      │   23.70% │   40.74% │    0.6775 │        - │<br>│                               │ Grid CNN │   29.63% │   44.44% │    0.6781 │        - │<br>├───────────────────────────────┼──────────┼──────────┼──────────┼───────────┼──────────┤<br>│ 5. Clutch (60)                │ DSV      │   26.67% │   58.33% │    0.4411 │        - │<br>│                               │ SST      │   26.67% │   56.67% │    0.4033 │        - │<br>│                               │ Grid CNN │   43.33% │   61.67% │    0.4042 │        - │<br>└───────────────────────────────┴──────────┴──────────┴──────────┴───────────┴──────────┘</pre><h4>(2) 6-Game Head-to-Head Matchup Under KOR_WOMEN and Situational Analysis</h4><p>Holding the conditioning token fixed at KOR_WOMEN, the three representations played two 10-end games per pairing (alternating hammer, 6 games / 60 ends in total):</p><pre>┌───────────────────────┬─────────────────────┬─────────────────────┬──────────────────┬──────────────┐<br>│ Matchup Pairing       │ Game 1 (No-H : Ham) │ Game 2 (No-H : Ham) │ 2-Game Aggregate │ Series Result│<br>├───────────────────────┼─────────────────────┼─────────────────────┼──────────────────┼──────────────┤<br>│ DSV vs Grid CNN       │ DSV 1 : 2 Grid CNN  │ Grid CNN 2 : 2 DSV  │ DSV 3 : 4 Grid   │ Grid 1W 1D   │<br>│ SST vs DSV            │ SST 2 : 2 DSV       │ DSV 2 : 5 SST       │ SST 7 : 4 DSV    │ SST  1W 1D   │<br>│ Grid CNN vs SST       │ Grid CNN 1 : 2 SST  │ SST 2 : 4 Grid CNN  │ Grid 5 : 4 SST   │ 1W 1L(Grid+1)│<br>└───────────────────────┴─────────────────────┴─────────────────────┴──────────────────┴──────────────┘</pre><pre>┌──────┬──────────┬────────┬──────┬──────┬──────┬──────┬──────┬────────┬────────┬─────────────────────┐<br>│ Rank │ Model    │ Games  │  W   │  D   │  L   │  PF  │  PA  │  Diff  │  Win%  │ Multi-Pt Hammer(2+) │<br>├──────┼──────────┼────────┼──────┼──────┼──────┼──────┼──────┼────────┼────────┼─────────────────────┤<br>│  1st │ Grid CNN │   4    │  2   │  1   │  1   │  9   │  7   │   +2   │  62.5% │ 1 of 20 ends (5.0%) │<br>│  2nd │ SST      │   4    │  2   │  1   │  1   │  11  │  9   │   +2   │  62.5% │ 1 of 19 ends (5.3%) │<br>│  3rd │ DSV      │   4    │  0   │  2   │  2   │  7   │  11  │   -4   │  25.0% │ 0 of 21 ends (0.0%) │<br>└──────┴──────────┴────────┴──────┴──────┴──────┴──────┴──────┴────────┴────────┴─────────────────────┘</pre><p>Retraining on the full dataset broke Part 2’s three-way tie, leaving <strong>DSV winless at 0W–2D–2L</strong>. Play-by-play logs highlight two situational differences:</p><ol><li><strong>Shot Selection in Cluttered Houses (≥ 3 Stones in the House):</strong> In its series against SST, whenever three or more stones accumulated in the house, DSV attempted 6 Promotion shots but struggled to distinguish blocked guard lanes from open ones, repeatedly jamming onto its own front stones. In the same cluttered situations, Grid CNN mixed open-lane Takeouts (7), Hit-and-Rolls (5), and Promotions (3), while SST used Freezes (3) and Hit-and-Rolls (5) to neutralize opponent counters.</li><li><strong>10th-End Multi-Point Hammer Conversion:</strong> Across 21 hammer ends in 4 games, DSV never scored 2 or more points in an end (0.0%). By contrast, SST broke a 2:2 tie in the 10th end of Game 2 against DSV with a <strong>3-point hammer conversion (winning 5:2)</strong>, and Grid CNN broke a 2:2 tie in the 10th end of Game 2 against SST with a <strong>2-point hammer conversion (winning 4:2)</strong> to take first place on head-to-head aggregate score (5:4).</li></ol><h3>3. Ten-Nation Simulation Leagues Across All Three Representations (540 Games)</h3><p>To test whether board representations also shift full league standings and tactical matchups across nations, we ran the <strong>10-nation double round-robin simulation league (90 Women’s games + 90 Men’s games = 180 games)</strong> independently for <strong>DSV, Grid CNN, and SST</strong>. Combined, this comprises <strong>540 full 10-end games (5,400 ends)</strong>.</p><h3>3.1 Women’s 10-Nation League Comparison (90 Games per Representation, 270 Games Total)</h3><p>In Part 2 (52.3% data, 0 WWCC games), KOR_WOMEN finished 1st on DSV with 20 points (9W–2D–7L). With the full WWCC archive integrated, each board representation produced a different league leader:</p><pre>┌──────┬──────────────────────────┬──────────────────────────┬──────────────────────────┐<br>│ Rank │ DSV League (1D Vector)   │ Grid CNN League (2D Grid)│ SST League (Set Tx)      │<br>├──────┼──────────────────────────┼──────────────────────────┼──────────────────────────┤<br>│  1st │ SWE (11-2-5, +6, 24 pts) │ GER (8-6-4, +13, 22 pts) │ USA (9-8-1, +10, 26 pts) │<br>│  2nd │ GER (7-7-4,  +5, 21 pts) │ JPN (8-6-4,  +8, 22 pts) │ SCO (8-5-5,  +6, 21 pts) │<br>│  3rd │ CAN (5-10-3, +3, 20 pts) │ CAN (8-5-5,  +2, 21 pts) │ CAN (7-6-5,  +5, 20 pts) │<br>│  4th │ SUI (7-5-6,  +3, 19 pts) │ USA (9-1-8,  -1, 19 pts) │ SWE (8-3-7,  +3, 19 pts) │<br>│  5th │ USA (4-11-3, +0, 19 pts) │ SUI (7-4-7,  +2, 18 pts) │ ITA (5-8-5,  +0, 18 pts) │<br>│  6th │ SCO (7-4-7,  +1, 18 pts) │ SWE (6-6-6,  +0, 18 pts) │ SUI (7-4-7,  -1, 18 pts) │<br>│  7th │ KOR (5-8-5,  -3, 18 pts) │ KOR (6-6-6,  -4, 18 pts) │ KOR (5-8-5,  -2, 18 pts) │<br>│  8th │ ITA (4-7-7,  -4, 15 pts) │ SCO (7-4-7,  -5, 18 pts) │ NOR (4-7-7,  -4, 15 pts) │<br>│  9th │ JPN (4-5-9,  -5, 13 pts) │ ITA (5-4-9,  -4, 14 pts) │ JPN (3-7-8,  -7, 13 pts) │<br>│ 10th │ NOR (4-5-9,  -6, 13 pts) │ NOR (3-4-11,-11, 10 pts) │ GER (4-4-10,-10, 12 pts) │<br>└──────┴──────────────────────────┴──────────────────────────┴──────────────────────────┘</pre><ul><li><strong>Different Leaders per Representation:</strong> Sweden (SWE_WOMEN, 24 pts) led the DSV league, Germany (GER_WOMEN, 22 pts, +13 diff) and Japan (JPN_WOMEN, 22 pts, +8 diff) topped the Grid CNN league, and the United States (USA_WOMEN, 26 pts, losing only 1 of 18 games) won the SST league.</li><li><strong>Consistency of Canada and Korea:</strong> Canada (CAN_WOMEN) placed 3rd across all three representations (20–21 pts), while Korea (KOR_WOMEN) scored exactly 18 points (50.0% win rate, 7th place) in all three leagues.</li></ul><h3>3.2 Men’s 10-Nation League Comparison (90 Games per Representation, 270 Games Total)</h3><p>In the Men’s division, rank shifts across representations were even more pronounced:</p><pre>┌──────┬──────────────────────────┬──────────────────────────┬──────────────────────────┐<br>│ Rank │ DSV League (1D Vector)   │ Grid CNN League (2D Grid)│ SST League (Set Tx)      │<br>├──────┼──────────────────────────┼──────────────────────────┼──────────────────────────┤<br>│  1st │ SWE (10-7-1, +14, 27 pts)│ CAN (13-4-1, +19, 30 pts)│ NOR (6-9-3,  +5, 21 pts) │<br>│  2nd │ USA (9-5-4,   +6, 23 pts)│ NOR (9-3-6,   +6, 21 pts)│ KOR (7-7-4,  +2, 21 pts) │<br>│  3rd │ NOR (7-7-4,   +4, 21 pts)│ GER (8-4-6,   +3, 20 pts)│ SCO (6-7-5,  +5, 19 pts) │<br>│  4th │ SUI (5-10-3,  +8, 20 pts)│ JPN (7-5-6,   +6, 19 pts)│ SWE (6-7-5,  -1, 19 pts) │<br>│  5th │ CAN (5-9-4,   +4, 19 pts)│ SCO (6-6-6,   +0, 18 pts)│ SUI (7-4-7,  +1, 18 pts) │<br>│  6th │ ITA (7-5-6,   -1, 19 pts)│ SUI (6-5-7,   +1, 17 pts)│ CAN (5-7-6,  +5, 17 pts) │<br>│  7th │ SCO (6-5-7,   +0, 17 pts)│ USA (7-2-9,   -2, 16 pts)│ JPN (3-11-4, -1, 17 pts) │<br>│  8th │ GER (5-5-8,   -1, 15 pts)│ ITA (4-8-6,   -2, 16 pts)│ USA (4-9-5,  -3, 17 pts) │<br>│  9th │ JPN (2-7-9,  -11, 11 pts)│ KOR (5-4-9,  -17, 14 pts)│ GER (3-10-5, -5, 16 pts) │<br>│ 10th │ KOR (2-4-12, -23,  8 pts)│ SWE (4-1-13, -14,  9 pts)│ ITA (2-11-5, -8, 15 pts) │<br>└──────┴──────────────────────────┴──────────────────────────┴──────────────────────────┘</pre><ol><li><strong>Sweden’s Strength on DSV:</strong> On the 1D distance-sorted vector (DSV), Sweden finished 1st in both the Women’s (24 pts) and Men’s (27 pts, 10W–7D–1L) leagues. (In a 2-game exhibition between the two DSV winners, SWE_WOMEN edged SWE_MEN 2:2 and 2:1, winning 4:3 on aggregate.)</li><li><strong>Canada Men’s (</strong><strong>CAN_MEN) Dominance on Grid CNN:</strong> On the 2D spatial grid representation, hitting-oriented CAN_MEN posted <strong>13W–4D–1L (30 points, 52 PF / 33 PA, +19 diff, 83.3% win rate)</strong>—the highest single-season point total across all 540 games. Conversely, DSV champion SWE_MEN dropped to 10th place on Grid CNN (4W–1D–13L, 9 pts).</li><li><strong>Korea Men’s (</strong><strong>KOR_MEN) Surge from 10th to 2nd on SST:</strong> After finishing 10th on DSV in both Part 2 and Part 3 (8 pts, 2W–4D–12L), KOR_MEN rose to <strong>2nd place on SST with 7W–7D–4L (21 points, +2 diff), tied on points with 1st-place Norway (21 pts, +5 diff)</strong>. Because KOR_MEN has the highest placement ratio in the dataset (Style Index 2.426), modeling pairwise stone-to-stone interactions via Set Attention allowed its guard and freeze setups to function effectively.</li></ol><h3>3.3 Representation Champions Clash (Determining the Cross-Representation #1)</h3><p>Because each board representation crowned a different national champion, we pitted the 1st-place teams from the three leagues against one another — each using its native board representation — in a <strong>3-team double round-robin (2 games per pairing alternating hammer, 6 games per division)</strong>.</p><ul><li><strong>Women’s Champions:</strong> SWE_WOMEN (DSV #1) vs. GER_WOMEN (Grid CNN #1) vs. USA_WOMEN (SST #1)</li><li><strong>Men’s Champions:</strong> SWE_MEN (DSV #1) vs. CAN_MEN (Grid CNN #1) vs. NOR_MEN (SST #1)</li></ul><pre>┌──────────┬──────┬────────────────────────┬──────────┬──────┬────┬────┬────┬──────┬──────┬──────┬──────┐<br>│ Division │ Rank │ Agent (League Winner)  │ Repr.    │ Games│  W │  D │  L │  PF  │  PA  │ Diff │  Pts │<br>├──────────┼──────┼────────────────────────┼──────────┼──────┼────┼────┼────┼──────┼──────┼──────┼──────┤<br>│ WOMEN    │  1st │ GER_WOMEN (Grid #1)    │ Grid CNN │    4 │  3 │  1 │  0 │   12 │    7 │   +5 │    7 │<br>│ WOMEN    │  2nd │ USA_WOMEN (SST  #1)    │ SST      │    4 │  2 │  0 │  2 │   10 │    9 │   +1 │    4 │<br>│ WOMEN    │  3rd │ SWE_WOMEN (DSV  #1)    │ DSV      │    4 │  0 │  1 │  3 │    8 │   14 │   -6 │    1 │<br>├──────────┼──────┼────────────────────────┼──────────┼──────┼────┼────┼────┼──────┼──────┼──────┼──────┤<br>│ MEN      │  1st │ NOR_MEN   (SST  #1)    │ SST      │    4 │  3 │  1 │  0 │   13 │    8 │   +5 │    7 │<br>│ MEN      │  2nd │ CAN_MEN   (Grid #1)    │ Grid CNN │    4 │  2 │  1 │  1 │   13 │    9 │   +4 │    5 │<br>│ MEN      │  3rd │ SWE_MEN   (DSV  #1)    │ DSV      │    4 │  0 │  0 │  4 │   10 │   19 │   -9 │    0 │<br>└──────────┴──────┴────────────────────────┴──────────┴──────┴────┴────┴────┴──────┴──────┴──────┴──────┘</pre><ul><li><strong>Women’s Breakdown:</strong> GER_WOMEN (Grid CNN) defeated USA_WOMEN (SST) twice (3:2 and 2:1) and went 1W–1D against SWE_WOMEN (DSV) (2:2 and 5:2), finishing <strong>undefeated at 3W–1D–0L (7 points)</strong>.</li><li><strong>Men’s Breakdown:</strong> NOR_MEN (SST) went 1W–1D against CAN_MEN (Grid CNN) (2:2 and 2:1) and swept SWE_MEN (DSV) (5:3 and 4:2), likewise finishing <strong>undefeated at 3W–1D–0L (7 points)</strong>.</li><li><strong>Limitations of the DSV Champions:</strong> Consistent with Section 2.2, the DSV league winners — SWE_WOMEN (0W–1D–3L) and SWE_MEN (0W–0D–4L)—failed to win a single game against the Grid CNN and SST champions.</li></ul><h3>4. Direct Comparisons: Partial Data (52.3%) vs. Full Data (100.0%) and the Overall Grand Final</h3><p>We evaluated how expanding the dataset from 52.3% (181K valid shots) to 100.0% (328K valid shots) affects head-to-head match play across three stages, culminating in the Grand Final between the Men’s and Women’s unified champions.</p><h3>4.1 Same-Nation Mirror Matches on DSV (20 Teams × 2 Games = 40 Games)</h3><p>First, holding the board representation fixed to DSV (the architecture used in Part 2), we matched the <strong>Full-Data (100.0%) model against the Partial-Data (52.3%) model</strong> for each of the 20 national teams across two 10-end games (alternating hammer, 40 games total):</p><pre>┌──────────┬──────────────┬──────────────────┬──────────────────┬─────────────────┬──────────────┐<br>│ Division │ Country      │ Game 1 (Full 1st)│ Game 2 (Full 2nd)│ 2-Game Aggregate│ Series Winner│<br>├──────────┼──────────────┼──────────────────┼──────────────────┼─────────────────┼──────────────┤<br>│ WOMEN    │ SUI (Switz.) │ Full 3 : 2 Part  │ Full 2 : 1 Part  │ Full  5 : 3 Part│ Full (2W)    │<br>│ WOMEN    │ GER (Germany)│ Full 1 : 2 Part  │ Full 5 : 2 Part  │ Full  6 : 4 Part│ Full (+2 pts)│<br>│ WOMEN    │ SWE (Sweden) │ Full 2 : 2 Part  │ Full 2 : 1 Part  │ Full  4 : 3 Part│ Full (1W 1D) │<br>│ WOMEN    │ JPN (Japan)  │ Full 2 : 2 Part  │ Full 2 : 1 Part  │ Full  4 : 3 Part│ Full (1W 1D) │<br>│ WOMEN    │ ITA (Italy)  │ Full 2 : 2 Part  │ Full 3 : 2 Part  │ Full  5 : 4 Part│ Full (1W 1D) │<br>│ WOMEN    │ NOR (Norway) │ Full 3 : 3 Part  │ Full 2 : 2 Part  │ Full  5 : 5 Part│ Tied (2D)    │<br>│ WOMEN    │ KOR (Korea)  │ Full 2 : 4 Part  │ Full 2 : 2 Part  │ Full  4 : 6 Part│ Part (1W 1D) │<br>│ WOMEN    │ CAN (Canada) │ Full 1 : 2 Part  │ Full 2 : 3 Part  │ Full  3 : 5 Part│ Part (2W)    │<br>│ WOMEN    │ SCO (Scot.)  │ Full 1 : 2 Part  │ Full 2 : 3 Part  │ Full  3 : 5 Part│ Part (2W)    │<br>│ WOMEN    │ USA (USA)    │ Full 2 : 5 Part  │ Full 2 : 3 Part  │ Full  4 : 8 Part│ Part (2W)    │<br>├──────────┼──────────────┼──────────────────┼──────────────────┼─────────────────┼──────────────┤<br>│ MEN      │ JPN (Japan)  │ Full 7 : 2 Part  │ Full 7 : 2 Part  │ Full 14 : 4 Part│ Full (2W)    │<br>│ MEN      │ SUI (Switz.) │ Full 2 : 2 Part  │ Full 2 : 1 Part  │ Full  4 : 3 Part│ Full (1W 1D) │<br>│ MEN      │ NOR (Norway) │ Full 4 : 2 Part  │ Full 2 : 3 Part  │ Full  6 : 5 Part│ Full (+1 pt) │<br>│ MEN      │ SCO (Scot.)  │ Full 1 : 2 Part  │ Full 2 : 2 Part  │ Full  3 : 4 Part│ Part (1W 1D) │<br>│ MEN      │ GER (Germany)│ Full 2 : 4 Part  │ Full 3 : 3 Part  │ Full  5 : 7 Part│ Part (1W 1D) │<br>│ MEN      │ SWE (Sweden) │ Full 2 : 4 Part  │ Full 2 : 2 Part  │ Full  4 : 6 Part│ Part (1W 1D) │<br>│ MEN      │ CAN (Canada) │ Full 3 : 4 Part  │ Full 3 : 4 Part  │ Full  6 : 8 Part│ Part (2W)    │<br>│ MEN      │ ITA (Italy)  │ Full 1 : 2 Part  │ Full 2 : 3 Part  │ Full  3 : 5 Part│ Part (2W)    │<br>│ MEN      │ KOR (Korea)  │ Full 2 : 5 Part  │ Full 2 : 2 Part  │ Full  4 : 7 Part│ Part (1W 1D) │<br>│ MEN      │ USA (USA)    │ Full 2 : 5 Part  │ Full 2 : 2 Part  │ Full  4 : 7 Part│ Part (1W 1D) │<br>└──────────┴──────────────┴──────────────────┴──────────────────┴─────────────────┴──────────────┘</pre><p>In the Women’s division — where 107K WWCC shots were newly added — <strong>five nations (Switzerland, Germany, Sweden, Japan, and Italy) won their series with the Full model</strong> (one tied, four won by Partial). In the Men’s division, JPN_MEN (Full) posted the largest margin, winning both games 7:2 (14:4 aggregate). Yet under the 1D DSV representation, adding more data did not uniformly lift every nation&#39;s win rate (96:104 total points across the 40 games).</p><h3>4.2 Four-Team Round-Robin Among DSV League Winners (Partial DSV #1 vs. Full DSV #1)</h3><p>To investigate further within DSV, we held a <strong>4-team double round-robin (12 games total)</strong> between Part 2’s Partial DSV league winners (KOR_WOMEN [Partial] and SUI_MEN [Partial]) and Part 3&#39;s Full DSV league winners (SWE_WOMEN [Full DSV] and SWE_MEN [Full DSV]):</p><pre>┌──────┬────────────────────────┬─────────────────┬──────┬────┬────┬────┬──────┬──────┬──────┬──────┐<br>│ Rank │ Agent                  │ Data / Repr.    │ Games│  W │  D │  L │  PF  │  PA  │ Diff │  Pts │<br>├──────┼────────────────────────┼─────────────────┼──────┼────┼────┼────┼──────┼──────┼──────┼──────┤<br>│  1st │ KOR_WOMEN (Korea W)    │ Partial / DSV   │    6 │  3 │  2 │  1 │   16 │   13 │   +3 │    8 │<br>│  2nd │ SWE_MEN   (Sweden M)   │ Full    / DSV   │    6 │  3 │  2 │  1 │   17 │   15 │   +2 │    8 │<br>│  3rd │ SUI_MEN   (Switz. M)   │ Partial / DSV   │    6 │  2 │  1 │  3 │   13 │   15 │   -2 │    5 │<br>│  4th │ SWE_WOMEN (Sweden W)   │ Full    / DSV   │    6 │  1 │  1 │  4 │   10 │   13 │   -3 │    3 │<br>└──────┴────────────────────────┴─────────────────┴──────┴────┴────┴────┴──────┴──────┴──────┴──────┘</pre><ul><li>KOR_W (Partial) vs. SWE_W (Full DSV): 3:2, 2:1 (KOR_W wins 2W–0L, 5:3 agg.)</li><li>KOR_W (Partial) vs. SUI_M (Partial): 2:2, 4:2 (KOR_W wins 1W–1D, 6:4 agg.)</li><li>KOR_W (Partial) vs. SWE_M (Full DSV): 3:4, 2:2 (SWE_M wins 1W–1D, 6:5 agg.)</li><li>SUI_M (Partial) vs. SWE_M (Full DSV): 2:4, 4:2 (1W–1L split, 6:6 agg.)</li><li>SUI_M (Partial) vs. SWE_W (Full DSV): 1:2, 2:1 (1W–1L split, 3:3 agg.)</li><li>SWE_W (Full DSV) vs. SWE_M (Full DSV): 2:2, 2:3 (SWE_M wins 1W–1D, 5:4 agg.)</li></ul><p>Within DSV, KOR_WOMEN (Partial) and SWE_MEN (Full DSV) tied at 8 points (3W–2D–1L), with KOR_WOMEN (Partial) taking 1st place on score differential (+3 vs. +2). Because KOR_WOMEN (Partial) plays a high-guard, draw-heavy style that creates cluttered multi-stone houses, the 1D vector representation of SWE_WOMEN (Full DSV) struggled to clear those setups.</p><h3>4.3 Cross-Representation Full Champions vs. Partial Champions</h3><p>As established in Section 3.3, however, the true cross-representation champions of the 432K full dataset are <strong>GER_WOMEN (Grid CNN #1) and </strong><strong>NOR_MEN (SST #1)</strong>, not DSV Sweden. We therefore matched the Partial-Data champions (KOR_WOMEN [Partial] and SUI_MEN [Partial]) directly against the Cross-Representation Full-Data champions (GER_WOMEN [Full, Grid CNN] and NOR_MEN [Full, SST]) in two-game series alternating hammer:</p><pre>┌──────────┬────────────────────────┬────────────────────────┬───────────┬───────────┬───────────┬────────────────┐<br>│ Division │ Partial #1 (52.3%)     │ True Full #1 (100.0%)  │ Game 1    │ Game 2    │ Aggregate │ Series Result  │<br>├──────────┼────────────────────────┼────────────────────────┼───────────┼───────────┼───────────┼────────────────┤<br>│ Women&#39;s  │ KOR_WOMEN (Part, DSV)  │ GER_WOMEN (Full, Grid) │ 2 : 4     │ 2 : 3     │  4 :  7   │ Full 2W 0L     │<br>│ Men&#39;s    │ SUI_MEN   (Part, DSV)  │ NOR_MEN   (Full, SST)  │ 2 : 8     │ 2 : 2     │  4 : 10   │ Full 1W 1D     │<br>└──────────┴────────────────────────┴────────────────────────┴───────────┴───────────┴───────────┴────────────────┘</pre><p>The outcomes were decisive in both divisions. In the Women’s matchup, <strong>GER_WOMEN (Full, Grid CNN) dismantled </strong><strong>KOR_WOMEN (Partial)&#39;s guard setups to win both games (4:2 and 3:2, 7:4 aggregate)</strong>. In the Men&#39;s matchup, <strong>NOR_MEN (Full, SST) defeated </strong><strong>SUI_MEN (Partial) 8:2 in Game 1 and drew 2:2 in Game 2 (1W–1D–0L, 10:4 aggregate)</strong>.</p><p>This resolves the apparent tension from Sections 4.1 and 4.2: expanding the dataset to 432K shots increases the density and variety of complex multi-stone boards, which a 1D distance-sorted vector (DSV) cannot fully exploit on its own. <strong>When paired with a 2D spatial grid (Grid CNN) or relational set attention (SST), the Full-Data models decisively outperform the Partial-Data champions in both divisions.</strong></p><h3>4.4 The 432K Grand Final: GER_WOMEN (Grid CNN) vs. NOR_MEN (SST)</h3><p>Having each eliminated their division’s Partial-Data champions in Section 4.3, the Women’s Cross-Representation Champion (GER_WOMEN [Grid CNN]) and the Men&#39;s Cross-Representation Champion (NOR_MEN [SST]) met in a two-game 10-end Grand Final alternating first-end hammer to crown the single overall champion of the 432K full dataset across all architectures:</p><pre>┌────────────────────────────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬──────┐<br>│ Game &amp; Team (1st Hammer)   │  1E   │  2E   │  3E   │  4E   │  5E   │  6E   │  7E   │  8E   │  9E   │  10E  │Final │<br>├────────────────────────────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼──────┤<br>│ Game 1 GER_WOMEN (Grid,NoH)│   0   │   0   │   0   │   1   │   0   │   0   │   0   │   1   │   0   │   0   │  2   │<br>│ Game 1 NOR_MEN   (SST, Ham)│   0   │   1   │   0   │   0   │   0   │   1   │   0   │   0   │   1   │   0   │  3   │<br>├────────────────────────────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼──────┤<br>│ Game 2 NOR_MEN   (SST, NoH)│   0   │   0   │   0   │   1   │   0   │   0   │   0   │   0   │   0   │   1   │  2   │<br>│ Game 2 GER_WOMEN (Grid,Ham)│   0   │   1   │   0   │   0   │   0   │   0   │   0   │   1   │   0   │   0   │  2   │<br>└────────────────────────────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴──────┘</pre><pre>┌────────────────────────┬──────────┬────────┬────────────┬────────────┬────────────┬───────────┬──────────────────┐<br>│ Agent                  │ Repr.    │ Record │ Aggregate  │ Hit &amp; Roll │ Takeout    │ Draws/Grd │ Final Title      │<br>├────────────────────────┼──────────┼────────┼────────────┼────────────┼────────────┼───────────┼──────────────────┤<br>│ NOR_MEN   (Men&#39;s #1)   │ SST      │ 1W 1D  │ 5 pts (3,2)│  74 (46.3%)│  50 (31.3%)│ 35 (21.9%)│ Overall Champion │<br>│ GER_WOMEN (Women&#39;s #1) │ Grid CNN │ 0W 1D  │ 4 pts (2,2)│  83 (51.9%)│  53 (33.1%)│ 21 (13.1%)│ Runner-Up        │<br>└────────────────────────┴──────────┴────────┴────────────┴────────────┴────────────┴───────────┴──────────────────┘</pre><ul><li><strong>Game 1 (</strong><strong>NOR_MEN 3 : 2 </strong><strong>GER_WOMEN):</strong> After trading single points with hammer to reach 2:2 through 8 ends, NOR_MEN (SST) scored 1 point with hammer in the 9th end to lead 3:2, then held GER_WOMEN (Grid CNN) scoreless in the 10th end without hammer to win 3:2.</li><li><strong>Game 2 (</strong><strong>NOR_MEN 2 : 2 </strong><strong>GER_WOMEN):</strong> Following three consecutive blank ends in ends 5–7, GER_WOMEN took a 2:1 lead in the 8th end. NOR_MEN deliberately blanked the 9th end to retain last-rock advantage for the 10th end, where it converted 1 point to draw 2:2 and clinch the series.</li><li><strong>Overall Result:</strong> Against GER_WOMEN (Grid CNN)&#39;s aggressive 85.0% hitting rate across 160 shots, <strong>NOR_MEN (SST) combined 77.5% hitting with 21.9% draw/freeze/guard placements and disciplined late-end hammer management to win 1W–1D–0L (5:4 aggregate) and become the Overall Champion of the 432K dataset.</strong></li></ul><h3>5. Summary and Next Steps</h3><p>Completing the 432,139-shot inverse-fitting pipeline and running our cross-representation leagues yielded three main findings:</p><p>First, <strong>completing the dataset eliminated division and tournament bias while improving offline accuracy across all models.</strong> Adding the full World Women’s archive and later World Men’s seasons balanced the valid corpus at 50.4% Men’s and 49.6% Women’s, preserved national style orderings (KOR &gt; CAN &gt; SWE &gt; SUI), and lifted 14-Class accuracy for DSV, SST, and Grid CNN alike.</p><p>Second, <strong>board representations substantially altered on-ice match performance and national league standings.</strong> In cluttered 6+ stone boards, Grid CNN outperformed DSV by 10.33 percentage points in offline accuracy, and DSV failed to win a single game against Grid CNN or SST in both the controlled KOR_WOMEN series and the Representation Champions Clash. Across the 540-game leagues, different tactical profiles benefited from different encoders—hitting-oriented CAN_MEN achieved an 83.3% win rate on Grid CNN (1st), whereas placement-heavy KOR_MEN climbed from 10th on DSV to 2nd on SST.</p><p>Third, <strong>the full dataset’s advantage translates into head-to-head victories when paired with spatial or relational representations.</strong> While Partial champion KOR_WOMEN could induce cluttered states to hold off Full DSV models, the cross-representation Full champions—GER_WOMEN (Grid CNN) and NOR_MEN (SST)—defeated the Partial champions by clear margins (7:4 and 10:4), and NOR_MEN (SST) edged GER_WOMEN (Grid CNN) 1W–1D–0L (3:2 and 2:2, 5:4 aggregate) in the Grand Final to claim the overall championship.</p><p>With this, our supervised learning (SL) phase — reconstructing and imitating human shots from official results books — is complete. Our next steps move beyond pure imitation:</p><ol><li><strong>Multi-Representation, Multi-Style Sparring Pool:</strong> Using the Grid CNN, SST, and DSV agents conditioned across 20 country-division tokens as a diverse opponent pool rather than training against a single fixed policy.</li><li><strong>Self-Play Reinforcement Learning and Residual RL:</strong> Initializing from our 432K-shot supervised policies and training via closed-loop physics self-play to refine aiming precision and discover tactical lines beyond the historical human corpus.</li></ol><p><em>Research Scope Note: Country labels in this post refer to country- and division-conditioned AI models trained on historical game records, not actual national teams. Reported shot-selection tendencies and simulation league standings depend on the dataset scope (Section 0), inverse-fitting assumptions, board representations, and search/physics settings. Inferred shot categories are heuristic classifications and do not map one-to-one to player intent.</em></p><p><em>Curling terminology references: </em><a href="https://worldcurling.org/about/curling/"><em>World Curling — What Is Curling?</em></a><em> and </em><a href="https://worldcurling.org/wp-content/uploads/2025/08/Rules-2025.pdf"><em>World Curling — Rules of Curling (2025)</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=afdbd939f3f5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Teaching AI to Play Chess on Ice (Part 2): Fourteen Shot Types, Physics Search Planners, and a…]]></title>
            <link>https://nnronin.medium.com/teaching-ai-to-play-chess-on-ice-part-2-fourteen-shot-types-physics-search-planners-and-a-59a8699da11d?source=rss-f02be0ea9f77------2</link>
            <guid isPermaLink="false">https://medium.com/p/59a8699da11d</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[curling]]></category>
            <category><![CDATA[supervised-learning]]></category>
            <category><![CDATA[simulation]]></category>
            <category><![CDATA[reinforcement-learning]]></category>
            <dc:creator><![CDATA[NN_Ronin]]></dc:creator>
            <pubDate>Sat, 31 Oct 2026 18:08:28 GMT</pubDate>
            <atom:updated>2026-11-07T16:48:19.537Z</atom:updated>
            <content:encoded><![CDATA[<h3>Teaching AI to Play Chess on Ice (Part 2): Fourteen Shot Types, Physics Search Planners, and a 180-Game AI Curling League</h3><p><em>We investigated what happens when a neural network trained on real curling match records is coupled with physics simulator-based search. Introducing search improved shot precision, but a planner that heavily weighted the opponent’s counterattack failed to score more than one point in any single end. A model conditioned on country and gender division outperformed all baseline planners and exhibited distinct shot selection distributions across nations.</em></p><blockquote><strong><em>Previously, in Part 1</em></strong><em><br>Official match records (ResultsBooks) only document the final resting positions of the stones. In Part 1, we applied physical </em>inverse fitting<em> to search for release speeds, angles, and rotational directions capable of reproducing the recorded stone trajectories, thereby constructing a shot dataset. These parameters do not represent observed physical movements of the athletes; rather, they are </em><strong><em>physically plausible actions estimated to reproduce the documented match outcomes</em></strong><em>. In this article, we examine how a supervised learning (SL) policy trained on this data evolved into a simulation-assisted competitive agent.</em></blockquote><p>Curling is a strategic sport where two teams alternate throwing granite stones down a sheet of ice, aiming to leave them closest to the center of a target. The concentric rings of the target are called the <strong>house</strong>, its center circle is the <strong>button</strong>, and each round of play is termed an <strong>end</strong>. Holding the <strong>hammer</strong> — the advantage of delivering the final stone of an end — is a crucial tactical asset.</p><p>The central research question is straightforward: <strong>How does an AI that merely imitates human shot selection compare to an AI that simulates candidate shots in a physics engine before deciding?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6obaUYDPqrn357XmBLWpWw.png" /><figcaption>Figure 1. Progression of the research pipeline: from a single-shot regression baseline (Gen 0) to 14-Intent candidate generation, Stage 1–3 physics search planners, and a country- and division-conditioned Top-2 planner.</figcaption></figure><h3>0. Dataset Scope and Inverse Fitting Progress</h3><p>The target dataset for inverse fitting comprises <strong>51 tournament ResultsBooks, 27,017 ends, and 432,139 individual shots</strong>.</p><p>The experiments reported in this article utilize the first <strong>225,982 completed shots (52.3% of the total dataset)</strong>. Because physical inverse fitting across hundreds of thousands of shots is computationally intensive (requiring approximately <strong>11,700 minutes / ~195 hours</strong> for this partition across 8 parallel processes), we first validated the modeling and planning pipeline on this preliminary subset; full-scale retraining across the complete 100.0% dataset follows in Part 3.</p><pre>┌────────────────────────────────┬────────────┬────────────┬────────────────────────┐<br>│ Competition Series             │ Total Shot │ This Study │ Coverage Scope         │<br>├────────────────────────────────┼────────────┼────────────┼────────────────────────┤<br>│ ECC (European Champs, &#39;14–&#39;25) │    123,138 │    123,138 │ Complete               │<br>│ OWG (Winter Olympics)          │     44,468 │     44,468 │ 2010, 2014, 2026 Compl │<br>│ PCCC (Pan Continental Champs)  │     29,332 │     29,332 │ Complete               │<br>│ WMCC (World Men&#39;s Champs)      │    128,073 │     29,044 │ 2014–&#39;17 + &#39;18 (159)   │<br>│ WWCC (World Women&#39;s Champs)    │    107,128 │          0 │ Unused in this phase   │<br>├────────────────────────────────┼────────────┼────────────┼────────────────────────┤<br>│ Total                          │    432,139 │    225,982 │ 52.3% of full dataset  │<br>└────────────────────────────────┴────────────┴────────────┴────────────────────────┘</pre><p>From these 225,982 candidate shots, 30,747 failed physical quality control (QC) criteria and 13,779 could not be definitively classified into shot categories, leaving <strong>181,456 valid shots (Train: 145,390 / Val: 18,029 / Test: 18,037)</strong> for the supervised learning dataset. Consequently, sample sizes and women’s division statistics in this study do not yet include the World Women’s Championship records.</p><h3>1. Limitations of Single-Shot Regression</h3><p>We first defined a <strong>Gen 0 Baseline</strong>: a multilayer perceptron (MLP) taking the current board state and match context to predict a single continuous release speed v and direction θ. Gen 0 was trained on approximately 310,000 frames from an earlier data extraction pipeline, representing a different sample composition from the 181,456 tagged shots used later.</p><p>In a generational round-robin tournament, Gen 0 registered a <strong>1–7 record (12.5% win rate, −77 point differential)</strong>. In two-game series against the search-enhanced Stage 1, Stage 2, and Stage 3 planners, it lost by aggregate scores of <strong>5:30, 8:36, and 6:30</strong>, respectively. Because both the network structure and search mechanisms changed across generations, this disparity cannot be attributed purely to model capacity.</p><p>A primary cause of failure was <strong>multimodal mode averaging</strong>. Consider a scenario where an opponent’s stone sits on the button, shielded by a <strong>guard</strong> (a stone positioned in front of the house to block incoming trajectories). A curling skip faced with this board typically considers two distinct tactical solutions:</p><ul><li><strong>Come-around draw:</strong> Deliver a gentle stone curling around the guard to settle into the scoring zone.</li><li><strong>Takeout / Runback:</strong> Deliver a high-velocity stone to clear the opponent’s rock, potentially by striking an intervening guard into the target stone.</li></ul><p>When a single regression head optimizes mean squared error (MSE) over these conflicting tactical modes, the predicted velocity converges toward an arithmetic average. For instance, blending a 2.39 m/s draw with a 2.66 m/s takeout produces an intermediate delivery around 2.52 m/s—a velocity that achieves neither objective. (These values are simulator-specific release parameters, not absolute real-world metrics.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yQBKM3ZYGWeXnxHG5hwfKQ.gif" /><figcaption>Animation 1. Direct comparison on an identical board (End 3, Shot 10, Red hammer).</figcaption></figure><p><em>Left: Gen 0 single-output regression, Right: 14-Intent policy (</em><em>DRAW_CCW come-around branch). In the left panel, the delivered stone overshoots completely out of play; in the right panel, it curls smoothly to rest adjacent to the opponent&#39;s shot stone on the button.</em></p><h4>Fourteen Action Branches</h4><p>To eliminate mode averaging, we divided the action space into <strong>7 physical shot categories × 2 rotational directions = 14 distinct action branches</strong>. In this context, <em>intent</em> denotes a <strong>categorized shot class derived from observed outcomes and physical fitting</strong>, rather than mind-reading the player’s cognitive state.</p><pre>┌──────────────┬───────────────────────────────────────────────────────────────────┐<br>│ Shot Type    │ Plain-Language Tactical Function                                  │<br>├──────────────┼───────────────────────────────────────────────────────────────────┤<br>│ Guard        │ Place stone in front of house to obstruct or protect stones       │<br>│ Draw         │ Controlled delivery stopping in house scoring zone                │<br>│ Freeze       │ Precise draw stopping flush against opponent stone                │<br>│ Takeout      │ Strike opponent stone to remove it from sheet                     │<br>│ Hit-and-Roll │ Strike target stone and roll shooter to advantageous position     │<br>│ Peel         │ High-velocity strike to clear guard, shooter exiting play         │<br>│ Promotion    │ Advance stationary stone into better position (tap-back/runback)  │<br>└──────────────┴───────────────────────────────────────────────────────────────────┘</pre><p>Each shot type can be delivered with clockwise (<strong>CW</strong>) or counterclockwise (<strong>CCW</strong>) rotation. In a single forward pass, the network outputs both the categorical classification probabilities across the 14 branches (via Softmax) and the continuous physical parameters (v, θ) for each branch, producing <strong>14 physically distinct candidates per board</strong>. Because the athlete&#39;s true release rotation was not logged and is estimated via inverse fitting, these branches function as an <strong>action candidate space explaining possible outcomes</strong>, rather than definitive human intent labels.</p><p>To verify that these neural proposals adhere to realistic curling dynamics, we evaluated all 14 branches across a benchmark of <strong>300 held-out test positions (4,200 total physics simulations)</strong>, revealing clear velocity separation:</p><pre>┌──────────────┬────────────┬──────────────────────────────────────────────────────┐<br>│ Branch       │ Mean Speed │ Observed Physical Behavior in Simulator              │<br>├──────────────┼────────────┼──────────────────────────────────────────────────────┤<br>│ Guard        │  2.319 m/s │ 99.0% of deliveries stopped in Free Guard Zone       │<br>│ Draw         │  2.393 m/s │ 83.3% of deliveries stopped inside house             │<br>│ Freeze       │  2.396 m/s │ Low-velocity approach flush to existing stones       │<br>│ Promotion    │  2.577 m/s │ Moderate-velocity contact advancing front stones     │<br>│ Hit-and-Roll │  2.580 m/s │ Controlled contact prioritizing post-collision roll  │<br>│ Takeout      │  2.661 m/s │ High-velocity contact clearing opposing stones       │<br>│ Peel         │  2.800 m/s │ Max velocity; 60.3% of shooters exited play          │<br>└──────────────┴────────────┴──────────────────────────────────────────────────────┘</pre><h3>2. Board Representation Comparison</h3><p>Because curling stones lie in continuous 2D space and their count varies throughout each end, selecting an appropriate state representation is critical. We evaluated three architectural paradigms across <strong>18,037 test shots</strong>:</p><pre>┌──────────────────────┬─────────────────────────────────────────┬───────────┬──────────┐<br>│ Model                │ Board Representation                    │ Parameters│ Latency  │<br>├──────────────────────┼─────────────────────────────────────────┼───────────┼──────────┤<br>│ DSV (Sorted Vector)  │ 64D vector sorted by button distance    │     ~181k │ 0.033 ms │<br>│ Grid CNN (CoordConv) │ 32×64 spatial grid + coordinate maps    │   ~1,419k │ 1.058 ms │<br>│ SST (Transformer)    │ Permutation-invariant token set (SAB)   │     ~295k │ 0.179 ms │<br>└──────────────────────┴─────────────────────────────────────────┴───────────┴──────────┘</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9HWON7HbSxtEBlE17HY5mQ.png" /><figcaption>Figure 2. Comparison of the three board representations: offline 14-class classification accuracy (Panel A) and head-to-head match results under identical conditions (Panel B).</figcaption></figure><p>Offline 14-class classification accuracies were: — <strong>Grid CNN: 34.22%</strong> — <strong>SST: 30.48%</strong> — <strong>DSV: 28.50%</strong></p><p>In cluttered situations with many stones in play, Grid CNN outperformed DSV by <strong>7.39 percentage points</strong>, suggesting that 2D spatial feature extraction excels at recognizing congested geometries.</p><p>However, when these representations played head-to-head in two-game series under identical KOR_WOMEN conditions with alternating hammer advantage, the competitive results diverged from classification rankings:</p><pre>┌──────────────────┬─────────────────────────────┬───────────────────────────────┐<br>│ Matchup          │ Aggregate Score (2 Games)   │ Game Series Results           │<br>├──────────────────┼─────────────────────────────┼───────────────────────────────┤<br>│ SST vs DSV       │ SST 6 : 5 DSV               │ 1 Win each (SST +1 aggregate) │<br>│ DSV vs Grid CNN  │ DSV 7 : 6 Grid CNN          │ 1 Win each (DSV +1 aggregate) │<br>│ Grid CNN vs SST  │ Grid CNN 7 : 6 SST          │ 1 Win each (CNN +1 aggregate) │<br>└──────────────────┴─────────────────────────────┴───────────────────────────────┘</pre><p>Every pairing split 1–1 with a single-point margin across two games. While the small sample size precludes declaring a definitively superior representation, it demonstrates that <strong>higher offline imitation accuracy does not guarantee dominance in game play</strong>.</p><h3>3. Physics Lookahead and Candidate Action Selection</h3><p>While the 14-Intent policy provides diverse action candidates, the branch with the highest classification probability is not necessarily the optimal shot. Policy classification probabilities reflect historical selection frequency in training data; actual shot utility depends on real-time board configuration and anticipated opponent replies.</p><h4>EWP Calculation Framework</h4><p>We quantify candidate shot quality using <strong>EWP (Expected Win Probability)</strong>, calculated through a five-stage evaluation pipeline:</p><p><strong>① Candidate Shot Simulation.</strong> <br>Candidate release parameters (v, θ, rotation) are evaluated in the physics simulator with official rules (including Free Guard Zone restrictions). Illegal shots (e.g., FGZ violations) are assigned an EWP of 0.01, effectively eliminating them from contention.</p><p><strong>② End Score Distribution </strong><strong>P(r) Estimation.</strong> <br>From the simulated final board state, the immediate score differential r is determined (+ for our points, − for opponent points, 0 for blank). In curling, only the team whose stone is closest to the button scores, receiving one point for each stone closer than the opponent&#39;s best stone. - For the final (16th) shot of an end, r is deterministic: P(r) = 1. - For earlier shots, letting r₀ denote the current board differential, we model future outcome uncertainty using a parameter d = (16 − shots_remaining) / 16. Probability mass over r ∈ [−8, +8] is distributed as: 0.40 + 0.50d at r₀, 0.20(1−d) at r₀±1, 0.08(1−d) at r₀±2, and 0.005 elsewhere, normalized to sum to 1. This is a heuristic smoothing distribution, not an empirical measurement.</p><p><strong>③ Post-End State Win Probability Lookup.</strong> <br>If the end concludes with result r, the game transitions to: - Remaining ends: E − 1 - Score margin: D + r - Subsequent hammer possession: Opponent if r &gt; 0; Our team if r &lt; 0; Unchanged if r = 0 (blank end).</p><p>The win probability of this resultant state is retrieved from an empirical <strong>Win Probability Table (WPT)</strong>.</p><p><strong>④ Expected Value Calculation.</strong></p><pre>EWP(a) = Σ_r  P(r | a) × WPT(E − 1, D + r, hammer(r))</pre><p>This formulation evaluates each candidate shot not merely by immediate stone counts, but by the expected game-level victory probability after accounting for resultant score margins and subsequent hammer possession.</p><p><strong>⑤ Calibration and Tie-Breaking.</strong> <br>To prevent sample noise artifacts (e.g., giving higher win probability to conceding points than scoring), monotonic adjustments are enforced: for r ≥ 1, win probability increases by at least 0.015 per point scored, and conceding points (r &lt; 0) is constrained to be at least 0.02 lower than a blank or score. To differentiate between identical EWP candidates, fine-grained geometric board values (button distance, stone differential in house, guard presence) are added within a ±0.007 margin to compute the final selection metric (fine EWP).</p><p><strong>WPT Construction.</strong> <br>The win probability table is constructed directly from training split match records: 1. End-level scores are evaluated from final stone positions. 2. For each end boundary, state tuples (remaining_ends, cumulative_margin, hammer_possession) are linked to the final match outcome. 3. Win rates are aggregated symmetrically from both team perspectives (draws excluded). 4. Sparse states with fewer than 5 samples are interpolated using Gaussian-weighted nearest neighbors (σ=2) or logistic regression fallbacks. 5. Monotonicity constraints are applied (WP(+d, hammer) + WP(−d, non-hammer) = 1, hammer advantage ≥ 0.02 at equal scores), bounded in [0.02, 0.98].</p><h4>EWP Comparison Across Candidate Selection Methods</h4><p>Here, ‘physical evaluation’ does not merely check the resting coordinates of stones; <strong>it executes the full physics rollout, including evaluating the resulting end score and querying the Win Probability Table (WPT) to compute the Expected Win Probability (EWP) of each action</strong>. Across the benchmark of <strong>300 held-out test positions</strong>, we compared the average EWP achieved by simply selecting the raw policy Top-1 recommendation against evaluating candidates through physics simulation to pick the highest-EWP shot:</p><pre>┌────────────────────────────────────────────────────────────┬───────────┐<br>│ Action Selection Strategy                                  │  Mean EWP │<br>├────────────────────────────────────────────────────────────┼───────────┤<br>│ Policy Top-1 (No physics simulation)                       │    51.54% │<br>│ Simulate branches with policy probability &gt;= 5%            │    57.31% │<br>│ Full physics simulation across all 14 candidate branches   │    59.08% │<br>└────────────────────────────────────────────────────────────┴───────────┘</pre><p>In <strong>127 of 300 boards (42.3%)</strong>, physics search identified an action superior to the policy’s Top-1 prediction. Only <strong>18 positions (6.0%)</strong> yielded poor options across all 14 candidates. Action selection significantly affects performance beyond candidate generation. Note that these metrics reflect the internal WPT evaluator and are distinct from empirical win rates in full games.</p><h4>Stage 1 — Fast Physics Selector (orig_ewp)</h4><p>Stage 1 simulates each branch with policy classification probability ≥ 5% once, choosing the candidate with the highest EWP. This increased mean EWP from <strong>51.54% to 57.31%</strong>, and defeated Gen 0 with an aggregate score of <strong>30:5</strong> across two games. Crucially, this improvement required <strong>no policy retraining</strong>; the network generated candidates, and the simulator selected among them.</p><h4>Stage 2 — Release Parameter Fine-Tuning (stage2)</h4><p>Even with correct macro-shot selection, slight discrepancies in speed or angle can miss collisions. Stage 2 evaluates a <strong>5×5 local perturbation grid around </strong><strong>(v, θ)</strong>, while enforcing Free Guard Zone rules.</p><p>Aiming precision improved, raising the two-game aggregate against Gen 0 to <strong>36:8</strong>. However, repeatedly optimizing short-term EWP across arbitrary shot branches led to <strong>tactical drift</strong>: an agent might set up a guard on one throw, then abandon that setup on the next in pursuit of an unrelated short-term target.</p><h4>Stage 3 — Adversarial 2-Ply Search (stage3)</h4><p>Stage 3 incorporates a 2-ply adversarial lookahead, simulating the <strong>opponent’s most damaging candidate response</strong>:</p><pre>Stage 3 objective (self-team perspective):<br>  Score(a) = 0.35 × EWP(after our shot a)<br>           + 0.65 × min_b EWP(after opponent reply b)</pre><p>Here min_b represents the opponent&#39;s candidate that minimizes our team&#39;s EWP. In initial tournaments against unconditioned baselines, Stage 3 finished 1st with a <strong>75.0% win rate and +57 point differential</strong>.</p><h4>Scoring Distribution and Conservative Play Pattern</h4><p>Across <strong>40 ends</strong> in subsequent evaluations, Stage 3 <strong>never scored two or more points in a single end</strong>. Every scoring end produced exactly 1 point. While a team holding hammer may strategically choose a blank end to carry hammer forward, Stage 3 failed to generate multi-point ends even when starting with hammer.</p><p>The 0.65 weight on the opponent’s worst-case reply heavily penalizes multi-stone arrangements as vulnerable to opponent double-takeouts and counterattacks. This conservative evaluation bias appears to be the primary factor suppressing aggressive scoring setups. Disentangling the exact contribution of this weighting would require ablation studies varying evaluator weights, candidate sets, and opponent models.</p><h3>4. Country and Gender Division Conditioning</h3><p>Because the dataset originates from international competitions, we investigated whether conditioning the neural network on nation and division (Men’s / Women’s) could capture stylistic distinctions.</p><p>We extracted metadata across <strong>2,752 ResultsBook pages</strong> spanning Olympic, European, Pan Continental, and World Championships, assigning tags to <strong>181,456 shots</strong>. Olympic records included multilingual headers (Women, Femmes, Donne, Женщины, etc.), and British teams (GBR) were mapped to Scotland (SCO). Zero unclassified records remained: <strong>96,585 Men&#39;s and 84,871 Women&#39;s shots</strong>. (This confirms metadata tagging completeness, distinct from inverse fitting accuracy.)</p><p>The architecture incorporated a <strong>16D country embedding</strong> and a <strong>4D division embedding</strong>. Division tags designate competition categories rather than individual skill differences. During training, condition tokens were dropped to NONE with a 15% probability to allow unconditional inference.</p><h4>Version B — Balanced Country × Division Sampling</h4><p>Country representation was inherently skewed (e.g., Sweden: <strong>16,947 shots</strong>, Korea: <strong>4,983 shots</strong>). Natural-frequency training risks allowing data-rich nations to dominate policy representations. We addressed this by implementing <strong>Version B</strong>, which applied balanced sampling (WeightedRandomSampler, weight 1/N) across country-division pairs, contrasting with the unweighted <strong>Version A</strong>.</p><p>CountryTop2Planner restricts local search (v, θ) strictly to the <strong>two highest-probability shot categories</strong> proposed by the conditioned policy. Rather than evaluating every branch, this preserves the model&#39;s learned tactical tendencies while allowing physics-based fine-tuning.</p><h4>Quantifying Stylistic Differences</h4><p>We measured policy style differences via <strong>token substitution experiments</strong>:</p><p>1. Fix <strong>2,500 test board states</strong>. <br>2. Hold division constant at WOMEN while swapping <strong>country tokens</strong> (KOR, SWE, SUI, SCO, CAN, NOR, GER, NONE). <br>3. Sum CW and CCW probabilities from the 14-way softmax into 7 shot types, averaging across 2,500 boards. <br>4. Define: <strong>Placement Ratio</strong> = Guard + Draw, <strong>Hitting Ratio</strong> = Takeout + Peel, <strong>Style Index</strong> = Placement Ratio ÷ Hitting Ratio. A higher index indicates a placement-heavy style; a lower index indicates a hit-oriented style.</p><pre>┌───────────┬───────────────┬─────────────────┬──────────────┬─────────────┐<br>│ Model     │ Country Token │ Placement Ratio │ Hitting Ratio│ Style Index │<br>├───────────┼───────────────┼─────────────────┼──────────────┼─────────────┤<br>│ Version A │ KOR           │           50.0% │        21.6% │       2.316 │<br>│ Version A │ SWE           │           47.7% │        22.6% │       2.113 │<br>│ Version A │ SUI           │           47.0% │        23.6% │       1.994 │<br>│ Version B │ KOR           │           52.0% │        20.5% │       2.533 │<br>│ Version B │ SWE           │           48.5% │        21.8% │       2.226 │<br>│ Version B │ SUI           │           47.0% │        22.2% │       2.118 │<br>│ Version B │ NONE          │           48.7% │        21.7% │       2.246 │<br>└───────────┴───────────────┴─────────────────┴──────────────┴─────────────┘</pre><p>Balanced sampling increased Korea’s Style Index from <strong>2.316 to 2.533</strong>, the highest among all tested nations.</p><p><strong>Alignment with Training Dataset Labels.</strong> To verify whether this reflects actual historical play, we calculated the empirical Style Index on the supervised training labels:</p><pre>┌────────────────────┬───────────────┬───────────────┬──────────────┬─────────────┬─────────────┐<br>│ Country / Division │ Labeled Shots │ Placement (L) │ Hitting (L)  │ Index (L)   │ Index (VerB)│<br>├────────────────────┼───────────────┼───────────────┼──────────────┼─────────────┼─────────────┤<br>│ KOR_WOMEN          │         3,116 │         49.1% │        21.7% │       2.265 │       2.533 │<br>│ SWE_WOMEN          │         7,789 │         42.9% │        26.5% │       1.622 │       2.226 │<br>│ SUI_WOMEN          │         7,817 │         42.5% │        26.7% │       1.591 │       2.118 │<br>└────────────────────┴───────────────┴───────────────┴──────────────┴─────────────┴─────────────┘</pre><p>The relative ordering (<strong>Korea &gt; Sweden &gt; Switzerland</strong>) is consistent between historical labels and model outputs. Model indices show narrower inter-country variance than raw labels. Because label statistics reflect boards actually encountered while model indices evaluate uniform test boards, absolute values cannot be directly compared, but rank order alignment holds. Note that training labels represent inverse-fitted shot classes, not explicit team declarations.</p><h4>Match Results Against Baseline Stage Planners</h4><p>In two-game series with alternating hammer, Korean Version B (KOR_B) achieved clean 2–0 records against Stage 1, Stage 2, and Stage 3:</p><pre>┌──────────────────────┬──────────────────┬─────────────────────────────┐<br>│ Matchup              │ Match Record     │ Two-Game Aggregate Score    │<br>├──────────────────────┼──────────────────┼─────────────────────────────┤<br>│ KOR_B vs Stage 1     │ 2 Wins – 0 Losses│ 10 : 7                      │<br>│ KOR_B vs Stage 2     │ 2 Wins – 0 Losses│ 15 : 7                      │<br>│ KOR_B vs Stage 3     │ 2 Wins – 0 Losses│ 18 : 7                      │<br>│ SWE_B vs Stage 3     │ 2 Wins – 0 Losses│ 20 : 7                      │<br>└──────────────────────┴──────────────────┴─────────────────────────────┘</pre><p>KOR_B went <strong>6–0 (aggregate 43:21)</strong> against the three Stage planners, and SWE_B added a <strong>2–0 victory</strong> over Stage 3. Although sample sizes are modest, an architecture designed to differentiate play styles substantially improved competitive strength. In particular, KOR_B produced 3- and 4-point <strong>big ends</strong> against Stage 3.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jt8nVidUgH5cVhri_HafOA.png" /><figcaption>Figure 3. Performance comparison against Stage planners (Panel A) and policy distribution shifts induced by country token swapping on identical board configurations (Panel B).</figcaption></figure><p>Three primary hypotheses explain this performance gain:</p><p>1. <strong>Separation of Multimodal Actions:</strong> Country and division conditioning allows the model to partition conflicting tactical decisions across similar boards rather than averaging them into a single distribution. <br>2. <strong>Constrained Search Space:</strong> Restricting local tuning to Top-2 candidate branches mitigates tactical drift and prevents the planner from chasing short-term point optimizations across disparate shot types. <br>3. <strong>Preservation of Multi-Point Scoring:</strong> By avoiding excessive worst-case pessimism, the agent maintained offensive stone placements capable of converting 3- to 4-point ends.</p><h3>5. A 180-Game Virtual League Across 20 Agents</h3><p>We instantiated <strong>20 distinct agents</strong> (10 nations × Men’s and Women’s conditions) and executed complete round-robin tournaments within each division, alternating hammer advantage: <strong>90 women’s games + 90 men’s games = 180 games total</strong>. These simulations reflect policies conditioned on historical data within a unified physics environment, not direct forecasts of national team rankings.</p><h4>5.1 Identical Board, Divergent National Decisions</h4><p>Conditioning solely on KOR_WOMEN versus SWE_WOMEN on identical boards produces clearly differentiated decisions:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tLFj67FKTbFmmCiGASmmVQ.gif" /><figcaption>Animation 2. Tactical divergence on an identical board (End 4, Shot 10, Red hammer, 3:3).</figcaption></figure><p><em>Left: </em><em>KOR_WOMEN condition, Right: </em><em>SWE_WOMEN condition. The Korean agent executes a Hit-and-Roll CCW (2.57 m/s) to clear the opponent&#39;s stone while rolling the shooter onto the button. The Swedish agent plays a Takeout CW (3.85 m/s) to clear a front stone.</em></p><p>Shot frequencies across a complete <strong>10-end match (80 deliveries per team, KOR_WOMEN 2:3 SWE_WOMEN)</strong> demonstrated pronounced stylistic divergence:</p><pre>┌──────────────┬────────────────────────┬────────────────────────┐<br>│ Shot Type    │ KOR_WOMEN              │ SWE_WOMEN              │<br>├──────────────┼────────────────────────┼────────────────────────┤<br>│ Draw         │ 31 (38.8%)             │  4  (5.0%)             │<br>│ Takeout      │ 12 (15.0%)             │ 33 (41.3%)             │<br>│ Hit-and-Roll │ 37 (46.3%)             │ 42 (52.5%)             │<br>└──────────────┴────────────────────────┴────────────────────────┘</pre><p>The Korean-conditioned agent prioritized placement draws, whereas the Swedish agent heavily favored removal takeouts.</p><h4>5.2 Women’s Division League</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F59qS1QOVHuCvN3NvXJm5g.png" /><figcaption>Figure 4. Final standings from the 10-nation simulation leagues (Panel A: Women’s Division, Panel B: Men’s Division).</figcaption></figure><p>In the Women’s division, <strong>KOR_WOMEN</strong> captured 1st place with <strong>9 wins, 2 draws, 7 losses (20 points)</strong>, followed closely by Canada (19 pts), Sweden (19 pts), Switzerland (18 pts), and Japan (18 pts). The Korean agent recorded 52 points scored and 52 conceded (0 differential), with Canada posting the top goal differential (+10).</p><h4>5.3 Men’s Division League</h4><p>In the Men’s division, <strong>SUI_MEN</strong> clinched 1st place with <strong>11 wins, 1 draw, 6 losses (23 points, +16 differential)</strong>. Norway (20 pts), Sweden (20 pts), and Scotland (19 pts) followed.</p><p>Conversely, <strong>KOR_MEN</strong> finished 10th at <strong>7 wins, 1 draw, 10 losses (15 points)</strong>. Despite maintaining a high draw ratio of <strong>30.1%</strong>, placement-heavy play proved less effective in the men’s simulation league.</p><p>The divergent division outcomes highlight how performance varies with <strong>training data distribution, candidate spaces, planning depth, physics parameters, and tournament sample sizes</strong>.</p><h3>6. Champion Series: Korea Women’s AI vs Switzerland Men’s AI</h3><p>To evaluate the top agents, Women’s champion <strong>KOR_WOMEN</strong> and Men’s champion <strong>SUI_MEN</strong> faced off in a <strong>two-game series (10 ends each, 20 ends total)</strong> with alternating initial hammer.</p><h4>Game 1 — Defensive Mastery and Five Blank Ends (3:2)</h4><p><strong>SUI_MEN edged KOR_WOMEN 3:2 in Game 1.</strong> The Korean-conditioned agent forced <strong>five blank ends</strong> (Ends 1, 3, 5, 6, and 7), denying multi-point scoring opportunities. Tied 2:2 entering End 10, the Swiss agent capitalized on hammer advantage to score 1 point for the win.</p><h4>Game 2 — Final End Turnaround and Three-Point Score (5:3)</h4><p>Heading into End 10 of Game 2, <strong>KOR_WOMEN led 3:2</strong>. In End 10, SUI_MEN held hammer (as Korea had scored in End 9) and capitalized by <strong>scoring 3 points to complete a 5:3 comeback victory</strong>. Because the scoring team held hammer, this was a legitimate multi-point hammer conversion rather than a steal.</p><p>Across both games, the Korean-conditioned agent selected <strong>51 draws</strong> compared to <strong>27</strong> by the Swiss agent. Conversely, the Swiss agent executed <strong>57 takeouts</strong> (vs 38 by Korea) and <strong>8 promotions</strong> (vs 0 by Korea).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IUBMKbxStoisDCfNwdXePA.png" /><figcaption>Figure 5. Three-stage breakdown of decisive shots in End 10 of Game 2. (1) Shot 12 (SUI_MEN): Precise promotion of a red stone onto the button behind cover. (2) Shot 15 (KOR_WOMEN): Hit-and-Roll into the 4-foot zone to secure shot stone. (3) Shot 16 (SUI_MEN): Final Hit-and-Roll removing the yellow stone, leaving three red stones in scoring position for a +3 finish and a 5:3 match victory.</figcaption></figure><p>Across the series, <strong>SUI_MEN won both matches (2–0, 8:5 aggregate score)</strong>. This exhibition examined two virtual policies trained under distinct data subsets within the same physics simulator, rather than evaluating real-world national teams.</p><h3>7. Conclusions and Next Research Directions</h3><p>Three primary conclusions emerge from these experiments:</p><p>First, <strong>simple supervised learning (single-output regression) alone was insufficient.</strong> Averaging multimodal physical choices degraded delivery accuracy. Decomposing the action space into 14 distinct physical branches preserved tactical diversity.</p><p>Second, <strong>deeper search lookahead does not inherently produce superior match play.</strong> While Stage 3 considered opponent counter-responses and performed well in preliminary tests, its conservative scoring evaluation prevented it from generating multi-point ends.</p><p>Third, <strong>structuring search to preserve behavioral style enhanced competitive performance.</strong> Conditioning on country and division while restricting local optimization to Top-2 candidate branches outperformed all baseline planners and produced diverse tactical distributions across a 180-game virtual league.</p><p>Our upcoming research will focus on three key steps:</p><ol><li><strong>Full Dataset Retraining:</strong> We will expand from this 52.3% preliminary partition to the complete 432,139-shot dataset (100.0%), incorporating the entire WWCC (2015–2026) archive and post-2018 WMCC seasons to retrain and compare all policies (Part 3).</li><li><strong>Diverse Agent Pool Initialization:</strong> The country- and division-conditioned models will serve as a diverse agent population for multi-style training.</li><li><strong>Reinforcement Learning Integration:</strong> By accumulating physics-evaluated search outcomes, we will advance toward <strong>self-play RL</strong> and <strong>residual RL</strong> (learning fine corrective deltas upon supervised policy proposals).</li></ol><p>Our ultimate objective is enabling an agent that began by imitating human play to discover novel, high-value tactical trajectories beyond the historical dataset.</p><p><em>Research Scope: Country labels in this study designate simulated agents conditioned on historical competition records, not active national teams. Style variations and simulation league standings reflect the specific dataset partition, inverse fitting results, architecture, search heuristics, and physics modeling. Shot categories represent inferred physical classifications rather than verified mental intent.</em></p><p><em>Curling Terminology Reference: </em><a href="https://worldcurling.org/about/curling/"><em>World Curling — What Is Curling?</em></a><em>, </em><a href="https://worldcurling.org/wp-content/uploads/2025/08/Rules-2025.pdf"><em>World Curling — Rules of Curling (2025)</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=59a8699da11d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Teaching an AI to Play Chess on Ice (Part 1): Why Curling, and How I Reconstructed Throws from…]]></title>
            <link>https://nnronin.medium.com/teaching-an-ai-to-play-chess-on-ice-part-1-why-curling-and-how-i-reconstructed-throws-from-c55c4aea8222?source=rss-f02be0ea9f77------2</link>
            <guid isPermaLink="false">https://medium.com/p/c55c4aea8222</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[reinforcement-learning]]></category>
            <category><![CDATA[curling]]></category>
            <category><![CDATA[supervised-learning]]></category>
            <category><![CDATA[simulation]]></category>
            <dc:creator><![CDATA[NN_Ronin]]></dc:creator>
            <pubDate>Wed, 28 Oct 2026 04:00:03 GMT</pubDate>
            <atom:updated>2026-11-04T01:29:08.830Z</atom:updated>
            <content:encoded><![CDATA[<h3>Teaching an AI to Play Chess on Ice (Part 1): Why Curling, and How I Reconstructed Throws from 180,000 Shot Records</h3><blockquote><strong>What if we could see the outcome of a move, but not the action that produced it?</strong><br>I collected shot-by-shot diagrams from Olympic and World Championship curling matches, then used a physics simulator to work backward toward the release speed, angle, and rotation that could have produced each result. This article — Part 1 of the series — covers the pipeline from human demonstrations to supervised learning, physics-based search, and eventually reinforcement learning.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L3DTVFphDcb0-Zp-5xtz5w.png" /></figure><h3>1. Why Curling?</h3><p>From Deep Blue in chess to AlphaGo in Go and AlphaStar in StarCraft II, games have long served as testbeds for artificial intelligence. In my research on reinforcement learning and search algorithms, I was looking for an environment in which an agent would have to do more than memorize good moves. I wanted it to reason about consequences.</p><p>That search led me to <strong>curling</strong>.</p><p>Curling is often called <em>chess on ice</em>. Two teams take turns sliding heavy granite stones down a sheet of ice toward a circular target called the <strong>house</strong>. The small circle at its center is the <strong>button</strong>. Teams try to finish each <strong>end</strong> — roughly the curling equivalent of a round — with their stones closer to the center than their opponent’s. In a standard four-person game, each team delivers eight stones per end, for 16 shots in total.</p><p>From a distance, curling might resemble billiards: a stone hits another stone, which hits something else. But the interesting part is not just the collision. It is deciding <em>which</em> collision, placement, or avoidance is worth pursuing — and what it means for the remaining shots and the rest of the match.</p><p>Three properties made curling particularly appealing to me as an AI research environment.</p><h3>1.1 Continuous actions, nonlinear outcomes</h3><p>In chess and Go, an action usually means selecting one legal square or intersection. In digital curling, the action is more like a physical instruction:</p><ul><li>*<em>Release speed (</em>v<em>):</em>* how fast to deliver the stone.</li><li>*<em>Release angle (</em>θ<em>):</em>* the initial direction of travel.</li><li><strong>Turn (CW or CCW):</strong> the stone’s clockwise or counterclockwise rotation, which affects its curved trajectory, or <strong>curl</strong>.</li></ul><p>A tiny change in speed or angle can change where a stone stops. If the moving stone collides with another, the final arrangement may change dramatically.</p><p>In machine-learning terms, curling combines a <strong>continuous action space</strong> with <strong>nonlinear physical dynamics</strong>. It is not enough to choose an attractive destination; the agent must find a release command that can actually produce it.</p><p>Real curling adds further uncertainty, including ice conditions, sweeping — the act of brushing the ice ahead of a moving stone to affect its travel — and small variations in delivery. My digital simulator does not reproduce every aspect of real-world curling. Depending on its configuration, a simulated release may be deterministic or may include explicitly modeled execution noise. I therefore treat <strong>uncertainty in real curling</strong> and <strong>the behavior of a particular simulator</strong> as related but distinct questions.</p><h3>1.2 A good shot is not always a good strategy</h3><p>Curling has an unusual strategic resource: the <strong>hammer</strong>, the right to deliver the final stone of an end. Because the last shot can change the scoring situation, the hammer is a meaningful advantage — but it is not always best to spend that advantage immediately.</p><p>Consider three common situations:</p><ul><li><strong>Blank end:</strong> An end finishes 0–0. Under normal rules, the team with the hammer retains it for the next end. A team may deliberately pursue a blank rather than take a single point.</li><li><strong>Multiple-point end:</strong> A team scores two or more points in one end. This can be more valuable than securing an easy single point.</li><li><strong>Steal:</strong> A team scores despite <em>not</em> having the hammer. Creating a steal opportunity often involves pressure from carefully placed stones and guards.</li></ul><p>These strategic possibilities exist largely because of the <strong>Free Guard Zone (FGZ)</strong> — often called the <em>five-rock rule</em>. During the first five shots of an end, stones resting between the hog line and the house cannot be removed from play by the opponent. By protecting early <strong>guards</strong> (stones placed in front of the house to block access or shelter future draws), the FGZ prevents teams from simply trading takeouts and allows complex, multi-stone setups to develop.</p><p>A stone landing directly on the button might look perfect in isolation. But if it gives the opponent a straightforward <strong>takeout</strong> — a shot intended to remove another stone — it may be strategically inferior to a less obvious placement behind a guard.</p><p>That distinction is central to the project: <strong>the immediate quality of a board position and its long-term contribution to winning are not the same thing</strong>. A serious agent eventually needs to consider the score difference, hammer possession, Free Guard Zone status, remaining shots, and remaining ends.</p><h3>1.3 A simulator makes experimentation possible</h3><p>Testing tens of thousands of releases on real ice would be impractical. In a simulator, I can reset exactly the same position, vary the speed and angle, and observe the resulting stone trajectories and collisions.</p><p>That capability helps with more than reinforcement learning. It also makes <strong>search</strong> and <strong>supervised learning (SL)</strong> more useful. A neural network can suggest plausible throws, while a physics engine tests what those throws actually accomplish.</p><p>Compared with classical board games such as chess and Go, the digital curling problem I am tackling differs in three fundamental ways:</p><ul><li><strong>Action selection:</strong> Chess and Go choose among discrete legal moves, whereas digital curling requires selecting continuous release parameters.</li><li><strong>State transitions:</strong> In board games, a placed piece lands exactly where selected; in curling, physics determines trajectories, collisions, and final resting positions.</li><li><strong>Decision pipeline:</strong> While board games rely primarily on tree search and position evaluation, digital curling requires candidate generation, physical verification, and longer-term evaluation to work together.</li></ul><p>That combination — continuous control, collisions, and strategic planning — is why I chose curling.</p><h3>2. Building on the Digital Curling Research Ecosystem</h3><p>I did not have to build the entire environment from scratch. Digital curling has an established research and competition ecosystem, particularly around the University of Electro-Communications (UEC) in Japan.</p><p>The UEC Digital Curling competitions have offered a setting in which independently developed AI agents can compete under shared rules and simulation conditions. The project’s open-source tooling also makes it possible to separate the physical simulation from the agent that chooses a shot.</p><p>Useful starting points include:</p><ul><li><strong>Competition and community:</strong> <a href="http://minerva.cs.uec.ac.jp/cgi-bin/curling/wiki.cgi">UEC Digital Curling Wiki</a></li><li><strong>2026 tournament information:</strong> <a href="https://minerva.cs.uec.ac.jp/cgi-bin/curling/wiki.cgi?page=GAT_2026">The 12th UEC-cup Digital Curling Tournament</a></li><li><strong>Open-source project:</strong> <a href="https://github.com/digitalcurling/DigitalCurling">digitalcurling/DigitalCurling</a></li><li><strong>Server and viewer:</strong> <a href="https://github.com/digitalcurling/DigitalCurling4-Server">DigitalCurling4-Server</a> and <a href="https://github.com/digitalcurling/DigitalCurling4-GUI">DigitalCurling4-GUI</a></li></ul><p>My experiments use a <strong>DigitalCurling4-based simulation environment</strong>. The key advantage is the ability to call the simulator programmatically: not only to play a game, but also to recreate historical shots and evaluate candidate actions.</p><p>I also drew inspiration from work on searching continuous actions in simulated curling, including Lee et al. (2018) on deep reinforcement learning and kernel-based Monte Carlo tree search. These ideas have informed how I think about combining a learned policy with physical search, although the inverse-fitting pipeline described below has a different objective.</p><h3>3. Why I Started with Supervised Learning Rather Than Reinforcement Learning</h3><p>My core research focus is reinforcement learning (RL), especially self-play and search-based decision-making. Initially, the most direct approach seemed to be training an agent directly in the simulator and letting it discover effective curling shots through trial and error.</p><p>But there is a problem with starting from nothing.</p><p>A randomly chosen speed may leave a stone far short of the house. Another may send it all the way beyond the playing area. A third may miss every useful target. Before the agent can learn nuanced decisions — such as when to protect a scoring stone or when to remove a guard — it first needs to discover releases that accomplish basic physical tasks.</p><p>That can make learning <strong>sample-inefficient</strong>: many simulated attempts yield little strategic information.</p><p>I therefore chose to begin with <strong>human game records as a source of prior knowledge</strong>. If an agent can first learn the distribution of plausible human shots, later search and self-play do not have to explore the entire continuous action space blindly.</p><p>The historical precedent that influenced me was the original <strong>AlphaGo</strong>. It used supervised learning from human games as one component of its training process, then incorporated self-play reinforcement learning and search. <strong>AlphaGo Zero</strong>, by contrast, was a later system trained through self-play without human game data. They are different approaches; supervised learning is not a mandatory prerequisite for reinforcement learning.</p><p>For <em>my</em> curling project, however, starting from human examples offered two attractive goals:</p><ol><li>Learn to generate physically plausible actions rather than random throws.</li><li>Preserve meaningful patterns of human play before optimizing for stronger competitive performance.</li></ol><p>This decision led to the first major obstacle:</p><blockquote><strong>I could see where a professional player’s stone ended up. But where was the release speed and angle that got it there?</strong></blockquote><h3>4. The Match Records Contained the Results, but Not the Release Commands</h3><p>Official curling <strong>results books</strong> provide a remarkably useful historical record. For competitions such as the Olympics and World Championships, shot-by-shot diagrams show how the stones were arranged as an end progressed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ecuT39PG7bj1pFRzTgGhHA.png" /></figure><p><em>Figure 1. Coordinate relationship between the shot delivery origin (0, 0), initial velocity vector (vₓ, vᵧ), angular spin ω, and the house in my simulator.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ETuxoqJUzWQEDVgmf8YW-A.png" /></figure><p><em>Figure 2. Active play area bounds (X ∈ [−2.375 m, +2.375 m], Y ∈ [32.00 m, 40.245 m]), Free Guard Zone (FGZ), and concentric house ring radii surrounding the button at (0, 38.415 m).</em></p><p>These records can contain more than stone positions: depending on the event and report format, they may include player names, shot descriptions, success percentages, and sometimes rotation indicators.</p><p>But they generally do <strong>not</strong> provide the numerical release command required by my physics-based agent: the stone’s initial speed and release angle. Stone positions, meanwhile, are often presented as diagrams rather than a ready-made table of coordinates.</p><p>That left me with three pieces of information to reconcile:</p><ul><li><strong>Before state:</strong> Where were the stones immediately before a shot?</li><li><strong>After state:</strong> Where were they after the shot was completed?</li><li><strong>Missing action:</strong> Which release speed, angle, and turn could explain the change?</li></ul><p>The missing action is an <strong>inverse problem</strong>.</p><p>A conventional simulation runs forward:</p><pre>FORWARD SIMULATION<br>Initial board + (speed, angle, rotation)<br>                  → Physics simulator → Final board</pre><p>I needed to work in the opposite direction:</p><pre>INVERSE FITTING<br>Initial board + Observed final board<br>                  → Generate a candidate release<br>                  → Run the physics simulator<br>                  → Compare with the observed result<br>                  → Update the candidate and repeat</pre><p>The method is called <strong>inverse fitting</strong> because I use repeated forward simulations to find parameters that fit an already observed outcome.</p><p>There is an important limit to what this can tell us. Different releases can sometimes produce the same, or nearly the same, final arrangement. Inverse fitting therefore does <strong>not</strong> necessarily recover the unique command that a real athlete actually delivered. It recovers <strong>a physically plausible command within the simulator that can account for the recorded transition</strong>.</p><p>That distinction matters. I am reconstructing plausible actions, not reading an athlete’s intentions from a diagram.</p><h3>5. Physics-in-the-Loop Inverse Fitting</h3><p>The main idea is to place the physics simulator <strong>inside an optimization loop</strong>. Rather than predicting an angle once and hoping it is correct, I repeatedly test candidate releases and measure how closely each simulated result matches the historical record.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cLcU_EwpYiMQxdrrzAyjjg.png" /></figure><p><em>Figure 3. Reconstructing simulator-compatible release actions from historical shot diagrams through iterative physical simulation.</em></p><h3>5.1 Separate clockwise and counterclockwise turns</h3><p>A curling stone rotates while sliding. Its rotation contributes to its characteristic curved path, known as <strong>curl</strong>. In the action representation I use, rotation direction is a discrete choice:</p><ul><li><strong>CW:</strong> Clockwise rotation.</li><li><strong>CCW:</strong> Counterclockwise rotation.</li></ul><p>Instead of treating rotation as just another continuous parameter, I search the speed–angle space separately for both turns. I then compare how well the best action for each turn reproduces the observed result.</p><p>If both turns fit almost equally well, the result should retain that uncertainty. A small difference in fitting loss is not proof that the winning turn was the one the original player used.</p><h3>5.2 Match the entire board, not just the delivered stone</h3><p>Curling has several distinct physical shot types. A <strong>draw</strong> is a controlled-weight shot intended to come to rest in a useful position, often inside the house. A <strong>takeout</strong> aims to remove a stone already in play. A <strong>runback</strong> uses a collision with one stone to drive it into another.</p><p>For a simple draw, comparing the new stone’s resting position may seem sufficient. For a takeout or runback, it is not. Multiple stones may move or disappear from play, and the delivered stone itself may end up somewhere unexpected.</p><p>That is why I compare the <strong>entire before-and-after board transition</strong>, not only the final position of the delivered stone.</p><p>One component of the matching process uses <strong>minimum-cost one-to-one assignment</strong> between simulated and observed stones of the same team. An assignment algorithm such as the <strong>Hungarian algorithm</strong> helps find the smallest overall positional discrepancy without assuming that stones are already listed in corresponding order.</p><p>A conceptual objective is:</p><pre>a* = argmin_a  L( S(s_before, a), s_after )</pre><pre>where:<br>  a = (v, θ, turn)<br>  L = D_match + λ_out · P_out + λ_invalid · P_invalid</pre><p>Here:</p><ul><li><strong><em>S</em></strong> is the simulator that maps a board state and release command to a resulting state.</li><li>**<em>D</em>_match** measures how closely the simulated stones match the observed positions, with team identity taken into account.</li><li>**<em>P</em>_out** penalizes discrepancies involving stones that leave play.</li><li>**<em>P</em>_invalid** represents additional validity or consistency penalties.</li></ul><p><em>This equation illustrates the structure of the fitting objective. It is not a line-by-line transcription of every weight, edge case, or rule check in the implementation.</em></p><p>The point is straightforward: a candidate release should not receive a good score merely because the delivered stone finishes close to the right location while the rest of the board is completely wrong.</p><h3>5.3 Optimize speed and angle with CEM and CMA-ES</h3><p>For the continuous part of the search, I applied <strong>derivative-free optimization</strong> techniques such as the <strong>Cross-Entropy Method (CEM)</strong> and <strong>Covariance Matrix Adaptation Evolution Strategy (CMA-ES)</strong>.</p><p>Both methods explore candidate parameters and progressively focus the search on more promising regions. This is especially useful when collisions make the loss surface irregular or difficult to differentiate through.</p><p>In simplified form, the process looks like this:</p><pre>For each turn (CW and CCW):<br>    1. Propose candidate release speeds and angles.<br>    2. Simulate each release from the same before-state.<br>    3. Compare its resulting board with the recorded after-state.<br>    4. Update the candidate distribution using CEM or CMA-ES.<br>    5. Stop when the fitting criterion or compute budget is reached.</pre><pre>Save the best action, reconstruction loss, and relevant diagnostics<br>for each rotation direction.</pre><p>CMA-ES can adapt the covariance of its search distribution, which is useful when speed and angle need to change together. But it does <strong>not guarantee a globally optimal solution</strong>. In crowded positions, several physically distinct shots can lead to similar outcomes; optimization can also become sensitive to initial guesses and search budgets.</p><p>For that reason, fitting quality must be recorded alongside the inferred action.</p><h3>5.4 Handling Complex Collisions with Continuous MCTS</h3><p>While 2D CMA-ES converges in milliseconds for standard draws and single-target hits, crowded positions involving multiple interacting stones (such as runbacks, caroms, or cluster collisions with two or more impacted targets) present a different challenge: the loss surface becomes severely disjointed and multimodal.</p><p>When CMA-ES encounters these complex multi-body collisions, our pipeline activates a continuous MCTS-based search algorithm adapted from <strong>KR-DL-UCT</strong> (Kernel Regression Discrete/Continuous MCTS; Lee et al., 2018). By using Gaussian kernel regression to share search statistics across continuous release parameters (<em>v</em>, <em>θ</em>), it navigates chaotic collision dynamics and identifies the global minimum in roughly <strong>400 physical simulations</strong> — a ~100× speedup compared to an exhaustive 40,000-point grid sweep.</p><p>Combining fast local CMA-ES with an MCTS-based fallback gives the inverse-fitting engine both speed on routine deliveries and robustness on complex multi-stone collisions.</p><h3>6. Turning More Than 180,000 Shot Records into a Dataset</h3><p>The country- and gender-conditioned dataset built for this project contains <strong>181,456 shot records</strong>. In the reported split, there are:</p><ul><li><strong>Training:</strong> 145,390 shots</li><li><strong>Validation:</strong> 18,029 shots</li><li><strong>Test:</strong> 18,037 shots</li><li><strong>Total:</strong> <strong>181,456 shots</strong></li></ul><p>Country and gender metadata were assigned across this collection.</p><p>But I want to be precise about what that figure means. <strong>181,456 is the number of records assembled and organized for the dataset.</strong> It does not, by itself, establish that every historical release was uniquely identified, nor that every inverse-fitted shot was reconstructed with the same tiny positional error.</p><p>Quality control matters just as much as scale. Useful diagnostics include:</p><ul><li><strong>Stone counts and team identities before and after a shot:</strong> Detects extraction and matching errors.</li><li><strong>Position error after physical replay:</strong> Measures how well an inferred action reproduces the record.</li><li><strong>Best-fit losses for CW and CCW:</strong> Identifies confident versus ambiguous rotation assignments.</li><li><strong>Collision, out-of-play, and rule handling:</strong> Catches failures in complicated multi-stone interactions.</li><li><strong>Separate handling of uncertain shots:</strong> Avoids presenting weak reconstructions as unquestionable ground truth.</li></ul><p>The distinction between <strong>physical action</strong> and <strong>human intention</strong> also becomes important here. A final board transition may tell us that one stone was removed or another was pushed forward. It does not necessarily tell us exactly what the player was trying to accomplish.</p><p>In the next stage of the project, when I categorize shots into <strong>14 intent-and-turn branches</strong>, those labels are therefore best understood as <strong>inferred or pseudo-labels</strong> based on physical evidence — not direct measurements of a player’s internal decision-making.</p><p>For me, the milestone was not “recovering the athlete’s mind from a PDF.” It was building a workable bridge between <strong>static historical diagrams</strong> and <strong>actions that a physics simulator can execute</strong>.</p><p>That bridge made the next experiments possible.</p><h3>7. From Reconstructing Human Actions to Choosing Better Shots</h3><p>A straightforward supervised-learning model could take a board position and predict just one release speed and angle. But curling decisions are often <strong>multimodal</strong>: more than one type of shot can make sense in the same situation.</p><p>For example, a player might:</p><ul><li>Place a <strong>guard</strong>: a stone positioned in front of the house to block access to a scoring stone or make an opponent’s next shot harder.</li><li>Play a <strong>draw</strong>: deliver a stone with enough control to stop in the intended area, often in the house.</li><li>Attempt a <strong>freeze</strong>: stop the delivered stone almost touching another, making it difficult to remove cleanly.</li><li>Throw a <strong>takeout</strong>: strike and remove an opposing stone.</li></ul><p>If one neural network simply averages the release parameters of several very different valid choices, the result may be a shot that achieves <strong>none of them</strong>.</p><p>That motivated a later architecture with <strong>seven physical shot types multiplied by two rotation directions</strong>, giving 14 action branches:</p><ul><li><strong>Guard:</strong> Place a stone ahead of the house to obstruct or protect.</li><li><strong>Draw:</strong> Deliver a controlled-weight stone to a useful resting location.</li><li><strong>Freeze:</strong> Stop a stone against, or extremely close to, another stone.</li><li><strong>Takeout:</strong> Remove a stone from play by hitting it.</li><li><strong>Hit-and-Roll:</strong> Hit another stone, then have the delivered stone roll into a new position.</li><li><strong>Peel:</strong> Use a relatively high-weight hit to clear a guard, often with the shooter also leaving play.</li><li><strong>Promotion:</strong> Hit an existing stone to push it to a more useful position, including raise and runback patterns.</li></ul><p>Each shot type has <strong>CW</strong> and <strong>CCW</strong> branches, resulting in 14 candidate action outputs.</p><p>The purpose of these classes is to represent <strong>physical ways of delivering a shot</strong>, not the entire strategic reason for choosing it. A guard can serve different strategies depending on the end, the score, and hammer possession.</p><p>Once the network generates candidates, the physics simulator can replay them individually. A separate evaluator can then estimate which resulting position is most useful. This begins to separate two questions that are often confused:</p><blockquote><strong>What would a human player be likely to throw?</strong><br><strong>Which available throw is actually best for this match situation?</strong></blockquote><p>Those objectives are related, but they are not identical.</p><p>My later experiments have already shown why the distinction matters. A network with higher offline intent-classification accuracy did not necessarily dominate head-to-head matches. An overly conservative opponent-aware planner also showed a tendency to favor safe, low-scoring outcomes rather than opportunities for multiple points.</p><p>These observations deserve their own discussion — and they are the subject of the next installment.</p><h3>Coming in Part 2: Can an AI That Predicts 14 Shot Types Actually Play Curling?</h3><p>In Part 2, I will examine:</p><ol><li><strong>The 14-branch policy:</strong> Why generating distinct physical shot types can be more useful than regressing to a single average throw.</li><li><strong>Three representations of the board:</strong> A distance-sorted vector (DSV), a spatial Grid CNN, and a Set Transformer (SST).</li><li><strong>Country-conditioned playing styles:</strong> Whether models conditioned on Korean, Swedish, and other match records exhibit distinct shot-selection patterns — and what that does <em>not</em> prove about real national teams.</li><li><strong>Simulation-based selection:</strong> Why imitation accuracy and competitive performance can disagree, and how testing candidate shots changes the agent’s behavior.</li></ol><p>Eventually, I want to take the results of physical search and feed them back into learning. But the first step was much less glamorous: making it possible to take a single recorded curling shot and find an action that the simulator could plausibly reproduce.</p><p>That is where this project began.</p><h3>References and Project Resources</h3><ol><li><a href="http://minerva.cs.uec.ac.jp/cgi-bin/curling/wiki.cgi">UEC Digital Curling — Competition and Research Community</a></li><li><a href="https://github.com/digitalcurling/DigitalCurling">DigitalCurling — GitHub</a></li><li><a href="https://curlit.ch/results">World Curling Results Books and Match Records</a></li><li><a href="https://proceedings.mlr.press/v80/lee18b.html">Lee et al. (2018), <em>Deep Reinforcement Learning in Continuous Action Spaces: A Case Study in the Game of Simulated Curling</em> (ICML)</a></li><li><a href="https://research.google/pubs/mastering-the-game-of-go-with-deep-neural-networks-and-tree-search/">Silver et al. (2016), <em>Mastering the Game of Go with Deep Neural Networks and Tree Search</em></a></li><li><a href="https://deepmind.google/blog/alphago-zero-starting-from-scratch/">Google DeepMind, <em>AlphaGo Zero: Starting from Scratch</em></a></li></ol><p><em>This article documents an independent research project and the interpretation of experiments conducted in a digital curling simulator. Country-conditioned AI behavior and simulated match results should not be interpreted as definitive evidence of the abilities, intentions, or relative strengths of real national teams.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c55c4aea8222" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Project QuantAgent 2/2] Teaching RL Agents Market Logic through High-Speed Pattern Matching]]></title>
            <link>https://nnronin.medium.com/project-quantagent-2-3-teaching-rl-agents-market-logic-through-high-speed-pattern-matching-f8b1674eb656?source=rss-f02be0ea9f77------2</link>
            <guid isPermaLink="false">https://medium.com/p/f8b1674eb656</guid>
            <dc:creator><![CDATA[NN_Ronin]]></dc:creator>
            <pubDate>Fri, 17 Apr 2026 15:58:46 GMT</pubDate>
            <atom:updated>2026-05-15T15:23:00.076Z</atom:updated>
            <content:encoded><![CDATA[<p>In my previous post, I shared how I overcame the computational bottleneck of DTW by implementing a <strong>1D-CNN and FAISS-based</strong> search engine. Now, it’s time to put that engine to work. This post covers the end-to-end implementation: from scenario-based data extraction to training an agent that doesn’t just “guess,” but “reads” the market.</p><h3>1. Data Extraction: Defining the Market Scenarios</h3><p>To train a robust agent, we need to narrow down the noise. Using Apple (AAPL) as the primary dataset, I collaborated with generative AI(Gemini) to synthesize three distinct market “templates”: <strong>Bullish (Upward), Sideways (Box), and Bearish (Downward).</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jj0hr_pFfppF8EdeMf2bYA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*izShD2KO8EtsSp9vVOnzMg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wytjUCDBxehIQQASEpUqdg.png" /><figcaption>(From left) Bullish, Sideways, and Bearish</figcaption></figure><p>These patterns were created by referencing historical high-price data. For the training set, I strategically “cut” the data at the end of April to simulate a realistic starting point for the agent to predict subsequent movements.</p><h3>2. Preprocessing: Quality over Quantity</h3><p>During the refinement process, I realized Scenario B (Cup and Handle) was structurally too similar to Scenario A (Bull Flag) for the agent to distinguish effectively at this stage. I decided to focus on <strong>Scenarios A and C</strong>, sorting them by similarity distance and converting them into a <strong>Unity-compatible JSON format</strong>. This ensures the agent is fed with distinct, high-quality “textbooks” of market behavior.</p><h3>3. The Agent’s Perception: Observation Space</h3><p>The “eyes” of our agent are divided into two categories: market flow and internal state.</p><h4>A. Chart Flow Data (100 Candles × 6 Features = 600 Dimensions)</h4><p>At every step, the agent looks at the past 100 candles through the lens of the <strong>current price (lastPrice)</strong>.</p><ul><li><strong>Price Ratios (Open, High, Low, Close / lastPrice):</strong> We discard absolute prices (e.g., $150). The agent only reads the “Shape” and “Pattern” of where the candles were relative to the current price (1.0).</li><li><strong>Log Relative Volume:</strong> Math.Log(1.0 + (Volume / Median)). We compress volume spikes to understand the &quot;energy&quot; and &quot;reliability&quot; of a candle without overwhelming the model.</li><li><strong>Daily Change Rate:</strong> Dividing the daily momentum by 100.0 to stabilize the scale between -1.0 and +1.0.</li></ul><h4>B. Internal State &amp; Macro Indicators (5 Dimensions)</h4><ul><li><strong>Deviation:</strong> A macro compass showing how far the price has strayed from the Moving Average (Overbought/Oversold).</li><li><strong>Capital Ratio:</strong> Tracking asset growth relative to initial capital to teach Money Management.</li><li><strong>ROI of Current Position:</strong> Monitoring profit/loss of the current holding.</li><li><strong>Holding Status:</strong> Represents the current holding state (1 for holding, 0 for empty). This observation is critical for the agent to switch its internal logic between entering or exiting a trade.</li><li><strong>Current Step Ratio:</strong> Teaching the agent the “Pressure of Time” so it learns to liquidate positions before the session ends.</li></ul><h3>4. The Incentive Structure: Reward System</h3><p>The reward system is designed to transform the agent into a &quot;Sniper&quot; rather than a random gambler.</p><ol><li><strong>Portfolio Value (PV) Reward:</strong> The primary motivator. (Current PV - Previous PV) / Previous PV * 100.</li><li><strong>Time Penalty:</strong> A small constant penalty (-0.0001f) per step to prevent passive &quot;idling.&quot;</li><li><strong>Bankruptcy Penalty:</strong> A massive -100.0f penalty if the capital drops below 50%, ending the episode immediately.</li><li><strong>The “Hidden” Penalty (Slippage &amp; Fees):</strong> This is the most crucial part. By applying a 0.1% slippage and a 0.25% transaction fee, the agent effectively loses <strong>~0.7% of its assets per round trip</strong>. This forces the agent to only pull the trigger when it is at least 1% certain of a gain — a margin that comfortably covers the transaction overhead and then some.</li></ol><h3>5. Curriculum Learning: Similarity-Based Progression</h3><p>I sort the entire dataset by their FAISS <strong>“Distance”</strong> score.</p><ul><li><strong>Lesson 0 (Easy):</strong> High-similarity charts (Low Distance). The “textbook” patterns.</li><li><strong>Lesson 1 (Medium):</strong> Moderate variation.</li><li><strong>Lesson 2 (Hard):</strong> High-distance, complex, and noisy data.</li></ul><p>I also progressively introduce a <strong>Transaction Failure Chance</strong>, reaching up to 20% in the final lesson, to ensure the agent can handle execution risks.</p><h3>6. Training Setup</h3><p>I utilized <strong>PPO (Proximal Policy Optimization)</strong> with <strong>16 parallel environments</strong> in Unity to speed up the convergence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*7Mrn0DTBAS83O25ovuGZkQ.gif" /><figcaption>Unity Training Screen</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2sgKdk-dE2uGFnNgq0ELaQ.png" /><figcaption>TensorBoard Graphs</figcaption></figure><h3>7. Testing &amp; Qualitative Analysis</h3><p>I extracted 6 distinct “Scenes” from the history to test the agent’s intelligence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eWVhwDNsKk9yd7mk03BJkQ.png" /></figure><h4>Qualitative Analysis: Is the Agent Smart?</h4><ol><li><strong>Active Exit Decisions:</strong> In Scene 03 and 02, the agent voluntarily exited the market with <strong>0 holdings</strong> before the forced liquidation. It has learned to time the exit.</li><li><strong>Survival Instinct:</strong> In the crashing Scene 01, the agent managed to sell off 90% of its volume before the major drop.</li><li><strong>Time Value Awareness:</strong> By including “Step Progress” in the observation, the agent has conquered the “Sunk Cost Fallacy.” It understands that “opportunities will return, but time is running out.”</li></ol><h3>8. Conclusion: Survival First, Profit Second</h3><p>The results of Project QuantAgent show that a successful trading AI must first be a <strong>Risk Manager</strong>. Our model has secured a “Defense Mechanism” that prevents capital depletion even in bearish markets (Scene 01, 05). While the current ROI might seem modest, the fact that the agent has developed a “Sniper” mentality — ignoring market noise and only acting on high-probability signals — is a significant milestone.</p><h3>9. What’s Next?</h3><ul><li><strong>Rethinking Curriculum</strong>: I’ve found that the “Distance-based” curriculum isn’t as effective as expected. I have also decided to <strong>remove the “Transaction Failure Chance”</strong> from the training logic, as it didn’t add significant value to the algorithm. Instead, I plan to switch to a <strong>“Fee-based Curriculum”</strong>, where the agent starts with zero fees and faces progressively harsher slippage and commissions as it “levels up.”</li><li><strong>Expanding Test Data</strong>: 6 scenes are not enough. To truly validate the agent’s robustness, I will expand the testing pool to include a much wider variety of market conditions and historical periods.</li><li><strong>Aggression Tuning</strong>: Now that the agent has mastered “Survival,” I will be shifting the focus to <strong>“Controlled Aggression.”</strong> The goal is to encourage the agent to be more proactive in bullish scenarios to capture more alpha, while still maintaining its core risk-management foundation.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f8b1674eb656" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Project QuantAgent 1/2] Building StockMatch: How I Ditched Slow DTW for 1D-CNNs & FAISS to Train…]]></title>
            <link>https://nnronin.medium.com/project-quantagent-1-2-building-stockmatch-how-i-ditched-slow-dtw-for-1d-cnns-faiss-to-train-ccbdd784e29c?source=rss-f02be0ea9f77------2</link>
            <guid isPermaLink="false">https://medium.com/p/ccbdd784e29c</guid>
            <category><![CDATA[stockmatch]]></category>
            <category><![CDATA[algorithmic-trading]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[quant]]></category>
            <category><![CDATA[faiss]]></category>
            <dc:creator><![CDATA[NN_Ronin]]></dc:creator>
            <pubDate>Mon, 19 Jan 2026 15:38:11 GMT</pubDate>
            <atom:updated>2026-05-15T15:22:19.377Z</atom:updated>
            <content:encoded><![CDATA[<h3>[Project QuantAgent 1/2] Building StockMatch: How I Ditched Slow DTW for 1D-CNNs &amp; FAISS to Train My RL Agent</h3><p>The biggest bottleneck in training a Reinforcement Learning (RL) agent for stock trading isn’t the model architecture — it’s the <strong>Environment</strong>.</p><p>I wanted to train my agent to master specific market scenarios (e.g., a recovery pattern after a crash). To do this, I needed to feed it thousands of historical examples that looked similar to my target chart. The problem? Finding those “needles in a haystack” within decades of stock data is incredibly difficult.</p><p>This is the story of <strong>StockMatch</strong>: my journey of trial, error, and engineering a high-speed pattern search engine using <strong>1D-CNNs and FAISS</strong>.</p><h3>Attempt 1: The Regression Trap (Ridge, Lasso, SVM)</h3><p>My first intuition was mathematical. If stock charts are just lines, why not fit a line to them?</p><p>I tried using regression algorithms like <strong>Ridge, Lasso, and Support Vector Machines (SVM)</strong> to approximate the shapes of the charts. The idea was to compare the coefficients or the slopes of the regression lines.</p><p><strong>Why it failed:</strong> While regression is great for predicting a trend, it is terrible at matching specific <em>shapes</em> or <em>patterns</em>.</p><ol><li><strong>Rigidity:</strong> A “Double Bottom” (W-shape) pattern loses its distinct features when you try to smooth it out with a simple regression line.</li><li><strong>Timeframe Issues:</strong> The biggest headache was the “Data Period.” Fitting a model to a 30-day window versus a 60-day window yielded completely different parameters, making it impossible to standardize the search.</li></ol><p>I realized I didn’t need a mathematical formula for the line; I needed something that understood the <em>visual essence</em> of the chart.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TK6ZAecZoG5mtWk9RdQDPQ.png" /><figcaption>Test chart : NAS_AVAV(2025.09~2025.12)</figcaption></figure><h3>Attempt 2: The Bottleneck of DTW</h3><p>I moved to the gold standard of time-series similarity: <strong>Dynamic Time Warping (DTW)</strong>. DTW is excellent because it can compare two sequences even if they are slightly out of sync or different speeds.</p><p>I wrote the script, fed in the massive dataset, and waited. And waited.</p><p>The realization: DTW has a computational complexity of roughly $O(N²)$. Scanning millions of historical windows with DTW was computationally impossible for a real-time training environment. I needed speed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jJnkxJXQpZ6aVbTOosPGPQ.png" /><figcaption>Test chart : NAS_AVAV(2025.09~2025.12) with 2 charts</figcaption></figure><h3>The Solution: StockMatch (1D-CNN + FAISS)</h3><p>I decided to shift paradigms. Instead of comparing raw data points, <strong>what if I compressed the “shape” of a chart into a single coordinate (Vector)?</strong></p><p>This led to the architecture of <strong>StockMatch</strong>.</p><h4>1. The Encoder (1D-CNN)</h4><p>I designed a <strong>1D-CNN Denoising Autoencoder</strong>. Instead of feeding clean data, I trained the model using <strong>Data Augmentation</strong>:</p><ul><li><strong>Input:</strong> Charts with injected Gaussian noise, random scaling, and stretching.</li><li><strong>Target:</strong> The clean, original chart.</li></ul><p>This forced the model to learn the <em>essential features</em> (Latent Vector) of the pattern while ignoring the noise.</p><h4>2. The Search Engine (FAISS)</h4><p>Once the model was trained, I converted the entire stock history into vectors. I used <strong>FAISS (Facebook AI Similarity Search)</strong> to index them.</p><p>The difference was night and day. A search query that would take hours with DTW now returns the top-100 most similar patterns in <strong>milliseconds (0.001s)</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ozoQLhKRbDYskZfi_8-Siw.png" /></figure><h3>What’s Next: The “Stage” Approach with Unity ML-Agents</h3><p>Now that <strong>StockMatch</strong> can instantly retrieve thousands of similar historical scenarios, how do I use them?</p><p>I am currently researching a pipeline to integrate this with <strong>Unity ML-Agents</strong>. The core concept is <strong>Curriculum Learning</strong>: treating historical data like “Stages” in a video game.</p><ul><li><strong>Stage 1 (Easy):</strong> The agent trains on charts with a very low distance score (highly similar to the target).</li><li><strong>Stage 2 (Medium):</strong> As the agent’s reward improves, I unlock charts with higher distance scores (more noise/variation).</li><li><strong>Stage 3 (Hard):</strong> The agent faces complex variations to prevent overfitting.</li></ul><p>I plan to automate this “Level Up” system using Unity’s curriculum config.</p><p>In the next post, I will share the results of this integration and whether the “Stage” approach actually produces a profitable AI trader. Stay tuned.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ccbdd784e29c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering AI Aggression: Tuning Multi-Agent Interaction in Unity ML-Agents]]></title>
            <link>https://nnronin.medium.com/mastering-ai-aggression-tuning-multi-agent-interaction-in-unity-ml-agents-be399c4b18c5?source=rss-f02be0ea9f77------2</link>
            <guid isPermaLink="false">https://medium.com/p/be399c4b18c5</guid>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[unity-ml-agents]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[reinforcement-learning]]></category>
            <dc:creator><![CDATA[NN_Ronin]]></dc:creator>
            <pubDate>Sun, 04 Jan 2026 07:40:23 GMT</pubDate>
            <atom:updated>2026-01-04T07:40:23.148Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction: Designing the &quot;Bully&quot; AI</h3><p>In reinforcement learning, we often focus on survival. But what if the goal is to actively interfere with others? I conducted an experiment using <strong>Unity ML-Agents</strong> where the agent’s primary objective wasn’t just to avoid balls, but to <strong>hit other agents</strong> as much as possible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/1*7mQYp4ZFtLJhM57ZaNsoKA.png" /><figcaption>Blue : Player, Green : RL agent(Bully)</figcaption></figure><p>By scaling this “Interference Reward” from 1.5 to 19.5, I observed how an agent evolves from a passive bystander into an aggressive strategist. In this post, I’ll share how I navigated the challenges of training these agents on Google Colab and what the results look like.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3MOMz1Drom_wZ5x143ErCw.png" /></figure><h3>1. The Colab Struggle: Setting up the Lab</h3><p>Running Unity ML-Agents on Google Colab is definitely a struggle, but so worth it for dialing in the effective RL environment settings. ️ To get a stable training loop in a cloud environment, I followed a specific tactical workflow:</p><ol><li><strong>Environment Sync:</strong> Installed <strong>Python 3.10</strong> via pip to ensure compatibility with the latest ML-Agents libraries.</li><li><strong>Source Control:</strong> Git cloned the latest <strong>ML-Agents</strong> repository directly into the Colab instance to access the core training scripts.</li></ol><h3>2. The Experiment: How Much Should I Hit You?</h3><p>The core of this experiment was the <strong>Interference Reward</strong>. Every time my agent successfully hit another agent, it received a designated reward. I tested three distinct scales:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*V7WV7rw6jPrrz_l1dfXcIQ.png" /><figcaption>Total : Reward 1.5~19.5</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iCrJ5lrLVm74nJ9LdRr6Ow.png" /><figcaption>Reward(1.5, 8, 19.5)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-reO034J1015AdIye2yspw.png" /><figcaption>Hitting count(1.5, 8, 19.5)</figcaption></figure><h4>Stage 1: The Passive Observer (Reward: 1.5)</h4><p>With a low reward, the agent is “lazy.” The cost of movement often outweighs the small gain from hitting another agent. It occasionally bumps into others by accident but lacks a clear predatory intent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*DJps-sSVMMfwUkemb49Bbg.gif" /><figcaption>Blue : Player, Green : RL agent(Bully) :</figcaption></figure><h4>Stage 2: The Relentless Attacker (Reward: 19.5)</h4><p>At this extreme, the agent becomes a “bully.” It ignores almost everything else just to score a hit. Its behavior is hyper-aggressive, often resulting in complex chasing patterns that weren’t seen in lower reward tiers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*9zA6GWG1HspgEmXBOaAsig.gif" /><figcaption>Blue : Player, Green : RL agent(Bully)</figcaption></figure><h4>Stage 3: The Tactical Disruptor (Reward: 8.0)</h4><p>This is the “Golden Mean.” At this reward scale, the agent becomes a pragmatic tactician. It doesn’t blindly chase others across the map; instead, it prioritizes <strong>survival first</strong>. The agent only commits to an attack when another agent is within its immediate vicinity. If the target is too far, it focuses on maintaining a safe position and dodging incoming threats. It’s fascinating to watch because the agent appears to be “evaluating” the risk versus the reward of every move.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*8hfLWiphfn0LRNL737Hwgg.gif" /><figcaption>Blue : Player, Green : RL agent(Bully)</figcaption></figure><h3>3. Experience the Chaos: Play with the Agents</h3><p>I’ve made these models available so you can see the difference for yourself. You can jump into the environment and see how each version of the AI reacts to your presence — or how they ruthlessly target each other.</p><ul><li>Move Player(Blue) using the <strong>arrow keys</strong></li></ul><p><a href="https://huggingface.co/spaces/nnronin/AIDodge">AIDodge - a Hugging Face Space by nnronin</a></p><h3>Conclusion: Reward is the Soul of Strategy</h3><p>This project proved that <strong>Multi-Agent interaction</strong> is highly sensitive to the magnitude of competitive rewards. In ML-Agents, you aren’t just coding movement; you are tuning the “personality” of the interaction.</p><p>Next up, I’m planning to take these lessons to a <strong>Uni-Run</strong> project, where I’ll implement a <strong>Transformer Encoder</strong> to handle variable obstacles. If you’ve struggled with Colab or Reward tuning, let’s connect and share insights!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=be399c4b18c5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>