用latex写论文中的伪代码,想要在伪代码中显示end while但不显示end if应该怎么改?
\documentclass[11pt,twoside,a4paper]{article}
\usepackage{algorithm}
\usepackage{algorithmicx}
\usepackage{algpseudocode}
\usepackage{amsmath}
\usepackage[top=1cm, bottom=2cm, left=2cm, right=2cm]{geometry}
\begin{document}
%% 写算法伪代码或者流程的前期准备
\renewcommand{\algorithmicrequire}{\textbf{Input:}} % Use Input in the format of Algorithm
\renewcommand{\algorithmicensure}{\textbf{Output:}} % Use Output in the format of Algorithm
\begin{algorithm}[h]
\caption{The Incentive Mechanism TACT} % 名称
\begin{algorithmic}[1]
\Require
$T$,
$N$,
$K$,
$\Delta$,
$\Delta_{min}$,
$a$,
$b$,
$c$,
$d$,
$\xi$,
$\Phi$
\Ensure
$\Psi$,\{{$\beta^{t*}|t \in [1,T]$}\},\{{$p^{t*}|t \in [1,T]$}\,,\{{$\delta^{t*}|t \in [1,T]$}\}
\State{\bfseries Initialization}:
\State $\psi_{i}^{t}=0,\beta^{t}=0,p_{i}^{t}=0,\delta_{i}^{t}=0,\forall i \in \mathcal{N},t \in [1,T]$ ;
\State{\bfseries Initial exploration phase}:
\State Recruit all social-aware workers when t=1,i.e.,
\For{each worker $i\in \mathcal{N}$,$t=1$} $\psi_{{i}}^{{1}}$=1,set $q_{{i,k}}^{{1}}=1$;
\EndFor
\State Determine the salary for recruited workers:\ $p_{{i}}^{{1*}} = p_{\max}$;\\
Requester:pay $\beta^{{1*}}=argmin_{\beta^{{1}}}$ $(U_{p}^{t} \geq 0$) to the platform;\\
Workers:perform the task;upload and share answers;
\For {each worker $i\in \mathcal{N}$} update $n_{i}^{1}, \tilde q_{i}^{1}, \phi_{i}^{1}, \hat{q}_{i}^{1}$;
\EndFor
\State{\bfseries Learning of quality and the THS game}:
\While{each period $t<T$}
\State Sort the workers according to the CUCB-based quality
\Statex \hspace{0.6cm}value $\hat {q}_{i}^{t}:\hat {q}_{w1}^{t}\geq \hat {q}_{w2}^{t}\geq...\geq \hat {q}_{wN}^{t}$; t=t+1;
\State Select the top $K$ workers as winners, denoted as $\mathcal{W}^t$;
\For{each worker $w_i \in \mathcal{W}^t$} $\psi_{wi}^{t}=1$;
\EndFor
\State Carry out the THS game: determine the optimal strategy
\Statex \hspace{0.6cm}group $\langle \beta^{t*},p^{t*},\delta^{t*}\rangle$ for each party according to Eqs. (18),
\Statex \hspace{0.5cm} (19),and (25);
\State Workers: perform the task; upload and share answers;
\For{each worker $i \in \mathcal{N}$} update $n_{i}^{t},\tilde{q}_{i}^{t},\phi_{i}^{t},\hat {q}_{i}^{t}$;
\EndFor
\EndWhile
\State{\bfseries Return} $\mathcal{W}^t,\Psi,\langle \beta^{t*},p^{t*},\delta^{t*}\rangle,\forall t \in [1,T] $.
\end{algorithmic}
\end{algorithm}
\end{document}