这是indexloc提供的服务,不要输入任何密码
Skip to content

Setting seed, return_info, options for reset #605

@ultmaster

Description

@ultmaster
  • I have marked all applicable categories:
    • exception-raising bug
    • RL algorithm bug
    • documentation request (i.e. "X is missing from the documentation.")
    • new feature request
  • I have visited the source website
  • I have searched through the issue tracker for duplicates
  • I have mentioned version numbers, operating system and environment, where applicable:
    import tianshou, gym, torch, numpy, sys
    print(tianshou.__version__, gym.__version__, torch.__version__, numpy.__version__, sys.version, sys.platform)

Gym environment API supports seed, return_info, and options in reset:

https://github.com/openai/gym/blob/dcae553204957a75db5e4169e33547ccac599609/gym/core.py#L93

But I find the information lost in tianshou:

obs = env.reset()

self.result = self.env.reset() # type: ignore

Also the return type is Union[ObsType, tuple[ObsType, dict]] in gym, but only ObsType in tianshou.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementFeature that is not a new algorithm or an algorithm enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions