\section{Dueling\+D\+QN$<$ Output\+Layer\+Type, Init\+Type, 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$<$ Output\+Layer\+Type, Init\+Type, Complete\+Network\+Type, Feature\+Network\+Type, Advantage\+Network\+Type, Value\+Network\+Type $>$@{Dueling\+D\+Q\+N$<$ Output\+Layer\+Type, Init\+Type, 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, Init\+Type init=Init\+Type(), Output\+Layer\+Type output\+Layer=Output\+Layer\+Type())
\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)
\begin{DoxyCompactList}\small\item\em Construct an instance of \doxyref{Dueling\+D\+QN}{p.}{classmlpack_1_1rl_1_1DuelingDQN} class from a pre-\/constructed network. \end{DoxyCompactList}\item 
\textbf{ Dueling\+D\+QN} (const \textbf{ Dueling\+D\+QN} \&)
\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 Output\+Layer\+Type = Empty\+Loss$<$$>$, typename Init\+Type = Gaussian\+Initialization, typename Complete\+Network\+Type = F\+F\+N$<$\+Output\+Layer\+Type, Init\+Type$>$, typename Feature\+Network\+Type = Sequential$<$$>$, typename Advantage\+Network\+Type = Sequential$<$$>$, typename Value\+Network\+Type = Sequential$<$$>$$>$\newline
class mlpack\+::rl\+::\+Dueling\+D\+Q\+N$<$ Output\+Layer\+Type, Init\+Type, 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 Output\+Layer\+Type} & The output layer type of the network. \\
\hline
{\em Init\+Type} & The initialization type used for the network. \\
\hline
{\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 56 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 60 of file dueling\+\_\+dqn.\+hpp.



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

\mbox{\label{classmlpack_1_1rl_1_1DuelingDQN_a820e73dd1061693f3281ddbc20e08b16}} 
\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},  }\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{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
{\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 85 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_acbde6caaa3601be4429d799f1f88f8a3}} 
\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]}}



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


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


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



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

\mbox{\label{classmlpack_1_1rl_1_1DuelingDQN_a7d21e28890605be3b558ec79037560ba}} 
\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}$<$ Output\+Layer\+Type, Init\+Type, Complete\+Network\+Type, Feature\+Network\+Type, Advantage\+Network\+Type, Value\+Network\+Type $>$ \&}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Copy constructor. 



Definition at line 163 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 221 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 203 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}$<$ Output\+Layer\+Type, Init\+Type, 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 167 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 256 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 258 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 187 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 244 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 236 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-\/git/src/mlpack/methods/reinforcement\+\_\+learning/q\+\_\+networks/\textbf{ dueling\+\_\+dqn.\+hpp}\end{DoxyCompactItemize}
