Behrens' Bayesian Learner Model : How to share parameters between steps?

I edited the first post and comment on the data generation code. I add Waskom’s code as well.

I got some warning like this last time. When I tried to use the logistic random walk code.

The rhat statistic is larger than 1.4 for some parameters. The sampler did not converge.
The estimated number of effective samples is smaller than 200 for some parameters.