\section{Dueling\+D\+QN$<$ Complete\+Network\+Type, Feature\+Network\+Type, Advantage\+Network\+Type, Value\+Network\+Type $>$ Class Template Reference}
\label{classmlpack_1_1rl_1_1DuelingDQN}\index{Dueling\+D\+Q\+N$<$ Complete\+Network\+Type, Feature\+Network\+Type, Advantage\+Network\+Type, Value\+Network\+Type $>$@{Dueling\+D\+Q\+N$<$ Complete\+Network\+Type, Feature\+Network\+Type, Advantage\+Network\+Type, Value\+Network\+Type $>$}}


Implementation of the Dueling Deep Q-\/\+Learning network.  


\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ Dueling\+D\+QN} ()
\begin{DoxyCompactList}\small\item\em Default constructor. \end{DoxyCompactList}\item 
\textbf{ Dueling\+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{Dueling\+D\+QN}{p.}{classmlpack_1_1rl_1_1DuelingDQN} class. \end{DoxyCompactList}\item 
\textbf{ Dueling\+D\+QN} (Feature\+Network\+Type feature\+Network, Advantage\+Network\+Type advantage\+Network, Value\+Network\+Type value\+Network, const bool is\+Noisy=false)
\item 
\textbf{ Dueling\+D\+QN} (const \textbf{ Dueling\+D\+QN} \&model)
\begin{DoxyCompactList}\small\item\em Copy constructor. \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 \&action\+Value)
\begin{DoxyCompactList}\small\item\em Perform the forward pass of the states in real batch mode. \end{DoxyCompactList}\item 
void \textbf{ operator=} (const \textbf{ Dueling\+D\+QN} \&model)
\begin{DoxyCompactList}\small\item\em Copy assignment operator. \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 Complete\+Network\+Type = F\+F\+N$<$\+Empty\+Loss$<$$>$, Gaussian\+Initialization$>$, typename Feature\+Network\+Type = Sequential$<$$>$, typename Advantage\+Network\+Type = Sequential$<$$>$, typename Value\+Network\+Type = Sequential$<$$>$$>$\newline
class mlpack\+::rl\+::\+Dueling\+D\+Q\+N$<$ Complete\+Network\+Type, Feature\+Network\+Type, Advantage\+Network\+Type, Value\+Network\+Type $>$}

Implementation of the Dueling Deep Q-\/\+Learning network. 

For more information, see the following.


