HPCC2025/human_action.py
2025-03-28 21:37:31 +08:00

22 lines
507 B
Python

# from env import PartitionMazeEnv
# from env_dis import PartitionMazeEnv
from env_partion import PartitionEnv
# env = PartitionMazeEnv()
env = PartitionEnv()
state = env.reset()
print('state:', state)
# action_series = [[0.67], [0], [0], [0], [0.7]]
# action_series = [0, 0, 3, 0, 10]
action_series = [[0.5], [0.5]]
for i in range(100):
action = action_series[i]
state, reward, done, info, _ = env.step(action)
print('state:', state)
print('reward:', reward)
if done:
break