Agents need interactive worlds for reinforcement learning; high-quality simulations replace costly real-world data collection.
Basic environment setup
import gymnasium as gym
env = gym.make("WebEnv-v0")
2. **Agent interaction loop**
```python
obs, _ = env.reset()
action = agent.act(obs)
next_obs, reward, terminated, truncated, info = env.step(action)