\begin{DoxyCode}
@misc\{wang2015dueling,
  author  = \{Ziyu Wang, Tom Schaul, Matteo Hessel,Hado van Hasselt,
             Marc Lanctot, Nando de Freitas\},
  title   = \{Dueling Network Architectures \textcolor{keywordflow}{for} Deep Reinforcement Learning\},
  year    = \{2015\},
  url     = \{https:\textcolor{comment}{//arxiv.org/abs/1511.06581\}}
\}
\end{DoxyCode}



\begin{DoxyTemplParams}{Template Parameters}
{\em Complete\+Network\+Type} & The type of network used for full dueling dqn. \\
\hline
{\em Feature\+Network\+Type} & The type of network used for feature network. \\
\hline
{\em Advantage\+Network\+Type} & The type of network used for advantage network. \\
\hline
{\em Value\+Network\+Type} & The type of network used for value network. \\
\hline
\end{DoxyTemplParams}


Definition at line 52 of file dueling\+\_\+dqn.\+hpp.



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



Default constructor. 



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



References Sequential$<$ Input\+Data\+Type, Output\+Data\+Type, Residual, Custom\+Layers $>$\+::\+Add().

\mbox{\label{classmlpack_1_1rl_1_1DuelingDQN_a5c53a36e58589c83bc00c24aa5d4fb42}} 
\index{mlpack\+::rl\+::\+Dueling\+D\+QN@{mlpack\+::rl\+::\+Dueling\+D\+QN}!Dueling\+D\+QN@{Dueling\+D\+QN}}
\index{Dueling\+D\+QN@{Dueling\+D\+QN}!mlpack\+::rl\+::\+Dueling\+D\+QN@{mlpack\+::rl\+::\+Dueling\+D\+QN}}
\subsubsection{Dueling\+D\+Q\+N()\hspace{0.1cm}{\footnotesize\ttfamily [2/4]}}
{\footnotesize\ttfamily \textbf{ Dueling\+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{Dueling\+D\+QN}{p.}{classmlpack_1_1rl_1_1DuelingDQN} 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 79 of file dueling\+\_\+dqn.\+hpp.



References Sequential$<$ Input\+Data\+Type, Output\+Data\+Type, Residual, Custom\+Layers $>$\+::\+Add(), and Concat$<$ Input\+Data\+Type, Output\+Data\+Type, Custom\+Layers $>$\+::\+Add().

\mbox{\label{classmlpack_1_1rl_1_1DuelingDQN_ae96ae292b75eb2cacab532c37a46a2e2}} 
\index{mlpack\+::rl\+::\+Dueling\+D\+QN@{mlpack\+::rl\+::\+Dueling\+D\+QN}!Dueling\+D\+QN@{Dueling\+D\+QN}}
\index{Dueling\+D\+QN@{Dueling\+D\+QN}!mlpack\+::rl\+::\+Dueling\+D\+QN@{mlpack\+::rl\+::\+Dueling\+D\+QN}}
\subsubsection{Dueling\+D\+Q\+N()\hspace{0.1cm}{\footnotesize\ttfamily [3/4]}}
{\footnotesize\ttfamily \textbf{ Dueling\+D\+QN} (\begin{DoxyParamCaption}\item[{Feature\+Network\+Type}]{feature\+Network,  }\item[{Advantage\+Network\+Type}]{advantage\+Network,  }\item[{Value\+Network\+Type}]{value\+Network,  }\item[{const bool}]{is\+Noisy = {\ttfamily false} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



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



References Concat$<$ Input\+Data\+Type, Output\+Data\+Type, Custom\+Layers $>$\+::\+Add().

\mbox{\label{classmlpack_1_1rl_1_1DuelingDQN_ae3128bcd0beb439e3387ec3eca70a725}} 
\index{mlpack\+::rl\+::\+Dueling\+D\+QN@{mlpack\+::rl\+::\+Dueling\+D\+QN}!Dueling\+D\+QN@{Dueling\+D\+QN}}
\index{Dueling\+D\+QN@{Dueling\+D\+QN}!mlpack\+::rl\+::\+Dueling\+D\+QN@{mlpack\+::rl\+::\+Dueling\+D\+QN}}
\subsubsection{Dueling\+D\+Q\+N()\hspace{0.1cm}{\footnotesize\ttfamily [4/4]}}
{\footnotesize\ttfamily \textbf{ Dueling\+D\+QN} (\begin{DoxyParamCaption}\item[{const \textbf{ Dueling\+D\+QN}$<$ Complete\+Network\+Type, Feature\+Network\+Type, Advantage\+Network\+Type, Value\+Network\+Type $>$ \&}]{model }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Copy constructor. 



Definition at line 147 of file dueling\+\_\+dqn.\+hpp.



\subsection{Member Function Documentation}
\mbox{\label{classmlpack_1_1rl_1_1DuelingDQN_ac6d24661593a769ea1cfcd17e11c375f}} 
\index{mlpack\+::rl\+::\+Dueling\+D\+QN@{mlpack\+::rl\+::\+Dueling\+D\+QN}!Backward@{Backward}}
\index{Backward@{Backward}!mlpack\+::rl\+::\+Dueling\+D\+QN@{mlpack\+::rl\+::\+Dueling\+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 205 of file dueling\+\_\+dqn.\+hpp.

\mbox{\label{classmlpack_1_1rl_1_1DuelingDQN_a245296893ea44b3e2dd31099371080bb}} 
\index{mlpack\+::rl\+::\+Dueling\+D\+QN@{mlpack\+::rl\+::\+Dueling\+D\+QN}!Forward@{Forward}}
\index{Forward@{Forward}!mlpack\+::rl\+::\+Dueling\+D\+QN@{mlpack\+::rl\+::\+Dueling\+D\+QN}}
\subsubsection{Forward()}
{\footnotesize\ttfamily void Forward (\begin{DoxyParamCaption}\item[{const arma\+::mat}]{state,  }\item[{arma\+::mat \&}]{action\+Value }\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 action\+Value} & Matrix to put output action values of states input. \\
\hline
\end{DoxyParams}


Definition at line 187 of file dueling\+\_\+dqn.\+hpp.

\mbox{\label{classmlpack_1_1rl_1_1DuelingDQN_af7b53ec80591b8574f4ef7da536a364e}} 
\index{mlpack\+::rl\+::\+Dueling\+D\+QN@{mlpack\+::rl\+::\+Dueling\+D\+QN}!operator=@{operator=}}
\index{operator=@{operator=}!mlpack\+::rl\+::\+Dueling\+D\+QN@{mlpack\+::rl\+::\+Dueling\+D\+QN}}
\subsubsection{operator=()}
{\footnotesize\ttfamily void operator= (\begin{DoxyParamCaption}\item[{const \textbf{ Dueling\+D\+QN}$<$ Complete\+Network\+Type, Feature\+Network\+Type, Advantage\+Network\+Type, Value\+Network\+Type $>$ \&}]{model }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Copy assignment operator. 



Definition at line 151 of file dueling\+\_\+dqn.\+hpp.

\mbox{\label{classmlpack_1_1rl_1_1DuelingDQN_aa68d74dc1e86e4352e00a3cab83a0e4a}} 
\index{mlpack\+::rl\+::\+Dueling\+D\+QN@{mlpack\+::rl\+::\+Dueling\+D\+QN}!Parameters@{Parameters}}
\index{Parameters@{Parameters}!mlpack\+::rl\+::\+Dueling\+D\+QN@{mlpack\+::rl\+::\+Dueling\+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 240 of file dueling\+\_\+dqn.\+hpp.

\mbox{\label{classmlpack_1_1rl_1_1DuelingDQN_a043f0ccd62e6711a18e0d81047be9a0a}} 
\index{mlpack\+::rl\+::\+Dueling\+D\+QN@{mlpack\+::rl\+::\+Dueling\+D\+QN}!Parameters@{Parameters}}
\index{Parameters@{Parameters}!mlpack\+::rl\+::\+Dueling\+D\+QN@{mlpack\+::rl\+::\+Dueling\+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 242 of file dueling\+\_\+dqn.\+hpp.

\mbox{\label{classmlpack_1_1rl_1_1DuelingDQN_aefcbb9daa8a256f06abf569abc4ebd1e}} 
\index{mlpack\+::rl\+::\+Dueling\+D\+QN@{mlpack\+::rl\+::\+Dueling\+D\+QN}!Predict@{Predict}}
\index{Predict@{Predict}!mlpack\+::rl\+::\+Dueling\+D\+QN@{mlpack\+::rl\+::\+Dueling\+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 171 of file dueling\+\_\+dqn.\+hpp.

\mbox{\label{classmlpack_1_1rl_1_1DuelingDQN_a13df76c46bb1caaacde3c67531e52382}} 
\index{mlpack\+::rl\+::\+Dueling\+D\+QN@{mlpack\+::rl\+::\+Dueling\+D\+QN}!Reset\+Noise@{Reset\+Noise}}
\index{Reset\+Noise@{Reset\+Noise}!mlpack\+::rl\+::\+Dueling\+D\+QN@{mlpack\+::rl\+::\+Dueling\+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 228 of file dueling\+\_\+dqn.\+hpp.

\mbox{\label{classmlpack_1_1rl_1_1DuelingDQN_a7178038c3cb8d247eadb94cd2058c432}} 
\index{mlpack\+::rl\+::\+Dueling\+D\+QN@{mlpack\+::rl\+::\+Dueling\+D\+QN}!Reset\+Parameters@{Reset\+Parameters}}
\index{Reset\+Parameters@{Reset\+Parameters}!mlpack\+::rl\+::\+Dueling\+D\+QN@{mlpack\+::rl\+::\+Dueling\+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 220 of file dueling\+\_\+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{ dueling\+\_\+dqn.\+hpp}\end{DoxyCompactItemize}
