\documentclass[11pt,addpoints]{exam}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Commands for customizing the assignment %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\courseNum}{24-880}
\newcommand{\courseName}{AI Agents for Engineers}
\newcommand{\courseSem}{Spring 2026}
\newcommand{\courseUrl}{\url{https://cmuagents.github.io}}
\newcommand{\hwNum}{Homework 8}
\newcommand{\hwTopic}{Agents for Scientific Discovery}
\newcommand{\hwName}{\hwNum: \hwTopic}
\newcommand{\outDate}{March 23rd, 2026}
\newcommand{\dueDate}{March 30th, 2026}
\newcommand{\taNames}{Peter Pak}
\newcommand{\caNames}{Hardik Choudhary}
\newcommand{\homeworktype}{\string written+prog}
\newcommand{\overleafUrl}{}

%-----------------------------------------------------------------------------
% PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%-----------------------------------------------------------------------------

\usepackage[margin=1in]{geometry}
\usepackage{amsmath, amsfonts}
\usepackage{enumerate}
\usepackage{graphicx}
\usepackage{titling}
\usepackage{url}
\usepackage{xfrac}
\usepackage{natbib}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{paralist}
\usepackage{epstopdf}
\usepackage{tabularx}
\usepackage{longtable}
\usepackage{multirow}
\usepackage{multicol}
\usepackage[colorlinks=true,urlcolor=blue]{hyperref}
\usepackage{algorithm}
\usepackage{algorithmicx}
\usepackage[noend]{algpseudocode}
\usepackage{float}
\usepackage{enumerate}
\usepackage{array}
\usepackage{environ}
\usepackage{times}
\usepackage{textcomp}
\usepackage{caption}
\usepackage{parskip} % For NIPS style paragraphs.
\usepackage[compact]{titlesec} % Less whitespace around titles
\usepackage[inline]{enumitem} % For inline enumerate* and itemize*
\usepackage{datetime}
\usepackage{comment}
% \usepackage{minted}
\usepackage{lastpage}
\usepackage{color}
% \usepackage{xcolor}
\usepackage[dvipsnames]{xcolor}
\usepackage[final]{listings}
\usepackage{tikz}
\usetikzlibrary{shapes,decorations}
\usepackage{framed}
\usepackage{booktabs}
\usepackage{cprotect}
\usepackage{verbatimbox}
\usepackage{multicol}
\usepackage{hyperref}
\usepackage{subcaption}
\usepackage{mathtools} % For drcases
\usepackage{cancel}
\usepackage[many]{tcolorbox}
\usepackage{soul}
\usepackage[bottom]{footmisc}
\usepackage{bm}
\usepackage{wasysym}
\usepackage{lipsum}

\usepackage{tikz}
\usetikzlibrary{arrows}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{positioning, arrows, automata, calc}
\usepackage{transparent}
\usepackage{tikz-cd}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Formatting for \CorrectChoice of "exam" %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\CorrectChoiceEmphasis{}
\checkedchar{\blackcircle}

\newenvironment{checkboxessquare}{
    \begingroup
    \checkboxchar{$\Box$} \checkedchar{$\blacksquare$} % change checkbox style locally
    \begin{checkboxes}
    }{
    \end{checkboxes}
    \endgroup
    }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Better numbering                        %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% \numberwithin{equation}{section} % Number equations within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)
% \numberwithin{figure}{section} % Number figures within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)
% \numberwithin{table}{section} % Number tables within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Custom commands                        %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\blackcircle}{\tikz\draw[black,fill=black] (0,0) circle (1ex);}
\renewcommand{\circle}{\tikz\draw[black] (0,0) circle (1ex);}

\newcommand{\solo}{ \textcolor{orange}{[SOLO]} }
\newcommand{\open}{ \textcolor{blue}{[OPEN]} }


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Code highlighting with listings         %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\definecolor{bluekeywords}{rgb}{0.13,0.13,1}
\definecolor{greencomments}{rgb}{0,0.5,0}
\definecolor{redstrings}{rgb}{0.9,0,0}
\definecolor{light-gray}{gray}{0.95}

