# How does environment creation work? Specifically, why am I recognizing 2 environments when training?

**URL:** <https://discuss.ray.io/t/how-does-environment-creation-work-specifically-why-am-i-recognizing-2-environments-when-training/10013>\
**Category:** RLlib\
**Created:** [April 2, 2023, 5:39am UTC](https://discuss.ray.io/t/how-does-environment-creation-work-specifically-why-am-i-recognizing-2-environments-when-training/10013 "2023-04-02T05:39:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Randy-Hodges](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/randy-hodges/32/3320_2.png) [@Randy-Hodges](https://discuss.ray.io/u/Randy-Hodges)\
**Post date:** [April 2, 2023, 5:39am UTC](https://discuss.ray.io/t/how-does-environment-creation-work-specifically-why-am-i-recognizing-2-environments-when-training/10013/1 "2023-04-02T05:39:09Z")

</div>

For context, I am doing multiagent learning with a PPO config and with the number of agents varying during training. I am also just trying to understand rllib a little bit better. When I start training (I am training manually, without tune atm), I am able to see that there are two environments being created and that both environments are adding agents during training. Why are there two environments? Also, assuming my simulation takes up a lot of resources, how would I address resource use?
