\section{Discrete\+Action\+Env Class Reference}
\label{classmlpack_1_1rl_1_1DiscreteActionEnv}\index{Discrete\+Action\+Env@{Discrete\+Action\+Env}}


To use the dummy environment, one may start by specifying the state and action dimensions.  


\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \textbf{ Action}
\begin{DoxyCompactList}\small\item\em Implementation of discrete action. \end{DoxyCompactList}\item 
class \textbf{ State}
\begin{DoxyCompactList}\small\item\em Implementation of state of the dummy environment. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ State} \textbf{ Initial\+Sample} ()
\begin{DoxyCompactList}\small\item\em Dummy function to mimic initial sampling in an environment. \end{DoxyCompactList}\item 
bool \textbf{ Is\+Terminal} (const \textbf{ State} \&) const
\begin{DoxyCompactList}\small\item\em Dummy function to find terminal state. \end{DoxyCompactList}\item 
double \textbf{ Sample} (const \textbf{ State} \&, const \textbf{ Action} \&, \textbf{ State} \&)
\begin{DoxyCompactList}\small\item\em Dummy function to mimic sampling in an environment. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
To use the dummy environment, one may start by specifying the state and action dimensions. 

Eg\+: 
\begin{DoxyCode}
DiscreteActionEnv::State::dimension = 4;
DiscreteActionEnv::Action::size = 2;
\end{DoxyCode}


Now the \doxyref{Discrete\+Action\+Env}{p.}{classmlpack_1_1rl_1_1DiscreteActionEnv} class can be used as an Environment\+Type in RL methods just as any other mlpack\textquotesingle{}s implementation of gym environments. 

Definition at line 32 of file env\+\_\+type.\+hpp.



\subsection{Member Function Documentation}
\mbox{\label{classmlpack_1_1rl_1_1DiscreteActionEnv_aa9f537249fa0c1e62b38197996ab4c6a}} 
\index{mlpack\+::rl\+::\+Discrete\+Action\+Env@{mlpack\+::rl\+::\+Discrete\+Action\+Env}!Initial\+Sample@{Initial\+Sample}}
\index{Initial\+Sample@{Initial\+Sample}!mlpack\+::rl\+::\+Discrete\+Action\+Env@{mlpack\+::rl\+::\+Discrete\+Action\+Env}}
\subsubsection{Initial\+Sample()}
{\footnotesize\ttfamily \textbf{ State} Initial\+Sample (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Dummy function to mimic initial sampling in an environment. 

\begin{DoxyReturn}{Returns}
the dummy state. 
\end{DoxyReturn}


Definition at line 99 of file env\+\_\+type.\+hpp.



References Discrete\+Action\+Env\+::\+State\+::\+State().

\mbox{\label{classmlpack_1_1rl_1_1DiscreteActionEnv_a7061ffc3be37983a46a312973a375c0a}} 
\index{mlpack\+::rl\+::\+Discrete\+Action\+Env@{mlpack\+::rl\+::\+Discrete\+Action\+Env}!Is\+Terminal@{Is\+Terminal}}
\index{Is\+Terminal@{Is\+Terminal}!mlpack\+::rl\+::\+Discrete\+Action\+Env@{mlpack\+::rl\+::\+Discrete\+Action\+Env}}
\subsubsection{Is\+Terminal()}
{\footnotesize\ttfamily bool Is\+Terminal (\begin{DoxyParamCaption}\item[{const \textbf{ State} \&}]{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Dummy function to find terminal state. 


\begin{DoxyParams}{Parameters}
{\em $\ast$} & (state) The current state. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
It\textquotesingle{}s of no use but so lets keep it false. 
\end{DoxyReturn}


Definition at line 106 of file env\+\_\+type.\+hpp.



References Discrete\+Action\+Env\+::\+State\+::dimension, and Discrete\+Action\+Env\+::\+Action\+::size.

\mbox{\label{classmlpack_1_1rl_1_1DiscreteActionEnv_a1e46b501bcca9ffdaab87a8cd6002d35}} 
\index{mlpack\+::rl\+::\+Discrete\+Action\+Env@{mlpack\+::rl\+::\+Discrete\+Action\+Env}!Sample@{Sample}}
\index{Sample@{Sample}!mlpack\+::rl\+::\+Discrete\+Action\+Env@{mlpack\+::rl\+::\+Discrete\+Action\+Env}}
\subsubsection{Sample()}
{\footnotesize\ttfamily double Sample (\begin{DoxyParamCaption}\item[{const \textbf{ State} \&}]{,  }\item[{const \textbf{ Action} \&}]{,  }\item[{\textbf{ State} \&}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Dummy function to mimic sampling in an environment. 


\begin{DoxyParams}{Parameters}
{\em $\ast$} & (state) The current state. \\
\hline
{\em $\ast$} & (action) The current action. \\
\hline
{\em $\ast$} & (next\+State) The next state. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
It\textquotesingle{}s of no use so lets keep it 0. 
\end{DoxyReturn}


Definition at line 89 of file env\+\_\+type.\+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/environment/\textbf{ env\+\_\+type.\+hpp}\end{DoxyCompactItemize}
