Closed JEF1056 closed 2 months ago
I believe search.bfs
is defined to always return a list:
https://github.com/linqs/pacman/blob/3cd55efc788ce6d9491c24850c0a772ad3759ad7/pacai/student/search.py#L9
So I think returning a None (vs an empty list) would indicate an incorrect student implementation.
If I am reading this correctly, the current behavior is correct. We can reopen if I am mistaken.
Error is on this line https://github.com/linqs/pacman/blob/3cd55efc788ce6d9491c24850c0a772ad3759ad7/pacai/core/featureExtractors.py#L62 searchbfs(prob) may occasionally return None, which does not have a length. I do not have full debug logs as I have fixed it myeslf on my own repo by changing the line to
dist = len(search.bfs(prob)) if search.bfs(prob) else 0
Feel free to use my fix or whatever equivalent you feel makes the most sense for this codebase