OBS SHape

This commit is contained in:
Steffen Illium 2021-07-30 16:13:35 +02:00
parent ebf49cadea
commit 26b88a9315
2 changed files with 9 additions and 10 deletions

View File

@ -35,7 +35,7 @@ class BaseFactory(gym.Env):
elif self.combin_agent_slices_in_obs and not self.omit_agent_slice_in_obs: elif self.combin_agent_slices_in_obs and not self.omit_agent_slice_in_obs:
slices = self._slices.n - (self._agents.n - 1) slices = self._slices.n - (self._agents.n - 1)
elif not self.combin_agent_slices_in_obs and self.omit_agent_slice_in_obs: elif not self.combin_agent_slices_in_obs and self.omit_agent_slice_in_obs:
slices = self._slices.n - (self._agents.n - 1) slices = self._slices.n - self._agents.n
elif not self.combin_agent_slices_in_obs and not self.omit_agent_slice_in_obs: elif not self.combin_agent_slices_in_obs and not self.omit_agent_slice_in_obs:
slices = self._slices.n slices = self._slices.n
else: else:

View File

@ -228,15 +228,14 @@ class SimpleFactory(BaseFactory):
if __name__ == '__main__': if __name__ == '__main__':
render = True render = True
dirt_props = DirtProperties(clean_amount=3, gain_amount=0.3, max_global_amount=20, dirt_props = DirtProperties(1, 0.05, 0.1, 3, 1, 20, 0.0)
max_local_amount=2, spawn_frequency=3, max_spawn_ratio=0.05, move_props = MovementProperties(True, True, False)
dirt_smear_amount=0.0)
move_props = MovementProperties(allow_diagonal_movement=True, factory = SimpleFactory(n_agents=1, done_at_collision=False, frames_to_stack=0,
allow_square_movement=True, level_name='rooms', max_steps=400,
allow_no_op=False) omit_agent_slice_in_obs=True, parse_doors=True, pomdp_r=3,
factory = SimpleFactory(movement_properties=move_props, dirt_properties=dirt_props, n_agents=1, record_episodes=False, verbose=False
combin_agent_slices_in_obs=False, level_name='rooms', parse_doors=True, )
doors_have_area=True, pomdp_radius=2, cast_shadows=True)
n_actions = factory.action_space.n - 1 n_actions = factory.action_space.n - 1
_ = factory.observation_space _ = factory.observation_space