\section{Simple\+D\+QN$<$ Network\+Type $>$ Class Template Reference}
\label{classmlpack_1_1rl_1_1SimpleDQN}\index{Simple\+D\+Q\+N$<$ Network\+Type $>$@{Simple\+D\+Q\+N$<$ Network\+Type $>$}}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ Simple\+D\+QN} ()
\begin{DoxyCompactList}\small\item\em Default constructor. \end{DoxyCompactList}\item 
\textbf{ Simple\+D\+QN} (const int input\+Dim, const int h1, const int h2, const int output\+Dim, const bool is\+Noisy=false)
\begin{DoxyCompactList}\small\item\em Construct an instance of \doxyref{Simple\+D\+QN}{p.}{classmlpack_1_1rl_1_1SimpleDQN} class. \end{DoxyCompactList}\item 
\textbf{ Simple\+D\+QN} (Network\+Type network, const bool is\+Noisy=false)
\item 
void \textbf{ Backward} (const arma\+::mat state, arma\+::mat \&target, arma\+::mat \&gradient)
\begin{DoxyCompactList}\small\item\em Perform the backward pass of the state in real batch mode. \end{DoxyCompactList}\item 
void \textbf{ Forward} (const arma\+::mat state, arma\+::mat \&target)
\begin{DoxyCompactList}\small\item\em Perform the forward pass of the states in real batch mode. \end{DoxyCompactList}\item 
const arma\+::mat \& \textbf{ Parameters} () const
\begin{DoxyCompactList}\small\item\em Return the Parameters. \end{DoxyCompactList}\item 
arma\+::mat \& \textbf{ Parameters} ()
\begin{DoxyCompactList}\small\item\em Modify the Parameters. \end{DoxyCompactList}\item 
void \textbf{ Predict} (const arma\+::mat state, arma\+::mat \&action\+Value)
\begin{DoxyCompactList}\small\item\em Predict the responses to a given set of predictors. \end{DoxyCompactList}\item 
void \textbf{ Reset\+Noise} ()
\begin{DoxyCompactList}\small\item\em Resets noise of the network, if the network is of type noisy. \end{DoxyCompactList}\item 
void \textbf{ Reset\+Parameters} ()
\begin{DoxyCompactList}\small\item\em Resets the parameters of the network. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$typename Network\+Type = F\+F\+N$<$\+Mean\+Squared\+Error$<$$>$,                                    Gaussian\+Initialization$>$$>$\newline
class mlpack\+::rl\+::\+Simple\+D\+Q\+N$<$ Network\+Type $>$}


\begin{DoxyTemplParams}{Template Parameters}
{\em Network\+Type} & The type of network used for simple dqn. \\
\hline
\end{DoxyTemplParams}


Definition at line 31 of file simple\+\_\+dqn.\+hpp.



