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

Add multi-episode wrapper for AEC and parallel envs #1105

Merged
merged 17 commits into from
Sep 27, 2023

Conversation

jjshoots
Copy link
Member

@jjshoots jjshoots commented Sep 20, 2023

Description

Requested by @elliottower. This basically allows the wrapping of either an AEC or Parallel env into an environment which runs for multiple episodes before truncating.

When there are no more valid agents in the underlying environment, the environment is automatically reset.
When this happens, the observation and info returned by step() are replaced with that of the reset environment.
The result of this wrapper is that the environment is no longer Markovian around the environment reset.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Checklist:

  • I have run the pre-commit checks with pre-commit run --all-files (see CONTRIBUTING.md instructions to set it up)
  • I have run pytest -v and no errors are present.
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I solved any possible warnings that pytest -v has generated that are related to my code to the best of my knowledge.
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Copy link
Member

@elliottower elliottower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good upon first glance will have to go through again in more detail later though

@elliottower
Copy link
Member

Going to merge this as it’s a helpful utility on its own, though we are going to try to make a poker change that lets the chips persist for multiple hands which is an alternative to this.

@elliottower elliottower merged commit e907e05 into Farama-Foundation:master Sep 27, 2023
47 checks passed
@jjshoots jjshoots mentioned this pull request Sep 28, 2023
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants