72 lines
3.1 KiB
TeX
72 lines
3.1 KiB
TeX
\documentclass[a4paper]{article}
|
|
% To compile PDF run: latexmk -pdf {filename}.tex
|
|
|
|
\usepackage{graphicx} % Used to insert images into the paper
|
|
\graphicspath{ {} }
|
|
\usepackage{float}
|
|
\usepackage[justification=centering]{caption} % Used for captions
|
|
\captionsetup[figure]{font=small} % Makes captions small
|
|
|
|
% Math package
|
|
\usepackage{amsmath}
|
|
%enable \cref{...} and \Cref{...} instead of \ref: Type of reference included in the link
|
|
\usepackage[capitalise,nameinlink]{cleveref}
|
|
% Enable that parameters of \cref{}, \ref{}, \cite{}, ... are linked so that a reader can click on the number an jump to the target in the document
|
|
\usepackage{hyperref}
|
|
% UTF-8 encoding
|
|
\usepackage[T1]{fontenc}
|
|
\usepackage[utf8]{inputenc} %support umlauts in the input
|
|
% Easier compilation
|
|
\usepackage{bookmark}
|
|
\usepackage{natbib}
|
|
% \usepackage{graphicx}
|
|
|
|
\begin{document}
|
|
\title{Week 10 - Comparing Algorithms}
|
|
\author{Kelvin Davis \and Jip J. Dekker\and Tony Silvestere}
|
|
\maketitle
|
|
|
|
\section{Overview}
|
|
|
|
|
|
\section{Hill Climbing and Genetic Algorithms}
|
|
% Describe methods
|
|
% How did we collect data (and how we made it precise by averaging data)
|
|
The experiment compared the capability of two algorithms to generate words from scratch. The first algorithm, the hill climbing approach, randomly 'guesses' each character of the required word, and fixes the ones that are correctly guessed in their respective place. The second approach however, uses a genetic algorithm to generate the words by 'breeding' the most correct words at each iteration.
|
|
|
|
The capability of each algorithm to generating words from scratch was assessed by collecting repeated measurements of the number of time steps each algorithm required to generate words of varying fixed length. Each algorithm was tasked to generate words of length 1, 2, 4, 8, and 16 letters, and each of these measurements were performed ten times. The average of the results of both methods was used to construct the plot given in Figure \ref{fig:plot1}.\\
|
|
|
|
\begin{figure}[H]
|
|
\includegraphics[scale=0.55]{chart}
|
|
\centering
|
|
\captionsetup{width=0.80\textwidth}
|
|
\caption{Plot of the hill climbing (red) and genetic algorithm (blue) against the word length}
|
|
\label{fig:plot1}
|
|
\end{figure}
|
|
|
|
\par
|
|
This shows...
|
|
\\
|
|
\par
|
|
In order to assess the rate at which each method correctly finds a word, the fitness of both techniques (percentage of correct letters) is recorded at every iteration for a four letter word and compared (Figure \ref{fig:fitness1} and Figure \ref{fig:fitness2}). \\
|
|
|
|
\begin{figure}[H]
|
|
\includegraphics[scale=0.55]{chart-1}
|
|
\centering
|
|
\captionsetup{width=0.80\textwidth}
|
|
\caption{Repeated measurements of the fitness of the stochastic fixed algorithm (as a percentage of the word) against the number of iterations taken}
|
|
\label{fig:fitness1}
|
|
\end{figure}
|
|
|
|
\begin{figure}[H]
|
|
\includegraphics[scale=0.55]{chart-2}
|
|
\centering
|
|
\captionsetup{width=0.80\textwidth}
|
|
\caption{Repeated measurements of the fitness of the genetic algorithm (as a percentage of the word) against the number of iterations taken}
|
|
\label{fig:fitness2}
|
|
\end{figure}
|
|
|
|
\section{Conclusion}
|
|
% Make sure Qs are answered
|
|
\end{document}
|