Skip to content
Snippets Groups Projects
Commit 989c39c0 authored by Jannik Dunkelau's avatar Jannik Dunkelau
Browse files

Add example of referencing line of algorithm

parent 8c85e3cc
No related branches found
No related tags found
No related merge requests found
...@@ -163,6 +163,7 @@ Für Algorithmen kann das bereits inkludierte Paket \texttt{algorithmicx} ...@@ -163,6 +163,7 @@ Für Algorithmen kann das bereits inkludierte Paket \texttt{algorithmicx}
genutzt werden. genutzt werden.
In \cref{alg:minimax} wird exemplarisch eine Implementierung des In \cref{alg:minimax} wird exemplarisch eine Implementierung des
Minimax-Algorithmus aufgeführt. Minimax-Algorithmus aufgeführt.
Beachten Sie, dass \cref{line:commented} kommentiert und referenzierbar ist.
\begin{algorithm} \begin{algorithm}
\caption{Determining the next action by Minimax}% \caption{Determining the next action by Minimax}%
...@@ -174,7 +175,7 @@ Minimax-Algorithmus aufgeführt. ...@@ -174,7 +175,7 @@ Minimax-Algorithmus aufgeführt.
\ForAll{\(G^n_a \in S(G^n)\)} \ForAll{\(G^n_a \in S(G^n)\)}
\State \(\mathit{value} = \) \Call{MinimaxValue}{\(G^n_a\), true} \State \(\mathit{value} = \) \Call{MinimaxValue}{\(G^n_a\), true}
\If{\(\mathit{value} > \mathit{bestValue}\)} \If{\(\mathit{value} > \mathit{bestValue}\)}
\Comment{Aktualisiere besten Wert} \Comment{Aktualisiere besten Wert}\label{line:commented}
\State \(\mathit{bestValue} \gets \mathit{value}\) \State \(\mathit{bestValue} \gets \mathit{value}\)
\State \(\mathit{bestAction} \gets a\) \State \(\mathit{bestAction} \gets a\)
\EndIf \EndIf
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment