HPCC2025/human_action.py
2025-04-08 15:49:22 +08:00

25 lines
651 B
Python

# from env import PartitionMazeEnv
# from env_dis import PartitionMazeEnv
from env_partion_dist import PartitionEnv
# env = PartitionMazeEnv()
env = PartitionEnv()
state = env.reset()
print('state:', state)
# action_series = [[0.67], [0], [0], [0], [0.7]]
# action_series = [3, 3, 3, 5, 5, 1, 1, 1, 0, 0, 0]
# action_series = [1] * 30
# action_series = [[0.2], [0.4], [0.7], [0.5]]
# action_series = [[-0.08], [-0.08], [0], [0]]
action_series = list(range(11))
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