From cbd4c7c5fa0b6a78b7f99dea20bc0665977be910 Mon Sep 17 00:00:00 2001 From: ottofabian Date: Fri, 28 Aug 2020 18:50:37 +0200 Subject: [PATCH] Update README.md --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3a4bdf9..8bf70fc 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,19 @@ cd alr_envs ```bash pip install -e . ``` -4. Use (see example.py): +4. Use (see [example.py](./example.py)): ```python +import gym + env = gym.make('alr_envs:SimpleReacher-v0') +state = env.reset() + +for i in range(10000): + state, reward, done, info = env.step(env.action_space.sample()) + if i % 5 == 0: + env.render() + + if done: + state = env.reset() + ```