kengz/SLM-Lab

I have encounter one problem, maybe a bug.

dvstter opened this issue · 1 comments

I've designed a MultiDiscrete observation and action space. But when I employ DDQN on this environment, the compiler tells me that 'assert len(in_dim) == 3' wrong in 'net/conv.py'. I found that the in_dim is 3, which is an integer. The problem seems happen in function '_get_observable_dim(self, observation_space)' in 'env/base.py'. The observation_space.shape will not return the actual shape, but the dim when the environment is MultiDiscrete. Another verification is that in function '_get_action_dim', action_dim is processed in this way, which is 'action_space.nvec.tolist()'. So I change put two lines of code below
if instance(observation_space, spaces.MultiDiscrete): state_dim = observation_sapce.nvec.tolist() in line 145-146 in file env/base.py.
A8B6CD68EC4E12E572A1DFF4395202FB

kengz commented

Hi @dvstter thanks for the ticket. Would you mind opening a pull request to add those 2 lines of code?