Solution (source code)

= Solution

Positive definiteness makes the quadratic term uniquely maximal at
$$
\boxed{\beta^{(t+1)}=d.}
$$
For each $j$, maximize the concave function $r_j\log\pi_j+q_j\log(1-\pi_j)$. Its interior critical point is
$$
\boxed{\pi_j^{(t+1)}=\frac{r_j}{r_j+q_j}=\frac{r_j}{n}.}
$$
The same formula gives the appropriate boundary value when $r_j=0$ or $q_j=0$.