diff --git a/Acronyms.tex b/Acronyms.tex index 4877987..4927621 100644 --- a/Acronyms.tex +++ b/Acronyms.tex @@ -6,6 +6,6 @@ \acro{AI}{Artificial Intelligence} \acro{ML}{Machine Learning} \acro{MI}{Maschinelle Intelligenz} - \acro{PEAS}{Performance, Environment, Actuators, Sensors (Leistung, Umgebung, Aktuatoren, Sensoren)} + \acro{PEAS}{Performance, Environment, Actuators, Sensors} \acro{TSP}{Traveling Salesman Problem} \end{acronym} \ No newline at end of file diff --git a/Content.tex b/Content.tex index e424238..cf92e66 100644 --- a/Content.tex +++ b/Content.tex @@ -3,4 +3,5 @@ \input{parts/Einführung.tex} \input{parts/Agenten.tex} -\input{parts/Problemlösen durch Suchen.tex} \ No newline at end of file +\input{parts/Problemlösen durch Suchen.tex} +\input{parts/Optimierung.tex} \ No newline at end of file diff --git a/Packages.tex b/Packages.tex index 1762296..a079add 100644 --- a/Packages.tex +++ b/Packages.tex @@ -36,4 +36,7 @@ rightsub = \grq% \usepackage[square, numbers]{natbib} %math \usepackage{amsmath} -\usepackage{amssymb} \ No newline at end of file +\usepackage{amssymb} +%algorithms +\usepackage{algorithm} +\usepackage{algpseudocode} \ No newline at end of file diff --git a/chapters/Optimierung/Lokale Suche.tex b/chapters/Optimierung/Lokale Suche.tex new file mode 100644 index 0000000..e6bc9ab --- /dev/null +++ b/chapters/Optimierung/Lokale Suche.tex @@ -0,0 +1,80 @@ +\chapter{Lokale Suche} +\label{local search} + \includegraphics[width = \textwidth]{lokale suche.png} + + \section{Hill Climbing} + \label{hill climbing} + Der Hill Climbing Algorithmus ist eine \say{gierige} lokale Suche. + Es wird an einem beliebigen Punkt gestartet und zu dem jeweils höherwertigen Nachbarn gegangen. + Wenn kein höherwertiger Nachbar existiert wird der Algorithmus beendet. + + \begin{algorithm} + \caption{Hill Climbing Algorithm}\label{hill climbing algorithm} + \begin{algorithmic}[1] + \Function{Hill-CLIMBING}{problem}{ \textbf{returns} a local maximum state} + \State current$\gets$problem.INITIAL + \While{true} + \State neighbor$\gets$ein höchstwertigster Nachfolger von current + \If{Value(neighbor) $\le$ VALUE(current)} + \Return current + \EndIf + \State current$\gets$neighbor + \EndWhile + \EndFunction + \end{algorithmic} + \end{algorithm} + + \begin{tabular}{|p{.4625\textwidth}|p{.4625\textwidth}|} + \hline + \textbf{Vorteile} & \textbf{Nachteile}\\ + \hline + \begin{itemize} + \item schnell und effizient zu einer besseren Lösung + \end{itemize} & + \begin{itemize} + \item Schaut nicht weiter als zu den direkten Nachbarn, + bleibt daher in lokalen Maxima, Plateaus, u.ä. stecken + \item \textbf{nicht vollständig} + \item \textbf{nicht optimal} + \end{itemize}\\ + \hline + \end{tabular} + + \subsection{Erweiterungen} + \label{hill climbing: erweiterungen} + \paragraph{Stochastic Hill Climbing} + es wird zufällig zu einem der möglichen, hochwertigen Nachbarn weitergegangen + + \paragraph{Hill Climbing mit Seitwärtszügen} + beschränkte Anzahl von Seitwärtszügen um Plateaus zu verlassen. + + \paragraph{Random-Restart Hill Climbing} + Standard-Verfahren wird mehrmals an zufälligen Startzuständen gestartet. + + \subsection{Beispiel: 8-Damen-Problem} + \textbf{Problem:} siehe \ref{example: 8-damen-problem}\\ + \label{hill climbing: 8-damen-problem} + \includegraphics[width = \textwidth]{hill-climbing_8-damen.png} + + \section{Simulated Annealing} + \label{simulated annealing} + \begin{wrapfigure}{H}{.4\textwidth} + \includegraphics[width = .4\textwidth]{simulated_annealing.png} + \end{wrapfigure} + \say{Sanfter Übergang von Random Walk zum Hill Climbing}\\ + Die Wahrscheinlichkeit $P(\Delta E, T)=e^{-\Delta E / T}$ der Akzeptanz von Verschlechterungen hängt ab von: + \begin{itemize} + \item der Temperatur $T$ + \item der Änderung $\Delta E = \text{zufälliger Nachfolger}-\text{aktueller Zustand}$ in der Zielfunktion + \end{itemize} + Falls die Temperatur langsam genug sinkt geht die Wahrscheinlichkeit das globale Optimum zu finden gegen 1. + + \section{Local Beam Search} + \label{local beam search} + Greedy Search Verfahren (\ref{hill climbing}), bei dem $k$ optimale Werte gespeichert und gleichzeitig durchlaufen werden.\\ + \includegraphics[width = \textwidth]{beam search.png} + + \section{Genetische Algorithmen} + \label{genetische algorithmen} + \includegraphics[width = \textwidth]{genetische algorithmen.png} + diff --git a/images/beam search.png b/images/beam search.png new file mode 100644 index 0000000..56a3fb1 Binary files /dev/null and b/images/beam search.png differ diff --git a/images/genetische algorithmen.png b/images/genetische algorithmen.png new file mode 100644 index 0000000..ed699f1 Binary files /dev/null and b/images/genetische algorithmen.png differ diff --git a/images/hill-climbing_8-damen.png b/images/hill-climbing_8-damen.png new file mode 100644 index 0000000..4ead742 Binary files /dev/null and b/images/hill-climbing_8-damen.png differ diff --git a/images/lokale suche.png b/images/lokale suche.png new file mode 100644 index 0000000..bd40f00 Binary files /dev/null and b/images/lokale suche.png differ diff --git a/images/simulated_annealing.png b/images/simulated_annealing.png new file mode 100644 index 0000000..e759b75 Binary files /dev/null and b/images/simulated_annealing.png differ diff --git a/parts/Optimierung.tex b/parts/Optimierung.tex new file mode 100644 index 0000000..463255a --- /dev/null +++ b/parts/Optimierung.tex @@ -0,0 +1,4 @@ +\part{Optimierung} +\label{optimierung} + +\input{chapters/Optimierung/Lokale Suche.tex} \ No newline at end of file