translationalneuromodeling / tapas

TAPAS - Translational Algorithms for Psychiatry-Advancing Science
https://translationalneuromodeling.github.io/tapas/
GNU General Public License v3.0
216 stars 89 forks source link

Question setting up a model where the evolution of some environmental variable depends on the agent's responses #252

Closed fabioboh closed 9 months ago

fabioboh commented 9 months ago

Our model aims to simulate an agent deciding to consume, for example, 1500 Kcal (response) from an environment where 2000 Kcal (input) is available. In the hgf model, all the evolution equations only depend on the inputs (passed as r.u). However, in the model we have in mind, the response model will have to depend on two variables (that vary with time): Avail and Demand. The evolution for both variables will have to be described in the perceptual model. While Avail only depends on the inputs (r.u), Demand depends on the responses the agent gives (r.y). In a model like "tapas_hgf_ar1_mab," I observed that the agent responses (y) are included in r.u as follows:

% Add dummy "zeroth" trial u = [0; r.u(:,1)]; y = [0; r.u(:,2)];

Therefore r.u(:,2) is used to describe the evolution of some environmental variable in the perceptual model. Is my interpretation correct that y are the agent responses? If this is the case, it confuses me, as usually items in r.u represent the inputs from the environment? Could you kindly advise on the recommended approach in our scenario:

Should I use r.y in the function describing the perceptual model?
Alternatively, is it advisable to instruct tapas_fit_Model to include responses in r.u, and if so, how can this be achieved?

Additionally, there's a point in the documentation that I'd like to clarify. In the section on Input Arguments, it states:

"5.1.5 Input arguments responses Array of binary responses (column vector(s))."

Can responses be real numbers as well? This appears to be the case when utilizing the model tapas_bayes_optimal.

fabioboh commented 9 months ago

ok I think I have solved this, it is really not a problem to use r.y in the perceptual model :-) and of course responses can be real number as well. thanks for taking care of maintaining this software!