Tianshou/tianshou/env/__init__.py
youkaichao a9f9940d17
code refactor for venv (#179)
- Refacor code to remove duplicate code

- Enable async simulation for all vector envs

- Remove `collector.close` and rename `VectorEnv` to `DummyVectorEnv`

The abstraction of vector env changed.

Prior to this pr, each vector env is almost independent.

After this pr, each env is wrapped into a worker, and vector envs differ with their worker type. In fact, users can just use `BaseVectorEnv` with different workers, I keep `SubprocVectorEnv`, `ShmemVectorEnv` for backward compatibility.

Co-authored-by: n+e <463003665@qq.com>
Co-authored-by: magicly <magicly007@gmail.com>
2020-08-19 15:00:24 +08:00

14 lines
366 B
Python

from tianshou.env.venvs import BaseVectorEnv, DummyVectorEnv, VectorEnv, \
SubprocVectorEnv, ShmemVectorEnv, RayVectorEnv
from tianshou.env.maenv import MultiAgentEnv
__all__ = [
'BaseVectorEnv',
'DummyVectorEnv',
'VectorEnv', # TODO: remove in later version
'SubprocVectorEnv',
'ShmemVectorEnv',
'RayVectorEnv',
'MultiAgentEnv',
]