\section{Simple\+D\+QN$<$ Output\+Layer\+Type, Init\+Type, Network\+Type $>$ Class Template Reference}
\label{classmlpack_1_1rl_1_1SimpleDQN}\index{Simple\+D\+Q\+N$<$ Output\+Layer\+Type, Init\+Type, Network\+Type $>$@{Simple\+D\+Q\+N$<$ Output\+Layer\+Type, Init\+Type, 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, Init\+Type init=Init\+Type(), Output\+Layer\+Type output\+Layer=Output\+Layer\+Type())
\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)
\begin{DoxyCompactList}\small\item\em Construct an instance of \doxyref{Simple\+D\+QN}{p.}{classmlpack_1_1rl_1_1SimpleDQN} class from a pre-\/constructed network. \end{DoxyCompactList}\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 Output\+Layer\+Type = Mean\+Squared\+Error$<$$>$, typename Init\+Type = Gaussian\+Initialization, typename Network\+Type = F\+F\+N$<$\+Output\+Layer\+Type, Init\+Type$>$$>$\newline
class mlpack\+::rl\+::\+Simple\+D\+Q\+N$<$ Output\+Layer\+Type, Init\+Type, Network\+Type $>$}


\begin{DoxyTemplParams}{Template Parameters}
{\em Output\+Layer\+Type} & The output layer type of the network. \\
\hline
{\em Init\+Type} & The initialization type used for the network. \\
\hline
{\em Network\+Type} & The type of network used for simple dqn. \\
\hline
\end{DoxyTemplParams}


Definition at line 36 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 42 of file simple\+\_\+dqn.\+hpp.

\mbox{\label{classmlpack_1_1rl_1_1SimpleDQN_aba9d7137085e90cbfc8387b8f1ef8874}} 
\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},  }\item[{Init\+Type}]{init = {\ttfamily InitType()},  }\item[{Output\+Layer\+Type}]{output\+Layer = {\ttfamily OutputLayerType()} }\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
{\em init} & Specifies the initialization rule for the network. \\
\hline
{\em output\+Layer} & Specifies the output layer type for network. \\
\hline
\end{DoxyParams}


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

\mbox{\label{classmlpack_1_1rl_1_1SimpleDQN_a1ed204ea5798e4dfbce7ae5a05614fd2}} 
\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]}}



Construct an instance of \doxyref{Simple\+D\+QN}{p.}{classmlpack_1_1rl_1_1SimpleDQN} class from a pre-\/constructed network. 


\begin{DoxyParams}{Parameters}
{\em network} & The network to be used by \doxyref{Simple\+D\+QN}{p.}{classmlpack_1_1rl_1_1SimpleDQN} class. \\
\hline
{\em is\+Noisy} & Specifies whether the network needs to be of type noisy. \\
\hline
\end{DoxyParams}


Definition at line 90 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 154 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 117 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 143 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 145 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 106 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 133 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 125 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-\/git/src/mlpack/methods/reinforcement\+\_\+learning/q\+\_\+networks/\textbf{ simple\+\_\+dqn.\+hpp}\end{DoxyCompactItemize}
