Tips on model structure for "the number guessing game"?

Hmmm, I guess you can model it as a Bernoulli, with 0 being too low, and 1 being too high. I would model the guess as a Uniform (theta_1), and use the p=tt.switch(theta_1 > theta, 0, 1) as the p for the Bernoulli.
So the logic here is that, the latent guess is also a DiscreteUniform number (but use Uniform as continuous variable are easier to handle in PyMC3), and the guess-er compare this latent number with the true number (unknown to the guess-er, so also latent) and make a probabilistic judgement:

with pm.Model() as m:
    true_num = pm.Uniform('theta0', ...)
    guess_num = pm.Uniform('theta1', ...)
    true_num_obs = pm.Normal('true_num', mu=true_num, sd=k, observed=true_number) 
    # k here is the internal uncertainty of the guess-er, not sure what is 
    # the best way to model this
    guess = pm.Bernoulli('guess', 
                         p=tt.switch(guess_num > true_num, 0, 1), 
                         observed=response=='too high')
1 Like