\section{Slightly harder problems}


% Sherlock, A matter of direction
\problem{A matter of direction}
\difficulty{3}{5}

The results of a game of chess are shown below. \par
Did White start on the north or south side of the board? \par

% spell:off
\manyboards{
	ka8,Kc8,
	Qe7,
	Bc5,Pe5,
	Pd4,
	Ph3,
	Bh1
}
% spell:on

\begin{solution}
	Let us first find White's last move. It wasn't with the pawns on D4 and E5, since Black wouldn't have a move before that.
	(Note the double-check on A7).

	\vspace{2mm}

	How, then, did White put Black in check? There are no pieces that could've uncovered this check, and the bishop on H1 couldn't
	have moved from anywhere. We thus see that that bishop must be a promoted pawn, proving that White started on the north side of the board.
\end{solution}

\vfill
\pagebreak
















% Arabian Knights 1
\problem{Where is the king?}
\difficulty{3}{5}


The white king has again become invisible. Find him. \par
\hint{White started on the bottom. En passant.} \par

% spell:off
\manyboards{
	rb5,bd5,
	Ba4,
	kd1
}
% spell:on


\begin{solution}
	Looking at the board, we see that the white king is on B3 or Black is in check.

	\vspace{2mm}

	First, we show that the latter implies the former: assume the black king is not on B3. \par
	How did White deliver this check?
	Not by moving the bishop, so this check must have been discovered by the white king moving from B3.
	Therefore, if the white king isn't on B3 now, he was there on the previous move.

	\vspace{4mm}

	How did the white king end up on B3? That seems to be an impossible double-check from both the rook and bishop!
	Looking at the hint, we place a black pawn on B4 to block check from the rook, and a white pawn on C2 that this black pawn will capture.
	The sequence of moves is now as follows:

	\begin{minipage}{0.5\linewidth}
		\begin{center}
			% spell:off
			\chessboard[
				setpieces = {
					rb5,
					Ba4,pb4,be4,
					Kb3,
					Pc2,
					kd1
				}
			]
			% spell:on
		\end{center}
	\end{minipage}
	\hfill
	\begin{minipage}{0.48\linewidth}
		Black: E4 $\to$ D5 \par
		White: C2 $\to$ C4 \par
		Black: B4 $\to$ C3 (en passant capture) \par
		White: B3 $\to$ C3 \par
		So, the white king must be on C3.
	\end{minipage}

\end{solution}

\vfill
\pagebreak














% Arabian Knights, intro (given with solution)
\problem{Double-checks}
\difficulty{3}{5}


