Sample from discerte uniform with moving bounds

@fehiepsi Thank you very much.
I’m somewhat confused, as in the discrete case I’m able to sample from both o_{t+1} as well as from w|o_t so where’s the problem in the model as currently specified?
In your suggested solution - what would be an efficient way to trim the array of possible values? Would you recommend implementing a Discrete Uniform distribution, similar in principle to your implementation of the Truncated Binomial (Truncated Binomial, How to implement?)?
Thanks for the kind help!