In[]:=
showChessPosition[fen_String]:=(*beginwiththefenposition*)fen//​​(*extracttheboardrepresentation*)Part[StringSplit[#],1]&//​​(*splitintorowsusingtotheslashdelimiter*)StringSplit[#,"/"]&//​​(*replacepiecesnameswithunicodeequivalentcharacters*)StringReplace​​#,​​"K""♔","Q""♕","R""♖","B""♗","N""♘","P""♙",​​"k""♚","q""♛","r""♜","b""♝","n""♞","p""♟"​​​​&//​​(*splitintocharacters*)Characters//​​(*replacedigitsbythecorrespondingnumbersofemptysetcharacters*)#//.{​​n_StringToExpression[n]/;DigitQ[n],​​n_IntegerSplice[ConstantArray["∅",n]]​​}&//​​(*Flatten*)Flatten//​​(*rifflecoordinates*)Riffle[#,Reverse/@Tuples[{Range[8,1,-1],Range[8]}]]&//​​(*partitionintwo*)Partition[#,2]&//​​(*filteremptysquaresout*)Cases[#,{Except["∅"],__}]&//​​(*turnintoText*)#/.{p_String,coord__}Text[Style[p,FontSize24],{-.5,-.5}+coord]&//​​(*turnintoGraphics*)Graphics@#&//​​(*overlayanemptychessboard(usinghttps://mathematica.stackexchange.com/questions/58690/how-to-build-a-game-board)*)Show[{​​MatrixPlot[​​Table[Mod[i+j,2],{i,8},{j,8}],​​ColorFunctionGrayLevel,​​FrameTicks{{#,#}&@Table[{i,8-i+1,0},{i,8}],{#,#}&@Table[{i,FromCharacterCode[ToCharacterCode["a"]+i-1],0},{i,8}]}​​],​​#​​}]&
In[]:=
showChessPosition@"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"
Out[]=