RLE-Foundation / rllte

Long-Term Evolution Project of Reinforcement Learning
https://docs.rllte.dev/
MIT License
453 stars 84 forks source link

[New Feature]: Integrating Envpool Environments #28

Open yuanmingqi opened 9 months ago

yuanmingqi commented 9 months ago

We are introducing the Envpool to improve the operational efficiency of built-in environments.

Env list:

yuanmingqi commented 9 months ago

Now we can use Envpool Atari environments in RLLTE. The code change can be found in PR#29

from rllte.env import make_envpool_atari_env
envs = make_envpool_atari_env(env_id='Breakout-v5', num_envs=8, device='cuda', seed=1, asynchronous=False)

Since the asynchronous mode achieved much lower training performance than the synchronous mode, we recommend using the synchronous mode currently.

yuanmingqi commented 9 months ago

Now we can use Envpool Procgen environments in RLLTE.

from rllte.env import make_envpool_procgen_env
envs = make_envpool_procgen_env(
                env_id=bigfish,
                num_envs=64,
                device='cuda',
                seed=1,
                gamma=0.99,
                num_levels=200,
                start_level=0,
                distribution_mode="easy",
                asynchronous=False
            )

Since the asynchronous mode achieved much lower training performance than the synchronous mode, we recommend using the synchronous mode currently.