Procházet zdrojové kódy

Improve pseudocode

Martin Thoma před 9 roky
rodič
revize
14e85b383e

binární
source-code/Pseudocode/dynamic-programming/dynamic-programming.png


+ 2 - 1
source-code/Pseudocode/dynamic-programming/dynamic-programming.tex

@@ -23,7 +23,8 @@
         \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$
-        \Procedure{DynamicProgramming}{$\mathcal{X}$, $A$, $g$, $N$}
+        \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}$
             \For{$k = N - 1$ to $0$}
                 \For{$x \in \mathcal{X}$}