Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Post-Step-Hook for External Events #134

Open
chenkins opened this issue Feb 26, 2025 · 0 comments · May be fixed by #156
Open

Post-Step-Hook for External Events #134

chenkins opened this issue Feb 26, 2025 · 0 comments · May be fixed by #156
Labels
enhancement New feature or request
Milestone

Comments

@chenkins
Copy link
Contributor

chenkins commented Feb 26, 2025

Objectives
Hock for modifiying state for mimicking external events.

Todos
List what needs to be done for the issue to be considered done and the objectives to be reached.

Minimal testing requirements
Think about what behavior shall be covered by a test (qualitatively describe each test).

Additional context
Relates to #129

Implementation Sketch

  • Post-step-Hook just before the rewards (end of episode only) and observations are computed.
        # Check if episode has ended and update rewards and dones
        self.end_of_episode_update(have_all_agents_ended)

        self._update_agent_positions_map()
        if self.record_steps:
            self.record_timestep(action_dict)

        return self._get_observations(), self.rewards_dict, self.dones, self.get_info_dict()

Interface (as long as we have have not a well-defined configuration/state abstraction (probably to be postponed see #127 ):

post_step_hook(env: RailEnv)

Later on:

post_step_hook(i: int, state: RailEnvState)
@chenkins chenkins added the enhancement New feature or request label Feb 26, 2025
@chenkins chenkins added this to the 4.0.7 milestone Feb 26, 2025
@chenkins chenkins modified the milestones: 4.0.7, 4.0.6 Mar 7, 2025
@chenkins chenkins linked a pull request Mar 10, 2025 that will close this issue
7 tasks
@chenkins chenkins modified the milestones: 4.0.6, 4.0.8 Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant