Reworked scoring

This commit is contained in:
Mark 2023-12-06 13:57:19 -08:00
parent f33be5fab2
commit a48e6f5d15
Signed by: Mark
GPG Key ID: C6D63995FE72FD80
4 changed files with 207 additions and 162 deletions

View File

@ -13,34 +13,19 @@
\usepackage{afterpage}
\usepackage[hang]{footmisc}
% A row of stars, for showing difficulty
% first arg: filled stars
% second arg: total stars
\def\liststars#1#2{%
\def\oncolor{\color{ogrape}}%
\def\offcolor{\color{white}}%
%
\count255=1%
\count254=#2%
\advance\count254 by -1%
\ifnum #1 > 0
% The $$ are required around \bigstar.
% the special \odot chess piece breaks
% star sizing if they are ommited.
\loop
{\oncolor $\bigstar$}%
\ifnum\count255 < #1
\advance\count255 by 1
\repeat%
\else%
{\oncolor $\bigstar$}%
\fi%
%
\ifnum \count255 < #2%
\loop
{\offcolor $\bigstar$}%
\ifnum\count255 < \count254
\advance\count255 by 1
% Modify default tab positions for better stars
\TabPositions{1.2cm, 2cm, 3cm, 4cm, 5cm, 6cm, 7cm, 8cm}
\def\nstars#1#2{%
\ifnum #2 > 0%
\def\starcolor{\color{#1}}%
\count255=1%
\loop{%
\starcolor $\bigstar$%
}%
\ifnum \count255 < #2%
\advance\count255 by 1%
\repeat%
\fi%
}
@ -102,16 +87,41 @@ $\odot$}}
\fi
}
\@makeORMCbox{hintlist}
{Available Hints}
\@makeORMCbox{@hintlist}
{Score Decomposition:}
{black!12!white}
{black!80!white}
\newenvironment{hintlist}{
\begin{@hintlist}
}{
% Remove vspace from the last \hintcontent
\if@solutions\vspace{-2mm}\fi
\end{@hintlist}
}
\def\threestars#1#2#3{
\nstars{white}{#1}\nstars{ogrape}{#2}\nstars{white}{#3}
}
\def\onestars#1{
\nstars{ogrape}{#1}
}
\long\def\hintcontentnew#1{
\if@solutions
#1 \par
\vspace{2mm}
\fi
}
\long\def\hintcontent#1#2#3{
\if@solutions
\liststars{#1}{#2} \par #3
\nstars{white}{#1}\nstars{ogrape}{#2} \par #3
\vspace{2mm}
\else
\liststars{#1}{#2}
\nstars{white}{#1}\nstars{ogrape}{#2}
\fi\par
}
\makeatother

View File

@ -1,51 +1,49 @@
\section{Rules}
This handout contains a set of problems. \par
Each is marked with a few gold stars, which you collect by presenting a solution.
\vspace{2mm}
Below each problem is a list of hints, written next to their cost. \par
To get a hint, you must pay the marked number of stars. \par
Hints are usually provided in order, and are the same for all groups. \par
\vspace{2mm}
There is one exception: instructors may offer certain hints for a reduced fee,
judging by your explanation of what you have so far.
\begin{instructornote}
This exception is for groups that are stuck on the last bit of a problem. \par
If they've solved most of it, give them the information they already know
for a steep discount (or even for free).
\end{instructornote}
An example problem is below.
Each is marked with a few stars, which you collect by presenting solutions. \par
An example is below.
\vspace{4mm}
\generic{Problem $0$:}
\starvalue{4}
This is a problem that's worth four points. \par
Two hints are available. The first costs two stars (of the four available). \par
The second costs one of the two stars available \textit{after} revealing the first hint.
This is a problem that has two parts. \par
If you solve the problem on your own, your team gets four points. \par
\vspace{2mm}
There are two ways you can ask for assistance: \par
\begin{itemize}[itemsep=1mm]
\item First, you may uncover a hint to a part for $\lceil 0.5 \times \text{that part's value} \rceil$ stars. \par
In this problem, the hints for both part 1 and 2 cost 1 star each. \par
These are always provided in order---you must solve or uncover part 1 to get a hint for part 2.
\item You may also ask an instructor to check the work you have thus far. \par
By doing this, you will earn stars for all parts you no longer need a hint for.
\end{itemize}
\begin{hintlist}
Hint 1:
\hintcontent{2}{4}{This is a hint. Only instructors see this.}
Part 1: \tab\threestars{0}{1}{3} \par
\hintcontentnew{
This is a hint. Only instructors see this.
}
Hint 2:
\hintcontent{1}{2}{This is another hint.}
Part 2: \tab\threestars{1}{2}{1} \par
\hintcontentnew{
This is another hint.
}
\vspace{2mm}
Done: \tab\threestars{3}{1}{0}
\end{hintlist}
\vfill
You may notice that hints often cost a significant fraction of their problem's score. \par
This is intentional---don't ask for hints unless you're very, very stuck.
\vspace{1cm}
Each \say{part} corresponds to one hint in the instructor's handout. \par
(\say{Done} is not a hint, it is simply a bonus for completing the problem).

View File

@ -17,11 +17,18 @@ What was Black's last move, and what was White's last move? \par
}
\begin{hintlist}
Hint 1:
\hintcontent{1}{3}{What was Black's last move? What White do to make this happen?}
Part 1: \tab\threestars{0}{1}{2} \par
\hintcontentnew{
What was Black's last move? What White do to make this happen?
}
Hint 2:
\hintcontent{1}{2}{White uncovered a check. What piece did Black capture?}
Part 2: \tab\threestars{1}{1}{1} \par
\hintcontentnew{
White uncovered a check. What piece did Black capture?
}
\vspace{2mm}
Done: \tab\threestars{2}{1}{0}
\end{hintlist}
\begin{solution}
@ -55,13 +62,15 @@ What was Black's last move, and what was White's last move? \par
% Sherlock, Which color?
\problem{Which color?}
%\difficulty{2}{5}
\starvalue{4}
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.
There is a pawn at G3. What color is it? \par
\hint{Again, White started on the bottom.}
As before, White started on the bottom of the board.
\manyboards{
ke8,
@ -70,14 +79,20 @@ There is a pawn at G3. What color is it? \par
Pd2,Pf2
}
\begin{hintlist}
Hint 1:
\hintcontent{2}{4}{How did the white king get off E1? It must have castled!}
Hint 2:
\hintcontent{1}{2}{
\begin{hintlist}
Part 1: \tab\threestars{0}{1}{3} \par
\hintcontentnew{
How did the white king get off E1? It must have castled!
}
Part 2: \tab\threestars{1}{1}{2} \par
\hintcontentnew{
It castled kingside (how do we know?). Now, how did it get off G1?
}
\vspace{2mm}
Done: \tab\threestars{2}{2}{0}
\end{hintlist}
\begin{solution}
@ -121,11 +136,11 @@ Mate the king in one move. \par
}
\begin{hintlist}
Hint 1:
\hintcontent{1}{4}{Do you need to know \textit{exactly} where the black king is?}
Part 1: \tab\threestars{0}{1}{3} \par
\hintcontentnew{Don't forget about promotion.}
Hint 2:
\hintcontent{1}{3}{Don't forget about promotion.}
\vspace{2mm}
Done: \tab\threestars{1}{3}{0}
\end{hintlist}
\begin{solution}
@ -161,11 +176,16 @@ There is one more piece on the board, which isn't shown. What color square does
Ke1
}
\begin{hintlist}
Hint 1:
\hintcontent{1}{4}{Which piece performed the last capture?}
Part 1: \tab\threestars{0}{1}{3} \par
\hintcontentnew{Which piece performed the last capture on a black square?}
\vspace{2mm}
Done: \tab\threestars{1}{3}{0}
\end{hintlist}
\begin{solution}
Which piece performed the last capture on a black square? It couldn't have been a white pawn, which haven't moved.
@ -184,7 +204,7 @@ There is one more piece on the board, which isn't shown. What color square does
% Sherlock, another monochromatic
\problem{The knight's grave}
%\difficulty{3}{5}
\starvalue{5}
\starvalue{4}
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 less than fourteen moves. \par
Use this information to show that a pawn was promoted. \par
@ -196,17 +216,12 @@ Use this information to show that a pawn was promoted. \par
}
\begin{hintlist}
Hint 1:
\hintcontent{1}{5}{
\par
Part 1: \tab\threestars{0}{1}{3} \par
\hintcontentnew{
Who took the knights? Only one of them is interesting---most are easy to account for.
\vspace{2mm}
}
Hint 2:
\hintcontent{2}{4}{We can easily account for the white knights and the
black knight on G8. Which white pieces can move to capture the black knight on B8?}
\vspace{2mm}
Done: \tab\threestars{1}{3}{0}
\end{hintlist}
\begin{solution}
@ -244,13 +259,17 @@ It is White's move. Have there been any promotions this game? \par
}
\begin{hintlist}
Hint 1:
\hintcontent{3}{6}{
Part 1: \tab\threestars{0}{4}{2} \par
\hintcontentnew{
The black king must have moved from F1. (Why not G1?) \par
This would be impossible if something hadn't blocked check from the white rook.
}
\vspace{2mm}
Done: \tab\threestars{4}{2}{0}
\end{hintlist}
\begin{solution}
Since it is White's move, Black has just moved his king. Where did he move it from?
@ -277,7 +296,7 @@ It is White's move. Have there been any promotions this game? \par
% Sherlock Holmes, two bagatelles (1)
\problem{Whodunit}
%\difficulty{2}{5}
\starvalue{5}
\starvalue{6}
It is Black's move. Can Black castle? \par
\hint{Remember the rules of chess: you may not castle if you've moved your rook.}
@ -292,13 +311,17 @@ It is Black's move. Can Black castle? \par
}
\begin{hintlist}
Hint 1:
\hintcontent{1}{5}{
Part 1: \tab\threestars{0}{4}{2} \par
\hintcontentnew{
Black captured a knight on his last move. \par
Why do we know this, and how did he do it?
}
\vspace{2mm}
Done: \tab\threestars{4}{2}{0}
\end{hintlist}
\begin{solution}
White's last move was with the pawn. \par
Black's last move must have been to capture the white piece which moved before that.
@ -324,6 +347,14 @@ It is Black's move. Can Black castle? \par
\pagebreak
% Sherlock Holmes, two bagatelles (2)
\problem{Castle contradiction}
%\difficulty{2}{5}
@ -341,12 +372,20 @@ It is Black's move. Can he castle? \par
bd1,Rf1,Kg1
}
\begin{hintlist}
Hint 1:
\hintcontent{2}{7}{If White moved his king, Black cannot castle. Why? \par
That's the simple case. The other option: White castled. What did Black do before that?}
Part 1: \tab\threestars{0}{4}{3} \par
\hintcontentnew{
If White moved his king, Black cannot castle. Why? \par
That's the simple case. The other option: White castled. What did Black do before that?
(Also, there was a promotion in this case.)
}
\vspace{2mm}
Done: \tab\threestars{4}{3}{0}
\end{hintlist}
\begin{solution}
If White's last move was with the king, then the black rook moved to check him and Black can't castle.
@ -370,6 +409,15 @@ It is Black's move. Can he castle? \par
% Arabian Knights, intro (given with solution)
\problem{A matter of order}
%\difficulty{3}{5}
@ -392,33 +440,35 @@ Which bishop was it, and what did it capture? \par
\begin{hintlist}
Hint 1:
\hintcontent{1}{8}{
Part 1: \tab\threestars{0}{1}{7} \par
\hintcontentnew{
\begin{itemize}
\item How many pieces are missing? Where were the missing ones captured?
\item How did those pieces get to the place they were captured?
\end{itemize}
\vspace{2mm}
}
Hint 2:
\hintcontent{2}{7}{
Part 2: \tab\threestars{1}{2}{5} \par
\hintcontentnew{
\begin{itemize}
\item The pawn on C3 came from D2, capturing a black rook.
\item The black rook it captured couldn't have moved there before...
\end{itemize}
\vspace{2mm}
}
Hint 3:
\hintcontent{1}{4}{
Part 3: \tab\threestars{3}{2}{3} \par
\hintcontentnew{
\begin{itemize}
\item ...the black pawn on G7 captured a white piece on H6.
\item What else is missing?
\end{itemize}
}
\vspace{2mm}
Done: \tab\threestars{5}{3}{0}
\end{hintlist}
\begin{solution}
First, notice that the pawn on C3 came from D2 by capturing a piece. \par
This must have been a black rook, which is the only missing black piece.

View File

@ -3,7 +3,7 @@
% Sherlock, A matter of direction
\problem{A matter of direction}
%\difficulty{3}{5}
\starvalue{5}
\starvalue{4}
The results of a game of chess are shown below. \par
Did White start on the north or south side of the board? \par
@ -17,8 +17,12 @@ Did White start on the north or south side of the board? \par
}
\begin{hintlist}
Hint 1:
\hintcontent{2}{5}{The bishop on H1 is important. How did White deliver this check?}
Part 1: \tab\threestars{0}{1}{3} \par
\hintcontentnew{
The bishop on H1 is important. How did White deliver this check?
}
\vspace{2mm}
Done: \tab\threestars{1}{3}{0}
\end{hintlist}
\begin{solution}
@ -65,21 +69,23 @@ The white king has again become invisible. Find him. \par
\begin{hintlist}
Hint 1:
\hintcontent{3}{8}{
Part 1: \tab\threestars{0}{2}{6} \par
\hintcontentnew{
Either the white king is on B3, or Black is in check. \par
First, show that the latter implies the former.
\vspace{2mm}
}
Hint 2:
\hintcontent{2}{5}{
Part 2: \tab\threestars{2}{2}{4} \par
\hintcontentnew{
Moving back in time, you'll need to add two pieces to the board (not counting the king). \par
They have been captured!
\vspace{2mm}
}
\vspace{2mm}
Done: \tab\threestars{4}{4}{0}
\end{hintlist}
\makeatletter
\if@solutions
\vfill
@ -158,12 +164,15 @@ White to move. Which side of the board did each color start on? \par
}
\begin{hintlist}
Hint 1:
\hintcontent{4}{10}{
Part 1: \tab\threestars{0}{5}{5} \par
\hintcontentnew{
Double-checks make all positions seem impossible... \par
Try E1 and F2 anyway. Can you add pieces to make it make sense? \par
Don't forget about promotion.
}
\vspace{2mm}
Done: \tab\threestars{5}{5}{0}
\end{hintlist}
\begin{solution}
@ -223,68 +232,46 @@ What is it, and what is its color? \par
Kc1,Rd1,nf1,Bh1
}
\begin{hintlist}
Hint 1:
\hintcontent{1}{20}{
Part 1: \tab\threestars{0}{1}{19} \par
\hintcontentnew{
What color is the missing piece? Count captures.\par
Look at the region bounded by A1 and B3. How did the bishop get there? \par
\note[Note]{This is Part 1}
\vspace{2mm}
Look at the region bounded by A1 and B3. How did the bishop get there?
}
Hint 2:
\hintcontent{1}{19}{
Part 2: \tab\threestars{1}{1}{18} \par
\hintcontentnew{
What was White's last move? \par
What does this tell us about White's king? \par
\note[Note]{This is Part 2}
\vspace{2mm}
What does this tell us about White's king?
}
Hint 3:
\hintcontent{1}{18}{
Part 3: \tab\threestars{2}{1}{17} \par
\hintcontentnew{
Now, look at the region bounded by G1 and H3. \par
In Part 1, we found that all of White's pieces were captured---including the H1 rook. \par
How did it get off its home square to be captured? \par
What does this tell us about the bishop on H1? \par
\note[Note]{This is Part 3}
\vspace{2mm}
What does this tell us about the bishop on H1?
}
Hint 4:
\hintcontent{1}{17}{
Part 4: \tab\threestars{3}{2}{15} \par
\hintcontentnew{
The black bishop on H2 must have been promoted on G1. \par
Which pawn was it, and how did it get there? (Remember, we counted captures in Part 1). \par
In what order did the cross capture by the G1 and H1 pawns occur? \par
\note[Note]{This is Part 4}
\vspace{2mm}
In what order did the cross capture by the G1 and H1 pawns occur?
}
Hint 5:
\hintcontent{5}{16}{
Part 5: \tab\threestars{5}{2}{13} \par
\hintcontentnew{
Which black pieces are still missing? \par
Remember that White cannot castle through check.
}
\vspace{2mm}
Done: \tab\threestars{7}{13}{0}
\end{hintlist}
%\begin{instructornote}
% \textbf{Hints to give:} (in this order)
% \begin{itemize}
% \item How did the black bishop on A2 get there? \note{(Part 1)}
% \item How many captures has Black made? \note{(Part 1)}
% \item What color is the missing piece? \note{(Part 1)}
% \item What was White's last move? What does this imply? \note{(Part 2)}
% \item Which white pieces were captured? \par
% How did they move from their starting positions? \note{(Part 3)}
% \item How did the bishop on H2 get to where it is now? \note{(Part 3)}
% \item Which pawn was promoted to the bishop now on H2? \note{(Part 4)}
% \item Which black pieces are still missing? \note{(Conclusion)}
% \item Remember that White cannot castle through check. \note{(Conclusion)}
% \end{itemize}
%\end{instructornote}
\vfill
\pagebreak