\documentclass[12pt]{article}

\usepackage{multirow}
\usepackage{fullpage}
\usepackage{graphicx}
\usepackage[colorlinks=true,urlcolor=blue]{hyperref}


\begin{document}

\title{
Assignment 1
}
\author{CS 776: Evolutionary Computing \\
  Fall 2023 \\
  Max Score: 100 \\
}

\date{}
%\input{psfig}

\maketitle

\section*{Black box function optimization}

\subsection{Hill climbing or gradient ascent}
Write a simple hill climber which you may implement along the lines of the
\href{https://docs.google.com/presentation/d/1ARFaFp8F6H1lfzAB8Yg54qhQEVyVzobZWOxJXbasep0/edit?usp=sharing}{pseudocode
  from class}.

Solve the following two black box problems using your hill climber. The
black boxes are provided as precompiled .o files that implement an
{\tt eval} function. Both {\tt eval} functions take a 100 length array
of integers (ints) and return a double between 0 and 100
inclusive. Only the values $0$ and $1$ are allowed as values for members of
the integer array. Solving the problem means setting each element of
the array to either a 0 or a 1 such that the evaluation function
returns $100$.


\begin{enumerate}
  \item \href{https://www.cse.unr.edu/~sushil/class/gas/assignments/as1/eval.o}{First black box evaluation function}. 
  \item \href{https://www.cse.unr.edu/~sushil/class/gas/assignments/as1/eval1.o}{Second black box evaluation function}. 
\end{enumerate}
Here is a \href{https://www.cse.unr.edu/~sushil/class/gas/assignments/as1/main.cpp}{sample main.cpp} that shows you how to call the {\tt eval} function and what {\tt eval} returns. I expect you to solve the first black box, but not the second.


\subsection{Easy Function}
Write a function {\tt eval} (using the same arguments as the evals above) that is easy for your hill climber to
optimize. Specify the optimum. Implement this function and make it
publicly available. Run your hill climber algorithm with different
starting points on this function and show that the algorithm finds the
optimum every time.

\subsection{Hard Function}
Write a function {\tt eval} (using the same arguments as the evals above) that is difficult or impossible for your hill climber
to optimize. Specify the optimum. Implement this function and make it
publicly available. Run your hill climber algorithm on this function
with different starting points and show that your hillclimber never
finds the optimum.

\subsection{Questions}

For each of the four problems above, answer the following
questions. The three questions are related and may need to be answered
for each problem differently.

\begin{enumerate}
\item What is time complexity of your hill climber in terms of the number of evaluations? 
\item What is the reliability of your hill climber? 
\item What is the quality of solutions found by your hill-climber?
  That is, how close does your hill climber get to optimum? What is
  your metric for measuring "closeness to optimum?"
\end{enumerate}



\section*{Turning in your assignment}

Turn in a document (pdf) with the following information (through canvas) before the due date.
\begin{enumerate}
\item
  Your full name and email address
  
\item
  Hill climber source, easy function source, optimum, hard function source, optimum
  
\item
  Transcripts of your program running on all four problems

\item
  Answers to the questions above
  
\end{enumerate}

Talk to me if you have questions. I'll be glad to discuss ideas with you!
\end{document}
