DIAMBRA Arena Jupyter Notebook Example

DIAMBRA Arena module import

In [ ]:
import diambra.arena

Environment creation and reset

In [ ]:
env = diambra.arena.make("doapp")
observation = env.reset()

Agent-Environment interaction loop

In [ ]:
while True:
    env.render()

    actions = env.action_space.sample()

    observation, reward, done, info = env.step(actions)

    if done:
        observation = env.reset()
        break

Environment close

In [ ]:
env.close()