diff --git a/source-code/Pseudocode/Policy-Iteration/Policy-Iteration.png b/source-code/Pseudocode/Policy-Iteration/Policy-Iteration.png index 3d4ff19..9d73b6a 100644 Binary files a/source-code/Pseudocode/Policy-Iteration/Policy-Iteration.png and b/source-code/Pseudocode/Policy-Iteration/Policy-Iteration.png differ diff --git a/source-code/Pseudocode/Policy-Iteration/Policy-Iteration.tex b/source-code/Pseudocode/Policy-Iteration/Policy-Iteration.tex index 0970f11..74434df 100644 --- a/source-code/Pseudocode/Policy-Iteration/Policy-Iteration.tex +++ b/source-code/Pseudocode/Policy-Iteration/Policy-Iteration.tex @@ -7,7 +7,12 @@ \usepackage[T1]{fontenc} % this is needed for correct output of umlauts in pdf \usepackage{amssymb,amsmath,amsfonts} % nice math rendering \usepackage{braket} % needed for \Set -\usepackage[noend]{algorithm,algpseudocode} +\usepackage{caption} +\usepackage{algorithm} +\usepackage[noend]{algpseudocode} + +\DeclareCaptionFormat{myformat}{#3} +\captionsetup[algorithm]{format=myformat} \begin{document} \begin{preview} @@ -16,7 +21,8 @@ \Require \Statex Sates $\mathcal{X} = \{1, \dots, n_x\}$ \Statex Actions $\mathcal{A} = \{1, \dots, n_a\},\qquad A: \mathcal{X} \Rightarrow \mathcal{A}$ - \Procedure{PolicyIteration}{$\mathcal{X}$, $A$} + \Statex Cost function $g: \mathcal{X} \times \mathcal{A} \rightarrow \mathbb{R}$ + \Procedure{PolicyIteration}{$\mathcal{X}$, $A$, $g$} \State Initialize $\pi$ arbitrarily \While{$\pi$ is not converged} \State $J \gets$ solve system of linear equations $I - \alpha \cdot F(\pi) \cdot J = g(\pi)$ diff --git a/source-code/Pseudocode/Value-Iteration/Value-Iteration.png b/source-code/Pseudocode/Value-Iteration/Value-Iteration.png index 75741b5..2000f94 100644 Binary files a/source-code/Pseudocode/Value-Iteration/Value-Iteration.png and b/source-code/Pseudocode/Value-Iteration/Value-Iteration.png differ diff --git a/source-code/Pseudocode/Value-Iteration/Value-Iteration.tex b/source-code/Pseudocode/Value-Iteration/Value-Iteration.tex index 9a72d0e..2124523 100644 --- a/source-code/Pseudocode/Value-Iteration/Value-Iteration.tex +++ b/source-code/Pseudocode/Value-Iteration/Value-Iteration.tex @@ -7,7 +7,12 @@ \usepackage[T1]{fontenc} % this is needed for correct output of umlauts in pdf \usepackage{amssymb,amsmath,amsfonts} % nice math rendering \usepackage{braket} % needed for \Set -\usepackage[noend]{algorithm,algpseudocode} +\usepackage{caption} +\usepackage{algorithm} +\usepackage[noend]{algpseudocode} + +\DeclareCaptionFormat{myformat}{#3} +\captionsetup[algorithm]{format=myformat} \begin{document} \begin{preview} @@ -16,10 +21,10 @@ \Require \Statex Sates $\mathcal{X} = \{1, \dots, n_x\}$ \Statex Actions $\mathcal{A} = \{1, \dots, n_a\},\qquad A: \mathcal{X} \Rightarrow \mathcal{A}$ + \Statex Cost function $g: \mathcal{X} \times \mathcal{A} \rightarrow \mathbb{R}$ % TODO: g? \alpha? - % Q? % f_ij(a) - \Procedure{ValueIteration}{$\mathcal{X}$, $A$} + \Procedure{ValueIteration}{$\mathcal{X}$, $A$, $g$} \State Initialize $J, J': \mathcal{X} \rightarrow \mathbb{R}_0^+$ arbitrarily \While{$J$ is not converged} \State $J' \gets J$ @@ -35,7 +40,7 @@ \EndProcedure \end{algorithmic} \caption{Calculate value function} - \label{alg:calculateLegendreSymbol} + \label{alg:value-iteration} \end{algorithm} \end{preview} \end{document}