cleanup algos + adjusted renderer to support "ray casting"

This commit is contained in:
romue
2021-07-27 16:59:24 +02:00
parent 8429e3db9d
commit 9e8d2ac1dc
9 changed files with 102 additions and 254 deletions

View File

@ -83,7 +83,7 @@ class SimpleFactory(BaseFactory):
agents = []
for i, agent in enumerate(self._agents):
name, state = asset_str(agent)
agents.append(Entity(name, agent.pos, 1, 'none', state, i+1))
agents.append(Entity(name, agent.pos, 1, 'none', state, i+1, agent.temp_light_map))
doors = []
if self.parse_doors:
for i, door in enumerate(self._doors):
@ -229,7 +229,7 @@ if __name__ == '__main__':
allow_no_op=False)
factory = SimpleFactory(movement_properties=move_props, dirt_properties=dirt_props, n_agents=1,
combin_agent_slices_in_obs=False, level_name='rooms', parse_doors=True,
pomdp_radius=3, cast_shadows=True)
pomdp_radius=2, cast_shadows=True)
n_actions = factory.action_space.n - 1
_ = factory.observation_space