HPCC2025/human_action.py

15 lines
400 B
Python
Raw Normal View History

2025-03-14 09:42:56 +08:00
from env import PartitionMazeEnv
env = PartitionMazeEnv()
state = env.reset()
print(state)
2025-03-14 15:27:05 +08:00
action_series = [[0], [0.5], [0], [0.2], [0.4], [0.7], [0.3], [0.8], [0.5], [0.1], [0.7], [0.7], [0.9], [0.9], [0.1], [0.9], [0.9], [0.1]]
2025-03-14 09:42:56 +08:00
2025-03-14 15:27:05 +08:00
for i in range(100):
2025-03-14 09:42:56 +08:00
action = action_series[i]
state, reward, done, info, _ = env.step(action)
print(state, reward, done, info)
if done:
break