File size: 464 Bytes
079c32c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import time
import gym
import gym_hybrid

if __name__ == '__main__':
    env = gym.make('Sliding-v0')
    env.reset()

    ACTION_SPACE = env.action_space[0].n
    PARAMETERS_SPACE = env.action_space[1].shape[0]
    OBSERVATION_SPACE = env.observation_space.shape[0]

    done = False
    while not done:
        state, reward, done, info = env.step(env.action_space.sample())
        print(f'State: {state} Reward: {reward} Done: {done}')
        time.sleep(0.1)