Hacker News Viewer

Optimal Strategy for Connect 4

by marvinborner on 4/8/2026, 7:37:50 PM

https://2swap.github.io/WeakC4/explanation/

Comments

by: tromp

&gt; which is fundamentally different from existing strong and weak solutions<p>It doesn&#x27;t seem fundamentally different from Victor Allis&#x27; solution, but 2swap managed to generalize and streamline the rules available for static solutions, while also picking the winning moves that reduce the overall tree size.<p>&gt; A weak solution can be visualized in a way that a strong solution (14tb uncompressed, 350gb compressed) cannot.<p>That is using an overly strict interpretation of strong solution. My database of all roughly 68000 8-ply positions allows for computing the best move from any position within seconds and takes only 12KB compressed (using one trit per 8-ply position, 5 trits per byte, using remaining 256-3^5=13 values for run length encoding).<p>[1] <a href="https:&#x2F;&#x2F;tromp.github.io&#x2F;c4&#x2F;c4.html" rel="nofollow">https:&#x2F;&#x2F;tromp.github.io&#x2F;c4&#x2F;c4.html</a>

4/11/2026, 9:07:12 AM


by: sillysaurusx

I&#x27;m surprised no one linked to his video on the topic. I can&#x27;t overstate how high quality it is. The graphs are simply beautiful, and it made me think he had a whole production team behind him. That he was able to do cutting-edge work like this (it&#x27;s new, which qualifies) while creating a work of art is incredible.<p>&quot;I Solved Connect 4&quot; <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=KaljD3Q3ct0" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=KaljD3Q3ct0</a>

4/11/2026, 9:55:51 AM


by: Someone

FTA: “As a motivating example: player 1 (hereafter dubbed &quot;Red&quot;) can win by playing in the center column on the first move and then following the weak solution&#x27;s suggestions, but would not be guaranteed to win if the first disc is played elsewhere. The weak solution contains no information about what would happen in the other columns- As far as Red cares, it would be redundant to learn those branches, since they are not good.”<p>I don’t think that “since they are not good” is necessary for a weak solution. Even if every first move were winning, it still would be redundant to learn how to win for every possible opening move.<p>A weak solution gives you a guaranteed way to move from START to a win, whatever counterplay, not all ways to go from START to a win, whatever counterplay.

4/8/2026, 7:53:13 PM


by: cachius

This guy’s videos are awesome. He also has one on Klotski and the double pendulum. Beautiful graph animations.

4/11/2026, 8:48:50 AM