2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-26 06:48:04 +02:00

Improve pseudocode

This commit is contained in:
Martin Thoma 2016-08-04 23:19:19 +02:00
parent dd9390388d
commit ddd08a2a45
10 changed files with 11 additions and 10 deletions

View file

@ -22,7 +22,7 @@
\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}$
\Statex Horizon $N$
\Statex Horizon $N \in \mathbb{N}_{\geq 1}$
\Statex Discounting factor $\alpha \in [0, 1]$
\Procedure{DynamicProgramming}{$\mathcal{X}$, $A$, $g$, $N$, $\alpha$}
\State $J_N(x) \gets g_N(x) \quad \forall x \in \mathcal{X}$
@ -36,10 +36,11 @@
\State $\pi_k(x) \gets \arg \min_a (Q_k(x, a))$
\EndFor
\EndFor
\Return $\pi_{0:N-1}$
\EndProcedure
\end{algorithmic}
\caption{Dynamic Programming}
\label{alg:dynamic-programming}
\label{alg:dynamic-programming: Learn a strategy}
\end{algorithm}
\end{preview}
\end{document}