implementation of inference algorithms for models of generalized discrimination tasks