Open sai-prasanna opened 4 months ago
Hi @sai-prasanna,
thanks for noting this bug in the public version of the code! I checked the original repo, and the code looks like this:
# compute intrinsic value
embed = self.obs_encoder(predicted_obs)
_, posterior_states = self.posterior(embed, actions, prior_states, is_init=True)
I currently have no time to re-test this version with the change myself, so I may do it later in the future. If you are currently working with the repo, it would be great if you could test it and contribute the fix yourself!
I noticed that you use preferred observations for computing the intrinsic value term in the likelihood AIF. But from what I understand the preferred observations should be used only for the extrinsic value term.
https://github.com/mazpie/contrastive-aif/blob/980e386400dccc56f8879e3aa866d98a869364f9/agents.py#L326