The maximum character length of a FEN string

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: The maximum character length of a FEN string

Post by sje »

If no draw is claimed by the fifty move rule, then:
[d]r1b1kb1r/1n1q1n2/p1p1p1p1/1p1p1p1p/1P1P1P1P/P1P1P1P1/1N1Q1N2/R1B1KB1R w KQkq - 100 5000[/d]
The FEN string for the above has 87 characters.

The position can be reached from the initial array. Perhaps someone can improve upon this.