cvigoe / DRL4MAAS

Code for paper "Multi-Agent Active Search: a Reinforcement Learning Approach", submitted to ICRA 2022.
MIT License
12 stars 0 forks source link

In agnosticmaas_env, the value returned by function reset is not in self.observation_space #1

Closed chengyh23 closed 2 years ago

chengyh23 commented 2 years ago

The dim of state returned by reset function of agnosticmaaseanv IS NOT EQUAL TO the dim of observation space (= self.num_hypothesis)

if not self.adaptive_grid:
    if self.fisher_in_state:
        tmp = [val for pair in zip(self.b_dummies, fisher) for val in pair]
        return np.array([val for pair in zip(self.b_dummies, fisher) for val in pair])
    else:
        return np.array(self.b_dummies)
else:
    if self.fisher_in_state:
        #TODO: put fisher in state in interlaced fashion
        return np.array(list(self.b_dummies) + list(self.all_boundaries) + [1] + list(fisher))
    else:
        return np.array([val for pair in zip(list(self.b_dummies), list(self.all_boundaries) + [1]) for val in pair])
chengyh23 commented 2 years ago

I reinstall and downgrade to gym==0.20.0.