White to move. Which side of the board did each color start on? \par
\hint{What was Black's last move? }

% spell:off
\manyboards{
	Re3,
	Nc2,Rd2,
	Nd1,kf1,Kh1
}
% spell:on

\begin{solution}
	Black's last move was from F2, where his king was in double-check from both a rook and a knight.
	How did this happen?

	\vspace{2mm}

	White started on the north side of the board, and put Black in check by capturing a piece on D1 with
	a pawn and then promoting that pawn to a knight.

	\begin{center}
		\chessboard[
			smallboard,
			setpieces = {
				Re3,
				Nc2,Rd2,Pe2,
				bd1,kf2,Kh1
			}
		]
	\end{center}

\end{solution}

\vfill
\pagebreak







% Sherlock, another monochromatic
\problem{Monochromatic}
\difficulty{4}{5}

In the game below, no pieces have moved from a black square to a white square or from a white square to a black square.
The white king has made fewer than fourteen moves. \par
Use this information to show that a pawn was promoted. \par

% spell:off
\manyboards{
	ke8,
	Pb2,Pd2,
	Ke1
}
% spell:on

\begin{solution}
	Knights always move to a different colored square, so all four missing knights must have been captured on their home square.
	What pieces captured them?

	\vspace{2mm}

	We can easily account for the white knights and the black knight on G8, but who could've captured the knight from B8?
	The only white pieces that can move to black squares are pawns, the Bishop (which is trapped on C1), the rook (which is stuck on column A and row 1), or the king (which would need at least 14 moves to do so).

	\vspace{2mm}

	If this knight was captured by a pawn, that pawn would be immediately promoted. If it was captured by a piece that wasn't a pawn, that piece must be a promoted pawn.
\end{solution}

\vfill
\pagebreak




% Sherlock, another question of location
\problem{Superposition}
\difficulty{4}{5}

A white pawn is missing; it is either on F2 or G2. \par
Where is it?

% spell:off
\manyboards{
	ke8,rh8,
	pa7,pf7,pg7,
	pa6,pb6,
	pb5,
	Pa4,Pb4,Pc4,
	pa3,
	Pa2,Pb2,
	Ke1
}
% spell:on

\vfill
\pagebreak

% Sherlock, another question of location
\problem{Possibility}
\difficulty{4}{5}

Show that black can castle to either side. \par
We know the following:

\begin{itemize}
	\item White started the game missing one rook.
	\item White has not moved either knight
	\item No promotions have been made
	\item White's last move was from E2 to E4.
\end{itemize}

% spell:off
\manyboards{
	ra8,ke8,rh8,
	pa7,bb7,pc7,pd7,pf7,pg7,ph7,
	nc6,nh6,
	pe5,qg5,
	bb4,Pe4,
	Pb2,Pc2,Pd2,Pf2,Pg2,Ph2,
	Nb1,Bc1,Qd1,Ke1,Bf1,Ng1,Rh1
}
% spell:on


\vfill
\pagebreak





% Sherlock, little exercise 2
\problem{Kidnapping}
\difficulty{4}{5}

On which square was the White queen captured?. \par

% spell:off
\manyboards{
	ra8,qd8,ke8,ng8,rh8,
	pa7,pb7,pc7,pe7,pf7,ph7,
	nc6,pe6,ph6,
	Pb3,
	Na2,Pb2,Pc2,Pd2,Pe2,Pf2,Pg2,Ph2,
	Ra1,Ke1,Rh1
}
% spell:on

\begin{solution}
	White is missing a queen, both bishops, and one knight. \par
	The black pawns on E6 and H6 account for two captures.

	\vspace{2mm}

	Neither white bishop could've been captured by these pawns,
	since both are trapped by their pawns. Thus, these black pawns must have captured a queen and a knight.

	\vspace{4mm}

	The white pawn on B3 must have captured a black bishop. \par
	The white queen got onto the board through A2. \par
	Therefore, the pawn on B3 made its capture before the queen escaped,
	and the black bishop was captured before the white queen.

	\vspace{4mm}

	Similarly, the bishop from C8 must have been
	captured on B3 after the capture on E6, since it
	got on the board through D7.


	\vspace{4mm}

	The capture on E6 was made before the capture on B3 (black bishop),
	which was made before the white queen was captured.
	Therefore, the white queen was not captured on E6, and must
	have been lost on H6.
\end{solution}

\vfill
\pagebreak




% Arabian Knights 4
\problem{A missing piece}
\difficulty{6}{8}


There is a piece at G4, marked with a $\odot$. \par
What is it, and what is its color? \par

% spell:off
\manyboards{
	ra8,ke8,rh8,
	pc7,pd7,
	pb6,
	pa5,
	Ug4,
	Pb3,Pg3,Ph3,
	ba2,Pb2,Pc2,Pd2,Pf2,qg2,bh2,
	Kc1,Rd1,nf1,Bh1
}
% spell:on


\makeatletter
\if@solutions
	\vfill
	\pagebreak
\fi
\makeatother


\begin{solution}
	\textbf{Part 1:}

	The black bishop on A2 cannot be original, since the white pawn on B3 would have prevented it from getting there.
	That bishop is a promoted bishop. \par

	The black pawn it was promoted from must have come from E7,
	captured four pieces to get to A3, then moved to A2, and then made a capture on B1, where it was promoted. \par

	Thus, the pawn from E7 has made five captures.

	\vspace{2mm}

	The white bishop from from C1 never left its home square
	(since neither of the pawns on B2 or D2 have moved), and hence was captured on C1. This makes six captures of
	white pieces, which tells us that the mystery piece is black.


	\vspace{2mm}

	\textbf{Part 2:}

	White's last move could not have been with the rook from E1, which would have checked Black,
	nor with the king (which could only come from B1, an impossible check),
	nor could it have been with any piece other than the rook or king.
	Therefore, White just castled, and thus the white king never moved before that.


	\vspace{2mm}

	\textbf{Part 3:}

	Among the white pieces captured by the black pawn from E7 was the white rook from H1. Since White has just castled,
	and the white king never moved before that, how did the rook from H1 get onto the board to be captured?

	The only possible explanation is that the pawns on G3 and H3 cross-captured to let out the rook:
	the pawn on G3 really came from H2 and vice-versa. Since the pawn on G3 comes from H2, the black bishop
	on H2 has always been confined to G1 and H2. How did the bishop get there? It must have been promoted.


	\vspace{2mm}

	\textbf{Part 4:}

	The promoted black bishop on H2 must have been promoted on G1. The pawn which was promoted must have come from G7,
	since neither of the pawns from F6 or H6 could make a capture to get to the G-file (all six missing white pieces have been accounted for).
	The Pawn from E7 has promoted to the bishop on A2.

	What happened was this: the white pawn from G2 made its capture on H3 while the pawn on G3 was still on H2. This allowed the black pawn
	to come down and be promoted (after the white rook from H1 got out), and then the pawn on H2 made its capture on G3.


	\vspace{2mm}

	\textbf{Conclusion:}

	We already know the mystery piece is black. It can't be a pawn, because we've accounted for all missing black pawns.
	It can't be a queen or a rook, since there couldn't have been any more promotions by Black. It is therefore a bishop or a knight.
	However, White has just castled and moved his king over D1, so the mystery piece cannot be a bishop (the king may not cross through
	check while castling). Therefore, the mystery piece must be \textbf{a black knight}.

\end{solution}

\vfill
\pagebreak