Join the conversation

Join the community of Machine Learners and AI enthusiasts.

Sign Up
Chris4K 
posted an update about 1 month ago
Post
3,095
Can a network whose trunk is only XOR, table lookups and integer adds learn Connect Four?

Partly. I trained a GF(2⁸) integer model (8.4M params, CPU-only) on 320k games labelled by a negamax search teacher.

What it learned:
• agrees with the teacher on 59.6% of training / 41.0% of board-disjoint holdout positions
• beats a random player 85.2% of the time

What it didn't:
• loses to a 1-ply "win now / block now" rule (wins 37.2%)
• loses to 2-ply lookahead (wins 24.3%)

Agreeing with a teacher is not the same as playing well, and this release measures both.

Caveat up front: the float32 read-out is 99.6% of the parameters. The trunk is float-free; the full model isn't yet.

The repo also documents six bugs that each produced a plausible but wrong number. In one, 41% of the supervision was silently all-zero.

🎮 Play: Chris4K/connect-four-gf256 (Space)
🧠 Model: Chris4K/connect-four-gf256
📦 Dataset: Chris4K/connect-four-gf256 320k games + per-ply targets, MIT
💻 Code + paper: https://github.com/Ckal/connect-four-gf256

Feedback welcome, especially: which baseline would convince you?

The 1-ply rule is already the convincing baseline. It also tells you what to measure next.

"Win now / block now" only decides when a threat is on the board. In quiet positions it has nothing to say.
So wrap your net in that same override and play it against plain 1-ply.
If it wins, the trunk learned positional play. If it only ties, the 41.0% holdout agreement is coming from tactical positions the rule already covers.

You can see the same thing without playing a game: split the holdout agreement into threat-on-board vs quiet positions.

Which half do you expect to be higher?

·

Damn.... I created a branch ran a few tests (because i am not so good in guessing ;) ) and...

Thanks for the suggestion—I tested the released V6 checkpoint with a “win now / block now” override against the same rule with a centre-first fallback.

From 200 fresh 12-move openings, played twice with colours swapped, the hybrid scored 171 wins, 209 losses and 20 draws: 45.25% over 400 games. Neither player used random moves after the opening. The starting boards and their mirrors were excluded if they appeared in the training corpora or the earlier tactical dataset.

On this sample, the model’s choices in quiet positions did not improve on the centre-first fallback. The result doesn’t prove the model learned no positional patterns, but it doesn’t demonstrate a useful advantage over the one-ply baseline.

Separately, on training-board-disjoint positions without an immediate win or threat, the model agreed with the time-limited teacher on 35.7% versus 43.1% for centre-first. That’s not a direct comparison with tactical accuracy, which we measured differently.

The test and results are in commit 8fe1cab; I’ll push it shortly.

Wow it's interesting! I love experimenting with unusual neural network architectures as well