thomasMisiek/mixed-coordination-models

Error when running `perform_full_exp3_pearce.py`

mstimberg opened this issue · 2 comments

After fixing the parameter mismatch mentioned in #5 , the script fails with the following error:

Traceback (most recent call last):
  File "/home/marcel/programming/mixed-coordination-models/sources/perform_full_exp3_pearce.py", line 142, in <module>
    perform_full_exp3_pearce()
  File "/home/marcel/programming/mixed-coordination-models/sources/perform_full_exp3_pearce.py", line 131, in perform_full_exp3_pearce
    perform_group_exp3_pearce(env_params, ag_params, directory=sys.argv[1]+"/control_group", show_plots=False, save_plots=True)
  File "/home/marcel/programming/mixed-coordination-models/sources/exp3_pearce_protocol.py", line 112, in perform_group_exp3_pearce
    res2_mf, res2_allo, res2_sr, res2_combined = get_mean_preferred_dirs(agents, 0, 0)
ValueError: too many values to unpack (expected 4)

This still fails for me with the same error message. But running this experiment is not necessary fo ReScience/submissions#62 if I am not mistaken. Actually, I am not quite sure what this "third experiment" corresponds to, as far as I can tell, Pearce et al. 1998 only has two experiments, and I don't see anything in the article about inverting the landmark to platform distance (as mentioned in the function's docstring).

Ah sorry, I did not notice this #6th issue.

Yes, this experiment is not related to ReScience/submissions#62, and everything related to it has been removed from the "Geerts Replication" notebook.

However. I acknowledge that the name "Third experiment" is misleading, and I will find a better name for it in our future article. Pearce et al. 1998 explicitly mentioned two experiments. First, the experiment with HPC-lesioned and control groups. And additionally, the experiment with "trials" and "sessions" groups. What I call the third experiment is the supplementary trial added at the end of the first experiment, where the landmark is placed at the center of the maze, and with an inverted platform direction relative to the landmark. Citing Pearce's paper:

For half of the rats in each group the platform was located at the usual direction and distance from the landmark, and for the remaining rats the platform was located at the same distance from the landmark but on the opposite side to normal.

In Geerts code, the landmark-platform distance encodes how far north of the platform the landmark is placed. Negative distance values switch this direction south. This being said, I might replace "inverting the landmark to platform distance" in the docstring to "inverting the landmark to platform direction" if that can make things clearer.

Furthermore I noticed that it is the landmark that should be placed at the center of the maze and not the platform like in my design, I will modify this.

And of course I will update the res2_mf, res2_allo, res2_sr, res2_combined = get_mean_preferred_dirs(agents, 0, 0) to remove the bug you described in your comment.