aaronsnoswell / unimodal-irl

Algorithms for Uni-Modal Inverse Reinforcement Learning
MIT License
17 stars 5 forks source link

Errors when running example code (Exact Maximum Entropy IRL on FrozenLake) #2

Open kierad opened 1 year ago

kierad commented 1 year ago

Thanks for sharing these methods! I'm keen to use this repo as a benchmark in an MSc project.

I'm having trouble running the 'example usage' code given in the readme (Exact Maximum Entropy IRL on FrozenLake). Here's what I've tried:

and a couple of other changes that seem to be required (which I may have implemented incorrectly of course).

After these changes, the error I'm currently seeing when I run the example usage code is:

...
File "/Users/kierad/GitHub/unimodal-irl/unimodal_irl/sw_maxent_irl.py", line 739, in sw_maxent_irl
nll = Z_theta_log - x @ phi_bar
ValueError: matmul: Input operand 1 has a mismatch in its core dimension 0, with gufunc signature (n?,k),(k,m?)->(n?,m?) (size 81 is different from 16)

I'm using Python 3.9.16. Can you point me in the right direction?

aaronsnoswell commented 1 year ago

Hello!

Just wanted to let you know I've seen your comment here. Thanks for your interest in the repo :) I'm quite busy at the moment, but will try and have a look what the issue is over the next week. Please ping me if you haven't heard from me by then!

kierad commented 1 year ago

Hello Aaron - just pinging you again as you suggested.

LuciaPalumbi commented 6 months ago

Hello Kierad and Aaron - I was wondering if you managed to solve the issues you were facing with the code or if you found other codes for implementing IRL algorithms? I would need to use MaxEnt for a project and I would appreciate knowing if this repo is working or not. Thank you!