Opening your Connect Four workspace.
Loading your game…
- 1 · Set up
- 2 · Train
- 3 · Check
- 4 · Run
Know the grounds. Set the goal. Then train.
- Environment & assumptions
- Measurable goal
- Reference strategy
- Training phases
- Checks & limits
Objectives & optimization
Example: Success at least 90%; score at least 5; steps at most 500; prioritize efficiency. Separate clauses with semicolons. Use supported metrics shown in Use values. Choose game rules and the task in World; text does not create new mechanics.
Connect Four
One environment. Repeatable decisions. Visible evidence.
What you teach
Drop discs into seven columns. Choose an empty board or an eight-disc seeded opening. New rounds and training preserve that opening mode; legacy seed 0 starts empty. Make four in a row before the reference opponent. A full board is a draw.
Perfect public board. Engineered features count immediate wins, threats and centre proximity. This imitates a shallow tactical reference, not solved play.
- World: try the reference, then control a round yourself.
- Train: fit a small action-scoring network away from the animation.
- Results: compare paired seeds, inspect losses and activate checked weights.
- World: test a new seed. Save project to keep your model.
Connect Four
Watch decisions change the outcome.
Random rounds start with eight opening discs.
Manual buttons work with You · manual. Step advances the selected policy. One step is one decision, including the reference opponent response where applicable. Reset after a round ends.
Rules and what the network sees
Drop discs into seven columns. Choose an empty board or an eight-disc seeded opening. New rounds and training preserve that opening mode; legacy seed 0 starts empty. Make four in a row before the reference opponent. A full board is a draw.
Perfect public board. Engineered features count immediate wins, threats and centre proximity. This imitates a shallow tactical reference, not solved play.
An Alkamy Labs experiment · Explore our labs ↗
From features to an action.
6 learned weights → one score for each legal action.
A single linear neuron scores each action. It receives these engineered features, not a teacher’s chosen action:
- Bias
- Immediate win
- Stop immediate loss
- Future winning columns
- Opponent winning columns
- Centre proximity
Ridge least squares fits the weights from synthetic reference scores. Rules supply legal actions, feature extraction and opponent behaviour. This is imitation learning. It does not discover an optimal strategy through self-play.
Perfect public board. Engineered features count immediate wins, threats and centre proximity. This imitates a shallow tactical reference, not solved play.
Train. Freeze. Compare.
Active weights stay in place while the candidate is checked.
64 fitting seeds, 12 validation seeds and 24 final seeds. Validation selects between two ridge strengths; final tests cannot change the selected weights. Maximum 25 seconds of computation, 30-second worker timeout and two attempts per training round.
Ready · no provider or API key needed.
Activation gate: ≥80% near-best reference-score agreement, finite compatible weights and final mean score at least the untrained baseline and a checked incumbent, when present. Passing this small test does not guarantee future wins.
Uses fresh teacher examples and the current two-attempt training round. Review each candidate before activation. Run keeps active weights fixed.
Off. Train manually, or start another training round when both attempts are used.
What changed?
Compare the same seeds. Keep the losses.
Train or check saved weights for a measured comparison.
Complete a round or training run to see observations and a controlled next test.