Threefold Repetition Counter
Count observed final-position repetitions by placement, side, rights and only legally capturable en-passant; counters ignored. Caller history adjacency/completeness and checkmate/claim procedure are not certified.
Description
Chess repetition compares position identity while ignoring move clocks.
Chess repetition compares position identity while ignoring move clocks. An en-passant target changes identity only when a legal capture exists.1
Enter a nonempty history through 128 supported FEN strings. Validate each FEN, normalize its repetition key and count the final key’s occurrences. Return threefold/fivefold candidate flags.
When to use Threefold Repetition Counter
Use Threefold Repetition Counter when you need to evaluate the supplied records under the calculation and evidence rules below. History adjacency/completeness and claim procedure are not checked; flags alone do not adjudicate a game.
Prepare the supplied game state, observations and explicit variant settings. Follow the card, board, coordinate and state conventions in the calculation rules.
How to use Threefold Repetition Counter and understand its results
- Prepare the supplied game state, observations and explicit variant settings. Follow the card, board, coordinate and state conventions in the calculation rules.
- Enter observedPositionFens using the field table and calculation rules, then run the tool.
- Read finalPositionOccurrenceCount, threefoldClaimCandidate, fivefoldAutomaticDrawCandidate. The explanation below defines the units, signs, ordering and any flags or placeholder values.
- If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
| Input field | Meaning | Value type; see rules below | Requirement |
|---|---|---|---|
| observedPositionFens | Observed position fens | list of string | Required |
Enter a nonempty history through 128 supported FEN strings. Validate each FEN, normalize its repetition key and count the final key’s occurrences. Return threefold/fivefold candidate flags.
key=placement+side+castling+legallyCapturableEnPassant Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.
| Output field | Meaning | Value type |
|---|---|---|
| finalPositionOccurrenceCount | Final position occurrence count | number |
| threefoldClaimCandidate | Threefold claim candidate | boolean |
| fivefoldAutomaticDrawCandidate | Fivefold automatic draw candidate | boolean |
{
"input": {
"observedPositionFens": [
"4k3/8/8/8/8/8/8/4K3 w - - 0 1",
"4k3/8/8/8/8/8/8/4K3 w - - 4 3",
"4k3/8/8/8/8/8/8/4K3 w - - 8 5"
]
},
"output": {
"finalPositionOccurrenceCount": 3,
"threefoldClaimCandidate": true,
"fivefoldAutomaticDrawCandidate": false
}
} Limitations and assumptions
History adjacency/completeness and claim procedure are not checked; flags alone do not adjudicate a game.
Numeric inputs, where present, must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Numeric lists are limited to 10,000 entries; string lists to 128 strings of at most 128 characters each. The rules above may impose smaller limits. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors. A successfully returned false flag is an evaluated outcome; its meaning is explained above.
Alternative or Complementary methods
Use En Passant Legality Checker: Legal en passant requires the FEN target and a pawn capture that leaves the moving king safe. Removing the captured pawn can uncover a line attack. For a complementary task, use Castling Rights Checker: Standard chess castling needs rights, an empty path and safe king start/transit/destination squares. Queenside also needs an empty b-file square.
References
-
Threefold Repetition Counter — tool.io
Similar or alternative tools
- En Passant Legality Checker
Legal en passant requires the FEN target and a pawn capture that leaves the moving king safe. Removing the captured pawn can uncover a line attack.
- Castling Rights Checker
Standard chess castling needs rights, an empty path and safe king start/transit/destination squares. Queenside also needs an empty b-file square.