\subsection{Constructor \& Destructor Documentation}
\mbox{\label{classmlpack_1_1rl_1_1SimpleDQN_a1f3392e9e86ff86b732335b1271fb6cc}} 
\index{mlpack\+::rl\+::\+Simple\+D\+QN@{mlpack\+::rl\+::\+Simple\+D\+QN}!Simple\+D\+QN@{Simple\+D\+QN}}
\index{Simple\+D\+QN@{Simple\+D\+QN}!mlpack\+::rl\+::\+Simple\+D\+QN@{mlpack\+::rl\+::\+Simple\+D\+QN}}
\subsubsection{Simple\+D\+Q\+N()\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily \textbf{ Simple\+D\+QN} (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Default constructor. 



Definition at line 37 of file simple\+\_\+dqn.\+hpp.

\mbox{\label{classmlpack_1_1rl_1_1SimpleDQN_a11605a44a79143eca49302d80b533b8a}} 
\index{mlpack\+::rl\+::\+Simple\+D\+QN@{mlpack\+::rl\+::\+Simple\+D\+QN}!Simple\+D\+QN@{Simple\+D\+QN}}
\index{Simple\+D\+QN@{Simple\+D\+QN}!mlpack\+::rl\+::\+Simple\+D\+QN@{mlpack\+::rl\+::\+Simple\+D\+QN}}
\subsubsection{Simple\+D\+Q\+N()\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily \textbf{ Simple\+D\+QN} (\begin{DoxyParamCaption}\item[{const int}]{input\+Dim,  }\item[{const int}]{h1,  }\item[{const int}]{h2,  }\item[{const int}]{output\+Dim,  }\item[{const bool}]{is\+Noisy = {\ttfamily false} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Construct an instance of \doxyref{Simple\+D\+QN}{p.}{classmlpack_1_1rl_1_1SimpleDQN} class. 


\begin{DoxyParams}{Parameters}
{\em input\+Dim} & Number of inputs. \\
\hline
{\em h1} & Number of neurons in hiddenlayer-\/1. \\
\hline
{\em h2} & Number of neurons in hiddenlayer-\/2. \\
\hline
{\em output\+Dim} & Number of neurons in output layer. \\
\hline
{\em is\+Noisy} & Specifies whether the network needs to be of type noisy. \\
\hline
\end{DoxyParams}


Definition at line 49 of file simple\+\_\+dqn.\+hpp.

\mbox{\label{classmlpack_1_1rl_1_1SimpleDQN_a03fe9bdac8e472710007b286ae6b1b22}} 
\index{mlpack\+::rl\+::\+Simple\+D\+QN@{mlpack\+::rl\+::\+Simple\+D\+QN}!Simple\+D\+QN@{Simple\+D\+QN}}
\index{Simple\+D\+QN@{Simple\+D\+QN}!mlpack\+::rl\+::\+Simple\+D\+QN@{mlpack\+::rl\+::\+Simple\+D\+QN}}
\subsubsection{Simple\+D\+Q\+N()\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily \textbf{ Simple\+D\+QN} (\begin{DoxyParamCaption}\item[{Network\+Type}]{network,  }\item[{const bool}]{is\+Noisy = {\ttfamily false} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Definition at line 75 of file simple\+\_\+dqn.\+hpp.



\subsection{Member Function Documentation}
\mbox{\label{classmlpack_1_1rl_1_1SimpleDQN_ac6d24661593a769ea1cfcd17e11c375f}} 
\index{mlpack\+::rl\+::\+Simple\+D\+QN@{mlpack\+::rl\+::\+Simple\+D\+QN}!Backward@{Backward}}
\index{Backward@{Backward}!mlpack\+::rl\+::\+Simple\+D\+QN@{mlpack\+::rl\+::\+Simple\+D\+QN}}
\subsubsection{Backward()}
{\footnotesize\ttfamily void Backward (\begin{DoxyParamCaption}\item[{const arma\+::mat}]{state,  }\item[{arma\+::mat \&}]{target,  }\item[{arma\+::mat \&}]{gradient }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Perform the backward pass of the state in real batch mode. 


\begin{DoxyParams}{Parameters}
{\em state} & The input state. \\
\hline
{\em target} & The training target. \\
\hline
{\em gradient} & The gradient. \\
\hline
\end{DoxyParams}


Definition at line 139 of file simple\+\_\+dqn.\+hpp.

\mbox{\label{classmlpack_1_1rl_1_1SimpleDQN_a7daa85bab3ebcd8062cc06865f6db02e}} 
\index{mlpack\+::rl\+::\+Simple\+D\+QN@{mlpack\+::rl\+::\+Simple\+D\+QN}!Forward@{Forward}}
\index{Forward@{Forward}!mlpack\+::rl\+::\+Simple\+D\+QN@{mlpack\+::rl\+::\+Simple\+D\+QN}}
\subsubsection{Forward()}
{\footnotesize\ttfamily void Forward (\begin{DoxyParamCaption}\item[{const arma\+::mat}]{state,  }\item[{arma\+::mat \&}]{target }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Perform the forward pass of the states in real batch mode. 


\begin{DoxyParams}{Parameters}
{\em state} & The input state. \\
\hline
{\em target} & The predicted target. \\
\hline
\end{DoxyParams}


Definition at line 102 of file simple\+\_\+dqn.\+hpp.

\mbox{\label{classmlpack_1_1rl_1_1SimpleDQN_aa68d74dc1e86e4352e00a3cab83a0e4a}} 
\index{mlpack\+::rl\+::\+Simple\+D\+QN@{mlpack\+::rl\+::\+Simple\+D\+QN}!Parameters@{Parameters}}
\index{Parameters@{Parameters}!mlpack\+::rl\+::\+Simple\+D\+QN@{mlpack\+::rl\+::\+Simple\+D\+QN}}
\subsubsection{Parameters()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily const arma\+::mat\& Parameters (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Return the Parameters. 



Definition at line 128 of file simple\+\_\+dqn.\+hpp.

\mbox{\label{classmlpack_1_1rl_1_1SimpleDQN_a043f0ccd62e6711a18e0d81047be9a0a}} 
\index{mlpack\+::rl\+::\+Simple\+D\+QN@{mlpack\+::rl\+::\+Simple\+D\+QN}!Parameters@{Parameters}}
\index{Parameters@{Parameters}!mlpack\+::rl\+::\+Simple\+D\+QN@{mlpack\+::rl\+::\+Simple\+D\+QN}}
\subsubsection{Parameters()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily arma\+::mat\& Parameters (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify the Parameters. 



Definition at line 130 of file simple\+\_\+dqn.\+hpp.

\mbox{\label{classmlpack_1_1rl_1_1SimpleDQN_aefcbb9daa8a256f06abf569abc4ebd1e}} 
\index{mlpack\+::rl\+::\+Simple\+D\+QN@{mlpack\+::rl\+::\+Simple\+D\+QN}!Predict@{Predict}}
\index{Predict@{Predict}!mlpack\+::rl\+::\+Simple\+D\+QN@{mlpack\+::rl\+::\+Simple\+D\+QN}}
\subsubsection{Predict()}
{\footnotesize\ttfamily void Predict (\begin{DoxyParamCaption}\item[{const arma\+::mat}]{state,  }\item[{arma\+::mat \&}]{action\+Value }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Predict the responses to a given set of predictors. 

The responses will reflect the output of the given output layer as returned by the output layer function.

If you want to pass in a parameter and discard the original parameter object, be sure to use std\+::move to avoid unnecessary copy.


\begin{DoxyParams}{Parameters}
{\em state} & Input state. \\
\hline
{\em action\+Value} & Matrix to put output action values of states input. \\
\hline
\end{DoxyParams}


Definition at line 91 of file simple\+\_\+dqn.\+hpp.

\mbox{\label{classmlpack_1_1rl_1_1SimpleDQN_a13df76c46bb1caaacde3c67531e52382}} 
\index{mlpack\+::rl\+::\+Simple\+D\+QN@{mlpack\+::rl\+::\+Simple\+D\+QN}!Reset\+Noise@{Reset\+Noise}}
\index{Reset\+Noise@{Reset\+Noise}!mlpack\+::rl\+::\+Simple\+D\+QN@{mlpack\+::rl\+::\+Simple\+D\+QN}}
\subsubsection{Reset\+Noise()}
{\footnotesize\ttfamily void Reset\+Noise (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Resets noise of the network, if the network is of type noisy. 



Definition at line 118 of file simple\+\_\+dqn.\+hpp.

\mbox{\label{classmlpack_1_1rl_1_1SimpleDQN_a7178038c3cb8d247eadb94cd2058c432}} 
\index{mlpack\+::rl\+::\+Simple\+D\+QN@{mlpack\+::rl\+::\+Simple\+D\+QN}!Reset\+Parameters@{Reset\+Parameters}}
\index{Reset\+Parameters@{Reset\+Parameters}!mlpack\+::rl\+::\+Simple\+D\+QN@{mlpack\+::rl\+::\+Simple\+D\+QN}}
\subsubsection{Reset\+Parameters()}
{\footnotesize\ttfamily void Reset\+Parameters (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Resets the parameters of the network. 



Definition at line 110 of file simple\+\_\+dqn.\+hpp.



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
/var/www/mlpack.\+ratml.\+org/mlpack.\+org/\+\_\+src/mlpack-\/3.\+3.\+2/src/mlpack/methods/reinforcement\+\_\+learning/q\+\_\+networks/\textbf{ simple\+\_\+dqn.\+hpp}\end{DoxyCompactItemize}
