Basic Format
Moves are digits 1-7, each representing a column to drop a piece in:1= Drop piece in leftmost column4= Drop piece in center column7= Drop piece in rightmost column
Columns are numbered 1-7 for user input, but internally the code uses 0-6 indexing (source/src/main.cpp:50).
Move Sequences
Multiple moves are written as consecutive digits with no spaces:- Player 1 drops in column 4
- Player 2 drops in column 4
- Player 1 drops in column 3
- Player 2 drops in column 3
Players Alternate Automatically
You don’t specify which player makes each move — they alternate:- Odd-numbered moves (1st, 3rd, 5th…): Player 1 (shown as
X) - Even-numbered moves (2nd, 4th, 6th…): Player 2 (shown as
O)
Validation
The move parser (source/src/main.cpp:39-64) performs two checks:1. Valid Column Number
Only digits 1-7 are accepted:2. Column Not Full
Each column can hold at most 6 pieces:Examples from README
Center Opening
Stack and Respond
- Moves 1-2: Both players stack in column 4
- Moves 3-4: Both players stack in column 3
- Moves 5-6: Both players stack in column 2
- Move 7: Player 1 plays in column 1
Internal Representation
While users enter columns as 1-7, Marlin internally uses 0-based indexing: Conversion (source/src/main.cpp:50):Why This Format?
This compact notation is:Fast to type
position 4433 beats position col4 col4 col3 col3Easy to parse
Single character per move (source/src/main.cpp:42)
Unambiguous
Only one piece can be placed per column per turn
Standard
Similar format used by other Connect 4 solvers
Related
- CLI Commands - Full command reference
- Understanding Scores - How to interpret solver output