% !Mode:: "TeX:UTF-8"
% !TEX encoding = UTF-8 Unicode

\begin{center}
  \begin{tikzpicture}
    \tikzset {
      block/.style={,draw,inner sep=2pt,rounded corners=2pt,fill=white}
    }
    \begin{scope}

      \node (x) at (0,0) {$\mathbf{x}$};
      \node [anchor=north,text width=.75\textwidth,block] (x) at (x.south) {\footnotesize{Karen's students are about to take a standardized test. Karen gets a \$500 bonus if their average score is above 75, plus an extra \$10 bonus for every additional point the average score increases above 75. So far, Karen has graded 8 tests, and the average is 70. Given that each student can have a maximum score of 150, what combined score do the last two tests need to have for Karen to earn a \$600 bonus?\\}};

      \def\blockheight{2.5cm}
      \node [anchor=north,text width=.25\textwidth,block,minimum height=\blockheight] (y part1) at ([yshift=-1cm]x.south) {\footnotesize{Let's denote the combined score of the last two tests as $x$. Given that Karen has graded 8 tests and the average is 70, the sum of the scores of the first 8 tests is $8 \times 70 = 560$.\\}};
      \node [anchor=south east, draw,fill=black!5!white] at (y part1.south east) {\scriptsize{\textbf{Reward: 7}}};
      \node [anchor=east,text width=.25\textwidth,block,minimum height=\blockheight] (y part2) at ([xshift=-.5cm]y part1.west) {\footnotesize{The first step is to calculate how much the average score needs to be above 75 for that extra \$100:\\ Extra points required = $\frac{100}{10}$ = 10\\}};
      \node [anchor=south east, draw,fill=black!5!white] at (y part2.south east) {\scriptsize{\textbf{Reward: 1}}};
      \node [anchor=east,inner sep=0] (lcdots) at ([xshift=-.1cm]y part2.west) {\LARGE{$\cdots$}};
      \node [anchor=west,text width=.25\textwidth,block,minimum height=\blockheight,draw=lolred,line width=.05cm] (y part3) at ([xshift=.5cm]y part1.east) {\footnotesize{First subtract \$500 from Karen's goal bonus amount to find how much she makes from the extra \$10/point bonus: \$600 - \$500 = \$100\\}};
      \node [anchor=south east, draw,fill=black!5!white] at (y part3.south east) {\scriptsize{\textbf{Reward: 8}}};
      \node [anchor=west,inner sep=0] (rcdots) at ([xshift=.1cm]y part3.east) {\LARGE{$\cdots$}};
      \begin{scope}[on background layer]
        \node [anchor=north,fill=black!5!white, rounded corners=2pt, inner sep=8pt, fit=(lcdots)(y part1)(y part2)(y part3)(rcdots)] (y) {};
      \end{scope}

      \def\blockheight{2.5cm}
      \node [anchor=north,text width=.25\textwidth,block,minimum height=\blockheight,draw=lolred,line width=.05cm] (y part1 1) at ([yshift=-1cm]y part1.south) {\footnotesize{Then divide the extra bonus by the extra rate: \$100 / \$10/point = 10 points\\}};
      \node [anchor=south east, draw,fill=black!5!white] at (y part1 1.south east) {\scriptsize{\textbf{Reward: 9}}};
      \node [anchor=east,text width=.25\textwidth,block,minimum height=\blockheight] (y part2 1) at ([xshift=-.5cm]y part1 1.west) {\footnotesize{Then, divide the remaining bonus amount by the extra bonus amount per point to find out how many additional points Karen needs: \$100 / \$10 = \$10\\}};
      \node [anchor=south east, draw,fill=black!5!white] at (y part2 1.south east) {\scriptsize{\textbf{Reward: 2}}};
      \node [anchor=east,inner sep=0] (lcdots) at ([xshift=-.1cm]y part2 1.west) {\LARGE{$\cdots$}};
      \node [anchor=west,text width=.25\textwidth,block,minimum height=\blockheight] (y part3 1) at ([xshift=.5cm]y part1 1.east) {\footnotesize{Then, divide the \$100 bonus by \$10/point to find the additional average score Karen needs: \$100 / \$10/point = 10 additional points.\\}};
      \node [anchor=south east, draw,fill=black!5!white] at (y part3 1.south east) {\scriptsize{\textbf{Reward: -1}}};
      \node [anchor=west,inner sep=0] (rcdots) at ([xshift=.1cm]y part3 1.east) {\LARGE{$\cdots$}};
      \begin{scope}[on background layer]
        \node [anchor=north,fill=black!5!white, rounded corners=2pt, inner sep=8pt, fit=(lcdots)(y part1 1)(y part2 1)(y part3 1)(rcdots)] (y 1) {};
      \end{scope}

      \def\blockheight{3.5cm}
      \node [anchor=north,text width=.25\textwidth,block,minimum height=\blockheight] (y part1 2) at ([yshift=-1cm]y part1 1.south) {\footnotesize{Then, multiply the number of additional points needed by the number of tests Karen has yet to grade, which is 2: 10 points * 2 tests = 20 points.\\}};
      \node [anchor=south east, draw,fill=black!5!white] at (y part1 2.south east) {\scriptsize{\textbf{Reward: -4}}};
      \node [anchor=east,text width=.25\textwidth,block,minimum height=\blockheight] (y part2 2) at ([xshift=-.5cm]y part1 2.west) {\footnotesize{Then, Karen needs the combined score of the last two tests to be 10 points higher than the average of 75. Since there are two tests, the combined score for the last two tests needs to be 20 points higher than the average.\\}};
      \node [anchor=south east, draw,fill=black!5!white] at (y part2 2.south east) {\scriptsize{\textbf{Reward: 3}}};
      \node [anchor=east,inner sep=0] (lcdots) at ([xshift=-.1cm]y part2 2.west) {\LARGE{$\cdots$}};
      \node [anchor=west,text width=.25\textwidth,block,minimum height=\blockheight,draw=lolred,line width=.05cm] (y part3 2) at ([xshift=.5cm]y part1 2.east) {\footnotesize{Then add the 10 extra points to the baseline 75 point goal to find the students' average test score: 10 points + 75 points = 85 points\\}};
      \node [anchor=south east, draw,fill=black!5!white] at (y part3 2.south east) {\scriptsize{\textbf{Reward: 10}}};
      \node [anchor=west,inner sep=0] (rcdots) at ([xshift=.1cm]y part3 2.east) {\LARGE{$\cdots$}};
      \begin{scope}[on background layer]
        \node [anchor=north,fill=black!5!white, rounded corners=2pt, inner sep=8pt, fit=(lcdots)(y part1 2)(y part2 2)(y part3 2)(rcdots)] (y 2) {};
      \end{scope}

      \draw [->] (x.south) -- ([yshift=.28cm]y part1.north);
      \draw [->] (y part3.south) .. controls +(0,-.8cm) and +(0,+.8cm) .. ([yshift=.28cm]y part1 1.north);
      \draw [->] (y part1 1.south) -- ([yshift=.28cm]y part1 2.north);
      \draw [->,lolblue] (y part3.south) node [xshift=1.0cm,yshift=-.5cm,right] {\footnotesize{\textbf{Self-refinement}}} arc [start angle=225, end angle=495, radius=1.95cm];

      \node [anchor=north] (cdots) at ([yshift=-1cm]y part1 2.south) {\LARGE{$\cdots$}};
      \draw [->] (y part3 2.south) .. controls +(0,-.8cm) and +(0,+.8cm) .. (cdots.north);
    \end{scope}
  \end{tikzpicture}    
\end{center}