\newcommand{\MYhref}[3][blue]{\href{#2}{\color{#1}{#3}}}%

\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}

\lstdefinelanguage{Shell}{
  keywords={tar, cd, make},
  %keywordstyle=\color{bluekeywords}\bfseries,
  alsoletter={+},
  ndkeywords={python3, python, py, javac, java, gcc, c, g++, cpp, .txt, octave, m, .tar},
  %ndkeywordstyle=\color{bluekeywords}\bfseries,
  identifierstyle=\color{black},
  sensitive=false,
  comment=[l]{//},
  morecomment=[s]{/*}{*/},
  commentstyle=\color{purple}\ttfamily,
  %stringstyle=\color{red}\ttfamily,
  morestring=[b]',
  morestring=[b]",
  backgroundcolor = \color{light-gray}
}

\lstset{columns=fixed, basicstyle=\ttfamily,
    backgroundcolor=\color{light-gray},xleftmargin=0.5cm,frame=tlbr,framesep=4pt,framerule=0pt}

\newcommand{\emptysquare}{{\LARGE $\square$}\ \ }
\newcommand{\filledsquare}{{\LARGE $\boxtimes$}\ \ }
\def \ifempty#1{\def\temp{#1} \ifx\temp\empty }


% \newcommand{\squaresolutionspace}[2][\emptysquare]{\newline #1}{#2}
\def \squaresolutionspace#1{ \ifempty{#1} \emptysquare \else #1\hspace{0.75pt}\fi}


\newcommand{\emptycircle}{{\LARGE $\fullmoon$}\ \ }
\newcommand{\filledcircle}{{\LARGE $\newmoon$}\ \ }
\def \circlesolutionspace#1{ \ifempty{#1} \emptycircle \else #1\hspace{0.75pt}\fi}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Custom box for highlights               %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Define box and box title style
\tikzstyle{mybox} = [fill=blue!10, very thick,
    rectangle, rounded corners, inner sep=1em, inner ysep=1em]

\NewEnviron{notebox}{
\begin{tikzpicture}
\node [mybox] (box){
    \begin{minipage}{0.95\textwidth}
        \BODY
    \end{minipage}
};
\end{tikzpicture}
}

%% To HIDE TAGS set this value to 0:
\def\showtags{0}
%%%%%%%%%%%%%%%%
\ifcsname showtags\endcsname \else \def\showtags{1} \fi
% Default to an empty tags environ.
\NewEnviron{tags}{}{}
\if\showtags 1
% Otherwise, include solutions as below.
\RenewEnviron{tags}{
    \fbox{
    \leavevmode\color{blue}\ignorespaces
    \textbf{TAGS:} \texttt{\url{\BODY}}
    }
    \vspace{-.5em}
}{}
\fi

\newtcolorbox[]{answer_box}[1][]{
    % breakable,
    fit,
    enhanced,
    % nobeforeafter,
    colback=white,
    title=Your Answer,
    sidebyside align=top,
    box align=top,
    #1
}

%\pagestyle{fancyplain}
\lhead{\hwName{}
}
\rhead{\courseNum}
\cfoot{\thepage{} of \numpages{}}

\title{\textsc{\hwNum \footnote{Adapted from CMU 10-623 Generative AI Homework Template}}
\\
\textsc{\hwTopic}
\thanks{Compiled on \today{} at \currenttime{}}\\
\vspace{1em}
} % Title

\author{\textsc{\large \courseNum{} \courseName{}}\\
\courseUrl
\vspace{1em}\\
\ifdefempty{\outDate}{}{  OUT: \outDate \\ }
\ifdefempty{\dueDate}{}{  DUE: \dueDate \\ }
  TAs: \taNames{}\\
  CAs: \caNames{}
}

\date{}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Useful commands for typesetting the questions %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% This command will allow long \lstinline{} text to wrap automatically.
\sloppy

%%%%%%%%%%%%%%%%%%%%%%%%%%
% Document configuration %
%%%%%%%%%%%%%%%%%%%%%%%%%%

% Don't display a date in the title and remove the white space
\predate{}
\postdate{}
\date{}

% Don't display an author and remove the white space
% \preauthor{}
% \postauthor{}

% Question type commands
\newcommand{\sall}{\textbf{Select all that apply: }}
\newcommand{\sone}{\textbf{Select one: }}
\newcommand{\tf}{\textbf{True or False: }}




% Changes to examdoc
\qformat{\textbf{{\Large \thequestion \; \; \thequestiontitle \ (\totalpoints \ points)}} \hfill}
\renewcommand{\thequestion}{\arabic{question}}
\renewcommand{\questionlabel}{\thequestion.}

\renewcommand{\thepartno}{\thequestion.\arabic{partno}}
%\renewcommand{\partlabel}{\thequestion.\thepartno.}
\renewcommand{\partlabel}{\thepartno.}

% not working: \renewcommand{\subpartlabel}{(\thequestion.\thepartno.\thesubpart)}
% Commented after adding \question.\thepartno.
%\renewcommand{\partshook}{\setlength{\leftmargin}{0pt}}

\renewcommand{\thesubpart}{\thepartno.\alph{subpart}}
\renewcommand{\subpartlabel}{\thesubpart.}

\renewcommand{\thesubsubpart}{\thesubpart.\roman{subsubpart}}
\renewcommand{\subsubpartlabel}{\thesubsubpart.}

% copied from stack overflow, as all good things are
\newcommand\invisiblesection[1]{%
  \refstepcounter{section}%
  \addcontentsline{toc}{section}{\protect\numberline{\thesection}#1}%
  \sectionmark{#1}}

% quite possibly the worst workaround i have made for this class
\newcommand{\sectionquestion}[1]{
\titledquestion{#1}
\invisiblesection{#1}
~\vspace{-1em}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% New Environment for Pseudocode          %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Python style for highlighting
\DeclareFixedFont{\ttb}{T1}{txtt}{bx}{n}{12} % for bold
\DeclareFixedFont{\ttm}{T1}{txtt}{m}{n}{12}  % for normal

\definecolor{deepblue}{rgb}{0,0,0.5}
\definecolor{deepred}{rgb}{0.6,0,0}
\definecolor{deepgreen}{rgb}{0,0.5,0}

\newcommand\pythonstyle{\lstset{
language=Python,
basicstyle=\ttm,
morekeywords={self},              % Add keywords here
keywordstyle=\ttb\color{deepblue},
emph={MyClass,__init__},          % Custom highlighting
emphstyle=\ttb\color{deepred},    % Custom highlighting style
stringstyle=\color{deepgreen},
frame=tb,                         % Any extra options here
showstringspaces=false
}}


% Python environment
\lstnewenvironment{your_code_solution}[1][]
{
\pythonstyle
\lstset{#1}
}
{}
\newcommand{\revert}[1]{\textcolor{orange}{#1}}

\begin{document}
 
\maketitle 

\newcommand \maxsubs {10 }
\section*{Instructions}
\begin{itemize}

\item \textbf{Collaboration Policy}: Please read the collaboration policy in the syllabus.
\item\textbf{Late Submission Policy:} See the late submission policy in the syllabus.
\item\textbf{Submitting your work:} You will use Gradescope to submit
  answers to all questions\ifthenelse{\equal{\homeworktype}{\string written}}{}{ and code}. 

\begin{itemize}
    
    \item \textbf{Written:} You will submit your completed homework as a PDF to
    Gradescope. Please use the provided template for the submissions which can
    be written in \LaTeX{} (via \href{www.overleaf.com}{Overleaf}) or directly
    on the PDF document. Each answer should be within the box provided. If you
    do not follow the template, your assignment may not be graded correctly and
    there will be a \textbf{\textcolor{red}{2\% penalty}} (e.g., if the homework
    is out of 100 points, 2 points will be deducted from your final score).
    
    \ifdefempty{\overleafUrl}{}{
    \item \textbf{\LaTeX{} Source:} \overleafUrl
    }

    \ifthenelse{\equal{\homeworktype}{\string written}}{}{
    \item \textbf{Code:} Gradescope's Autograder will be used to evaluate the
    coding portions of this assignment. In order to best obtain the points for
    this assignment, please follow the code upload instructions. If you do not
    follow the instructions correctly the autograder may not work properly.
    }{}
   
  \end{itemize}

\end{itemize}

\begin{center}
    \pointtable[v][questions]
\end{center}\clearpage

\section*{Introduction}
\label{sec:intro}
In this homework assignment we'll look into the some of the agentic applications
within scientific discovery.

At a high-level, this homework will cover the following aspects.

\begin{enumerate}
\item Investigate AlphaEvolve and implement OpenEvolve.
\item Explore the agentic additive manufacturing alloy evaluation workflow.
\end{enumerate}
\clearpage

\section*{Local Environment}
\label{sec:local}
For this homework we'll be using \texttt{uv} as the project and package manager.
If you haven't install \texttt{uv}, you can follow the installation instructions
here \url{https://docs.astral.sh/uv/}. You can explore all of the available
commands using \texttt{uv --help} but in short, here are a couple of useful
commands that you'll often use:

\begin{table}[H]
    \centering
    \begin{tabular}{|l|l|}
        \hline
        \texttt{source .venv/bin/activate} & (Linux and Mac) Activates python environment. \\
        \hline
        \texttt{source .venv/Scripts/Activate} & (Windows) Activates python environment. \\
        \hline
        \texttt{uv sync} & Installs  / synchronizes projects dependencies. \\
        \hline
        \texttt{uv add <package>} & Installs \texttt{pip} package and adds it to project dependencies. \\
        \hline
        \texttt{uv remove <package>} & Removes \texttt{pip} package dependency from project. \\
        \hline
        \texttt{uv run <script.py>} & Runs python script inside of \texttt{uv} environment. \\
        \hline
    \end{tabular}
\end{table}
\begin{enumerate}
\item Navigate to folder project directory and synchronize dependencies with:
\begin{verbatim}
uv sync
\end{verbatim}

\item Activate the environment

Mac and Linux:
\begin{verbatim}
source .venv/bin/activate
\end{verbatim}

Windows:
\begin{verbatim}
source .venv/Scripts/activate
\end{verbatim}

\item Test \text{uv} works and run \texttt{main.py} file.
\begin{verbatim}
uv run main.py
\end{verbatim}
\end{enumerate}
\clearpage

\begin{questions}
\sectionquestion{AlphaEvolve (Written)}

\cite{novikov_alphaevolve_2025} introduces AlphaEvolve, an evolutionary coding
agent that combines large language models with an evolutionary search framework
to discover improved algorithms across a broad range of scientific and
engineering problems. At its core, AlphaEvolve orchestrates an autonomous
pipeline in which LLMs iteratively propose code modifications, automated
evaluators score the results, and a program database retains the most promising
solutions discovered so far. This loop allows AlphaEvolve to go beyond what a
single LLM query could produce, enabling discoveries that require sustained
iterative refinement.

\begin{figure}[H]
    \label{fig:alphaevolve}
    \centering
    \includegraphics[width=\linewidth]{images/method_detailed.pdf}
    \caption{
        From \cite{novikov_alphaevolve_2025}, ``Expanded view of the AlphaEvolve
        discovery process. The user provides an initial program (with components
        to evolve marked), evaluation code, and optional configurations (Section
        2.1). AlphaEvolve then initiates an evolutionary loop. The Prompt
        sampler uses programs from the Program database to construct rich
        prompts (Section 2.2). Given these prompts, the LLMs generate code
        modifications (diffs), which are applied to create new programs (Section
        2.3). These are then scored by Evaluators (Section 2.4), and promising
        solutions are registered back into the Program database (Section 2.5),
        driving the iterative discovery of better and better programs."
    }
\end{figure}

\clearpage

\begin{parts}

\part[5] Describe the core evolutionary loop in AlphaEvolve
\citep{novikov_alphaevolve_2025}. In your answer, identify at least \textbf{three
main components} of the system and explain how each contributes to the agent's
ability to discover improved solutions.

    \begin{answer_box}[title=,height=21cm, width=15cm]
    \end{answer_box}

\clearpage

\part[2] According to \cite{novikov_alphaevolve_2025}, how does the LLM in
AlphaEvolve generate new candidate programs during the evolutionary process?

    \begin{checkboxes}
        \choice It generates entirely new programs from scratch in each iteration.
        \choice It generates targeted modifications (e.g., diffs or edits) to existing programs drawn from the population.
        \choice It applies fixed, domain-specific mutation operators defined by human researchers.
        \choice It fine-tunes its own weights using gradient feedback from the evaluators.
    \end{checkboxes}

\part[2] Which of the following best describes the role of \textbf{evaluators}
in AlphaEvolve \citep{novikov_alphaevolve_2025}?

    \begin{checkboxes}
        \choice They are human domain experts who judge the quality of each proposed algorithm.
        \choice They are automated functions that score programs and provide feedback used to guide the evolutionary search.
        \choice They are separate neural networks trained to predict whether a program is correct.
        \choice They are the same LLMs used for code generation, self-evaluating their own outputs.
    \end{checkboxes}

\clearpage

\part[4] Beyond mathematics, \cite{novikov_alphaevolve_2025} applies AlphaEvolve
to Google's computational infrastructure. List \textbf{two distinct application
areas} and briefly describe the improvement achieved in each.

    \begin{answer_box}[title=,height=20cm, width=15cm]
    \end{answer_box}

\clearpage
\end{parts}


\sectionquestion{OpenEvolve (Code)}

OpenEvolve is an open-source reimplementation of the AlphaEvolve framework. In
this question you will build the complete evolutionary loop from scratch. The
starter code is in \textbf{\lstinline{./programming/open_evolve.py}}.

Fill out all \texttt{\# Fill in} sections. A demo is provided in the
\texttt{if \_\_name\_\_ == "\_\_main\_\_":} block to help you develop and debug.

\begin{parts}

\part[14] Implement the \lstinline{ProgramDatabase} class.

\begin{enumerate}[(a)]
    \item \lstinline{add(program, score)} --- append the program string and its
          score to the internal storage.
    \item \lstinline{sample(n, temperature)} --- return \texttt{n}
          \texttt{(program, score)} tuples sampled \textbf{with replacement}
          using softmax-weighted probabilities:
          \[
              w_i = \frac{\exp(s_i / \tau)}{\sum_j \exp(s_j / \tau)}
          \]
          where $s_i$ is the score of program $i$ and $\tau$ is the temperature.
          Return an empty list if the database is empty.
    \item \lstinline{best()} --- return the \texttt{(program, score)} pair with
          the highest score.
    \item \lstinline{top_k(k)} --- return the \texttt{k} highest-scoring
          \texttt{(program, score)} pairs sorted descending. If \texttt{k}
          exceeds the database size, return all entries.
\end{enumerate}

\part[6] Implement \lstinline{build_prompt(task_description, inspiration_programs)}.

The prompt must include: (1) an introductory instruction, (2) the task
description, (3) each inspiration program with its score inside a
\texttt{```python} code block, and (4) a closing instruction asking the LLM
to output an improved program inside a \texttt{```python} block.

\part[4] Implement \lstinline{parse_program(response)}.

Extract the content between \texttt{```python} and \texttt{```} markers
(case-insensitive) from the LLM response. If no such block is found, return
the full response stripped of leading/trailing whitespace.

\part[16] Implement \lstinline{evolve(task_description, seed_program, evaluator, llm, ...)}.

Follow the algorithm described in the docstring:
\begin{enumerate}[(1)]
    \item Initialize (or reuse) a \lstinline{ProgramDatabase}.
    \item Evaluate the seed program and add it to the database.
    \item For each iteration: sample, build prompt, query LLM, parse, evaluate
          (catching any exception as score \texttt{0.0}), and add to database.
    \item Return \lstinline{db.best()}.
\end{enumerate}

\part[6] Implement \lstinline{temperature_schedule(iteration, n_iterations, start_temp, end_temp)}.

Return the softmax temperature at the given iteration using \textbf{linear annealing}:
\[
    \tau_t = \tau_0 - (\tau_0 - \tau_{\min}) \cdot \frac{t}{N - 1}
\]
where $\tau_0 = \texttt{start\_temp}$, $\tau_{\min} = \texttt{end\_temp}$, $t =
\texttt{iteration}$, and $N = \texttt{n\_iterations}$. At $t=0$ the result is
\texttt{start\_temp}; at $t = N-1$ it is \texttt{end\_temp}.

\part[24] Implement \lstinline{island_evolve(task_description, seed_program, evaluator, llm, ...)}.

Run \lstinline{evolve()} independently on \texttt{n\_islands} fresh
\lstinline{ProgramDatabase} instances, each seeded with \texttt{seed\_program}.
After all islands finish, return the \texttt{(program, score)} with the highest
score across all islands.

\end{parts}

You can run and test the code with the following commands:

\begin{table}[H]
    \centering
    \begin{tabular}{|l|l|}
        \hline
        \texttt{uv run programming/open\_evolve.py} & Runs the demo (useful for development) \\
        \hline
        \texttt{uv run test.py open\_evolve} & Runs the test suite used by the autograder \\
        \hline
    \end{tabular}
\end{table}

\textbf{The provided tests are the exact ones that will run on the autograder
(i.e.\ if your local tests pass, they should also pass on the autograder).}
\clearpage

\sectionquestion{Agentic Additive Manufacturing (Written)}

\cite{pak_agentic_2026} presents a multi-agent system that automates alloy
evaluation for additive manufacturing (AM) using Large Language Models. The
system is built around three specialized Model Context Protocol (MCP) servers
orchestrated by Claude Sonnet: a \textit{workspace-agent} that manages
file-based state across tools, a \textit{thermo-calc} server that computes
thermophysical properties via CALPHAD methods, and an
\textit{additive-manufacturing} server that generates lack-of-fusion (LoF)
process maps using the Rosenthal heat-source equation. Together they allow the
agent to autonomously evaluate both established and novel alloy compositions
without continuous human intervention.

\begin{figure}[h]
    \label{fig:aamae}
    \centering
    \includegraphics[width=0.8\linewidth]{images/figure_main.png}
    \caption{
        From \cite{pak_agentic_2026} ``(Top Left) An input query for alloy
        compositions regarding the printability of an additively manufactured
        part suitable for its intended use case is provided to Claude Sonnet.
        This Large Language Model (LLM) calls the tools necessary to generate
        and analyze each potential alloy compositions, providing a response of
        candidates ranked by their content of their lack of fusion fusion
        regimes. (Top Right) Thermo-Calc allows for the retrieval of material
        properties for an hypothetical alloy composition, for instance thermal
        conductivity, to be used in down stream lack of fusion calculations.
        (Bottom Left) Workspaces provide a way for each of the tools to
        effectively communicate with one another and handles state management
        and file organization. (Bottom Right) Tools managed by the Additive
        Manufacturing subagents then utilize the calculated material properties
        from the Thermo-Calc subagent to generate a lack of fusion process map
        to send back to the LLM for analysis and final recommendation."
    }
\end{figure}
\clearpage

\begin{parts}

%%% Written %%%

\part[4] What is the Model Context Protocol (MCP), and why does
\cite{pak_agentic_2026} use it rather than having the LLM call Python functions
directly? In your answer address the key design principle the authors describe
as ``separation of concerns.''

    \begin{answer_box}[title=,height=20cm, width=15cm]
    \end{answer_box}

\clearpage

\part[3] \cite{pak_agentic_2026} evaluates alloy printability by generating a
\textbf{lack-of-fusion (LoF) process map}. What does the LoF process map show,
and what does the LoF criterion predict about a given set of process parameters?

    \begin{answer_box}[title=,height=20cm, width=15cm]
    \end{answer_box}
    
\clearpage

\part[5] Identify \textbf{two limitations} of the Rosenthal equation as used
in \cite{pak_agentic_2026}, and for each explain how it might affect the
accuracy of the generated process maps.

    \begin{answer_box}[title=,height=20cm, width=15cm]
    \end{answer_box}

\end{parts}

\clearpage

\sectionquestion{Programming Scripts Upload}

To upload your code to Gradescope, run the following command to generate a zip
file:

\begin{verbatim}
uv run programming/zip_programming.py
\end{verbatim}

Upload the generated zip file to the appropriate programming slot on Gradescope.

\begin{parts}

\part Make sure the following files are included when uploading to Gradescope
    \begin{checkboxessquare}
        \choice \texttt{open\_evolve.py}
    \end{checkboxessquare}
\end{parts}

\newpage

\sectionquestion{Collaboration and Generative AI Questions}

\begin{parts}

\uplevel{
After you have completed all other components of this assignment, report your
answers to these questions regarding the collaboration policy. Details of the
policy can be found in the syllabus.
}

    \part[2] Did you collaborate with anyone on this assignment? If so, list
    their name or Andrew ID and which problems you worked together on.

        \begin{answer_box}[title=,height=3cm, width=15cm]
    \end{answer_box}

    \part[3] Did you use generative AI for parts of this assignment? If so,
    include the input prompts along with links to the conversation.
    
        \begin{answer_box}[title=,height=3cm, width=15cm]
    \end{answer_box}
        
\end{parts}
\end{questions}

\bibliographystyle{plainnat}
\bibliography{references}

\end{document}