1
0
mirror of https://github.com/gryf/coach.git synced 2025-12-17 19:20:19 +01:00
Files
coach/rl_coach/environments
Gal Leibovich 310d31c227 integration test changes to reach the train part (#254)
* integration test changes to override heatup to 1000 steps +  run each preset for 30 sec (to make sure we reach the train part)

* fixes to failing presets uncovered with this change + changes in the golden testing to properly test BatchRL

* fix for rainbow dqn

* fix to gym_environment (due to a change in Gym 0.12.1) + fix for rainbow DQN + some bug-fix in utils.squeeze_list

* fix for NEC agent
2019-03-27 21:14:19 +02:00
..
2018-08-13 17:11:34 +03:00
2018-08-13 17:11:34 +03:00
2018-08-13 17:11:34 +03:00
2018-08-13 17:11:34 +03:00

A custom environment implementation should look like this:

from coach.filters.input_filter import InputFilter

class CustomFilter(InputFilter):
  def __init__(self):
    ...
  def _filter(self, env_response: EnvResponse) -> EnvResponse:
    ...
  def _get_filtered_observation_space(self, input_observation_space: ObservationSpace) -> ObservationSpace:
    ...
  def _get_filtered_reward_space(self, input_reward_space: RewardSpace) -> RewardSpace:
    ...
  def _validate_input_observation_space(self, input_observation_space: ObservationSpace):
    ...
  def _reset(self):
    ...