
% -------------------------------------------------
%                  General
% -------------------------------------------------

% Generic math notation
\renewcommand*{\vec}[1]{\bm{#1}}
\newcommand*{\variance}{\mathrm{Var}}


% Highlight bits in algorithm
\newcommand*{\alghighlight}[1]{\textcolor{blue}{#1}}

\newcommand*{\argmin}[1]{\operatorname*{arg\,min}_{#1}}
\newcommand*{\argmax}[1]{\operatorname*{arg\,max}_{#1}}
\newcommand*{\bigO}[1]{\mathcal{O}(#1)}

% -------------------------------------------------
%                  Models
% -------------------------------------------------

% Topological map
\newcommand*{\tm}{\mathcal{G}}
\newcommand*{\tmnodes}{V}
\newcommand*{\tmedges}{E}
\newcommand*{\tmdepots}{D}
\newcommand*{\tmnode}{v}
\newcommand*{\tmedge}{e}

% MCTS
\newcommand*{\mctstree}{\mathcal{T}}
\newcommand*{\mctshorizon}{H}
\newcommand*{\mctsnode}{n}
\newcommand*{\mctsnodeb}{n^{B}} % belief nodes
\newcommand*{\mctsnodeba}{n^{BA}} % belief-action nodes
\newcommand*{\mctsstate}{s}
\newcommand*{\mctsaction}{a}
\newcommand*{\mctscount}{N}
\newcommand*{\mctsvalue}{Q}
\newcommand*{\mctsstatevalue}{Q} % overloaded, same as above
\newcommand*{\mctsaveragevalue}{\hat{\mctsvalue}}
\newcommand*{\mctspuctvalue}{Q_{\mathrm{PUCT}}}
\newcommand*{\mctsparampuct}{{e_d}}           % Auger et al. 2013
\newcommand*{\mctsparamprogwiden}{\alpha_d} % Auger et al. 2013

% MDP (or generic variables for MDP variants)
\newcommand*{\mdp}{\mathcal{M}}
\newcommand*{\mdpstatespace}{S}
\newcommand*{\mdpinitstate}{s_0}
\newcommand*{\mdpactionspace}{A}
\newcommand*{\mdprewardspace}{R}
\newcommand*{\mdpcostfunc}{C}
\newcommand*{\mdptransition}{T}
\newcommand*{\mdphorizon}{H}
\newcommand*{\mdpstate}{s}
\newcommand*{\mdpaction}{a}
\newcommand*{\mdppolicy}{\pi}
\newcommand*{\mdpoptimalpolicy}{\mdppolicy^*}

% More generic state variables
\newcommand*{\statespatial}{\vec{x}}
\newcommand*{\statetemporal}{t}

% POMDP
\newcommand*{\pomdp}{\mdp}
\newcommand*{\pomdpstatespace}{\mdpstatespace}
\newcommand*{\pomdpinitstate}{\mdpinitstate}
\newcommand*{\pomdptransition}{\mdptransition}
\newcommand*{\pomdpactionspace}{\mdpactionspace}
\newcommand*{\pomdpobservationspace}{O}
\newcommand*{\pomdpobservationmodel}{Z}
\newcommand*{\pomdprewardspace}{\mdprewardspace}
\newcommand*{\pomdphorizon}{\mdphorizon}
\newcommand*{\pomdpaction}{\mdpaction}

% PKSMDP
\newcommand*{\pksmdp}{\mathcal{M}}
\newcommand*{\pksmdpstatespace}{\mdpstatespace}
\newcommand*{\pksmdpinitstate}{\mdpinitstate}
\newcommand*{\pksmdpinitwaypoint}{\tmnode_0}
\newcommand*{\pksmdpinitknownstate}{\pksmdpstate_{k,0}}
\newcommand*{\pksmdpstatespaceknown}{\pksmdpstatespace_k}
\newcommand*{\pksmdpstatespaceest}{\pksmdpstatespace_e}
\newcommand*{\pksmdprewardspace}{\mdprewardspace}
\newcommand*{\pksmdpcostfunc}{\mdpcostfunc}
\newcommand*{\pksmdptransition}{\mdptransition}
\newcommand*{\pksmdphorizon}{\mdphorizon}
\newcommand*{\pksmdpactionspace}{\mdpactionspace}
\newcommand*{\pksmdpstate}{\mdpstate}
\newcommand*{\pksmdpstateknown}{\pksmdpstate_k}
\newcommand*{\pksmdpstateest}{\pksmdpstate_e}
\newcommand*{\pksmdpaction}{a}

% Additional PKSMDP notation
\newcommand*{\pksmdpavailableactions}{\pksmdpactionspace_v}

% Unknown process
\newcommand*{\processstatespace}{S}
\newcommand*{\processobsspace}{O}
\newcommand*{\processobselement}{o} % element of obs space
\newcommand*{\processobs}{z} % noisy observation
\newcommand*{\processfunction}{f}
\newcommand*{\processstate}{\mdpstate}
\newcommand*{\processnoise}{\epsilon}
\newcommand*{\processvar}{\sigma}
\newcommand*{\environment}{X}
\newcommand*{\environmentstate}{x}

% Gaussian process
\newcommand*{\gp}{\mathcal{GP}}
\newcommand*{\gpmean}{m}
\newcommand*{\gpkernel}{k}
\newcommand*{\gpposterior}{p^\gp}
\newcommand*{\gpstate}{s}
\newcommand*{\gpobs}{o}
\newcommand*{\gpdataset}{\mathcal{D}}
\newcommand*{\gpnumpoints}{n_\gpdataset}
\newcommand*{\gpobsnoise}{\epsilon}
\newcommand*{\gppointsvisited}{\gpstate_\gpdataset}
\newcommand*{\gppointsquery}{\gpstate_*}
\newcommand*{\gphypers}{\vec{\theta}}
\newcommand*{\gppriors}{p_0}
\newcommand*{\gpvar}{\sigma}

% GP complexity analysis only
\newcommand*{\gpsize}{n}
\newcommand*{\gpinducingpts}{m}

% CTMCs
\newcommand*{\ctmc}{\mathcal{Q}}
\newcommand*{\ctmcstates}{S}
\newcommand*{\ctmcinitstate}{\textit{init}}
\newcommand*{\ctmcrates}{\delta_E}
\newcommand*{\ctmcstate}{s}

% Trajectory of states
\newcommand*{\traj}{\varsigma}
\newcommand*{\trajmulti}{\vec{\traj}}
\newcommand*{\trajstate}{\pksmdpstate}
\newcommand*{\trajobs}{\processobs}

% Path through MDP
\newcommand*{\mdppath}{w}
\newcommand*{\mdppathtimestep}{\ell}
\newcommand*{\mdppathset}{\mathit{Path}}
\newcommand*{\mdppolicyset}{\Pi}
\newcommand*{\mdppathprob}{\mathit{Pr}}
\newcommand*{\mdppathfunc}{\zeta}
\newcommand*{\mdpgoalstates}{G}
\newcommand*{\mdpforbiddenstates}{F}

\newcommand*{\creach}[2]{{\mathit{reach}_{\neg {#1},{#2}}}}
\newcommand*{\cumulreach}[2]{{\mathit{cumul}_{\neg {#1},{#2}}}}
\newcommand*{\pireach}[2]{{\pi_{\neg {#1},{#2}}}}
\newcommand*{\bcreach}[3]{{\mathit{reach}_{\neg {#1},{#2}}^{#3}}}
\newcommand*{\mdppathexp}{\mathbb{E}}


% -------------------------------------------------
%                 Chapter-specific
% -------------------------------------------------

%%%%% LTM 1 %%%%%

% Model aliases
\newcommand*{\pomdpfull}{Multi-Mission PKSMDP}
\newcommand*{\pomdpshort}{M\textsuperscript{2}-PKSMDP}
\newcommand*{\mainmodelsymbol}{\mathcal{M}}

\newcommand*{\dur}[1]{\mathit{dur}(#1)}
% \newcommand*{\dur}[1]{\textsc{Dur}(#1)}

\newcommand*{\multimissionspec}{\mathcal{H}}


%%%%% LTM 2 %%%%%

% Robot states
\newcommand*{\stateactive}{\textsc{Active}}
\newcommand*{\statecharging}{\textsc{Replenishing}}
\newcommand*{\actiontraverse}{\textsc{Traverse}}
\newcommand*{\actionexplore}{\textsc{Explore}}
\newcommand*{\actioncharge}{\textsc{Charge}} % Used in math
\newcommand*{\actionreplenish}{\textsc{Replenish}}
\newcommand*{\actionnavigate}{\textsc{Navigate}}

% High level MDP
\newcommand*{\hmdp}{\mathcal{M}_\Phi}
\newcommand*{\hmdpstates}{S_\Phi}
\newcommand*{\hmdpinitstate}{\bar{s}_0}
\newcommand*{\hmdpstate}{\bar{s}}
\newcommand*{\hmdpaction}{\bar{a}}
\newcommand*{\hmdpactions}{A_\Phi}
\newcommand*{\hmdptransitions}{T_\Phi}
\newcommand*{\hmdprewards}{R_\Phi}
\newcommand*{\hmdphorizon}{H_\Phi}
\newcommand*{\hmdptimes}{T}
\newcommand*{\hmdpbatteries}{B}

% Low level planner variables
\newcommand*{\LLtargetdepot}{d_t}
\newcommand*{\LLdeadline}{t_f}

% Math symbols
\newcommand*{\maxbatterydiscrete}{B_{\Phi, \text{max}}}
\newcommand*{\ratecharge}{C_\uparrow}
\newcommand*{\ratedischarge}{C_\downarrow}
\newcommand*{\batterystep}{\Delta_b}
\newcommand*{\timestep}{\Delta_t}

% Model aliases
\newcommand*{\algfull}{Long-Term Monitoring PKSMDP}
\newcommand*{\algshort}{LTM-PKSMDP}

% Models
\newcommand*{\highlevelmdp}{Depot-MDP}
\newcommand*{\highlevelmdpshort}{D-MDP}
\newcommand*{\algbasic}{\textsc{Basic}}
\newcommand*{\algmain}{\textsc{LTM-PKSMDP}}
\newcommand*{\algfixed}{\textsc{Fixed}}


%%%%% LTM 3 %%%%%

% PTDs
\newcommand*{\ptd}{\mathcal{P}}
\newcommand*{\ptdinitialdist}{\bm{\alpha}}
\newcommand*{\ptdtransitions}{\vec{T}}
\newcommand*{\ptdabsrates}{\vec{r}}

% Resource consumption stochastic
\newcommand*{\ratechargefunc}{c_\uparrow}
\newcommand*{\ratedischargefunc}{c_\downarrow}

% Chance constraint
\newcommand*{\batterythreshold}{B_\text{min}}
\newcommand*{\constraintprob}{p_\text{min}}

% Stochastic action model
\newcommand*{\actionmodel}{\rho}
\newcommand*{\actionfixed}{\eta}
\newcommand*{\actionstochastic}{\lambda}

% Stochastic alg stuff
\newcommand*{\tmdet}{\tm_{\mathrm{det}}}
\newcommand*{\actionchain}{A_\mathrm{chain}}

% High-level PKSMDP
\newcommand*{\hpksmdpsymb}{\Psi}
\newcommand*{\hpksmdp}{\mathcal{M}_\hpksmdpsymb}
\newcommand*{\hpksmdpstatespace}{S_\hpksmdpsymb}
\newcommand*{\hpksmdpinitstate}{s_{0,\hpksmdpsymb}}
\newcommand*{\hpksmdpstatespaceknown}{\pksmdpstatespace_{\hpksmdpsymb, k}}
\newcommand*{\hpksmdpstatespaceest}{\pksmdpstatespace_{\hpksmdpsymb, e}}
\newcommand*{\hpksmdprewardspace}{R_\hpksmdpsymb}
\newcommand*{\hpksmdptransition}{T_\hpksmdpsymb}
\newcommand*{\hpksmdphorizon}{H_\hpksmdpsymb}
\newcommand*{\hpksmdpactionspace}{A_\hpksmdpsymb}
\newcommand*{\hpksmdpstate}{s}
\newcommand*{\hpksmdpstateknown}{\pksmdpstate_k}
\newcommand*{\hpksmdpstateest}{\pksmdpstate_e}
\newcommand*{\hpksmdpaction}{a}


%%%%% Safe exploration %%%%%

% Safety and reachability
\newcommand*{\safe}{\mathit{safe}}
\newcommand*{\unsafe}{\mathit{unsafe}}
\newcommand*{\reach}{\mathit{reach}}
\newcommand*{\return}{\mathit{return}}
\newcommand*{\cand}{\mathit{cand}}
\newcommand*{\primary}{\mathit{prim}}
\newcommand*{\progression}{\mathit{prog}}
\newcommand*{\reachprob}{p_{\mathrm{reach}}}
\newcommand*{\returnprob}{p_{\mathrm{return}}}
\newcommand*{\expscorecoeff}{\gamma}
\newcommand*{\safefunc}{\phi}
\newcommand*{\safebound}{\lambda_\mathrm{max}}
\newcommand*{\safeexpbatchsize}{N}

% Mapping free space / occupancy map
\newcommand*{\mapspace}{X}
\newcommand*{\maploc}{x}
\newcommand*{\mapclass}{c}
\newcommand*{\numcells}{N}
\newcommand*{\free}{\mathit{free}}
\newcommand*{\occ}{\mathit{occ}}
\newcommand*{\unknown}{\mathit{unk}}
\newcommand*{\occupancymap}{\mathbb{M}}
\newcommand*{\mapcell}{m}
\newcommand*{\mapsize}{\ell}

% Volumetric gain and exploration
\newcommand*{\unvisited}{\mathit{unvisited}}
\newcommand*{\visited}{\mathit{visited}}
\newcommand*{\gain}{\mathtt{gain}}
\newcommand*{\score}{\mathtt{score}^\gpdataset}
\newcommand*{\baselinethreshold}{\varphi}
\newcommand*{\gaincoeff}{\alpha}
\newcommand*{\gpvarthreshold}{\eta}
\newcommand*{\gainthreshold}{\eta_\gain}
\newcommand*{\safetyprob}{p_\text{min}}

% Graph growing alg
\newcommand*{\extendgraphinc}{\delta}
\newcommand*{\extendgraphangle}{\theta}
\newcommand*{\extendgraphrange}{r}
\newcommand*{\extendgraphlenscale}{\ell}
\newcommand*{\extendgraphproxfac}{f}
\newcommand*{\prev}{\mathit{prev}}

% EstMDP
\newcommand*{\interval}{I}
\newcommand*{\intervals}{\mathcal{I}}
\newcommand*{\estmdp}{\pksmdp^{\gpdataset}}
\newcommand*{\estmdpstatespace}{\pksmdpstatespace^{\gpdataset}}
\newcommand*{\estmdpinitstate}{\pksmdpinitstate^{\gpdataset}}
\newcommand*{\estmdpactionspace}{\pksmdpactionspace}
\newcommand*{\estmdprewardspace}{\pksmdprewardspace^{\gpdataset}}
\newcommand*{\estmdpcostfunc}{\pksmdpcostfunc}
\newcommand*{\estmdptransition}{\pksmdptransition^{\gpdataset}}

% Algorithm names
\newcommand*{\safeestmdp}{SafeEstMDP-Process}
\newcommand*{\safeestexplorer}{SafeEstMDP-Map}
\newcommand*{\safeestexplorershort}{SEM-Map}
\newcommand*{\simplesafeexplorer}{ThresholdBasedExplorer}
\newcommand*{\simplesafeexplorershort}{TB}
\newcommand*{\meanpredictionexplorer}{MeanPredictionExplorer}
\newcommand*{\meanpredictionexplorershort}{MP}

% C++ symbol
\newcommand*{\Cpp}{C\nolinebreak\hspace{-.05em}\raisebox{.3ex}{\footnotesize\bf +}\nolinebreak\hspace{-.10em}\raisebox{.3ex}{\footnotesize\bf +}}