holy fuking shit
This commit is contained in:
+3
-4
@@ -4,7 +4,6 @@ RL 依赖属于可选组 [dependency-groups] rl;未安装 numpy/gymnasium 时
|
||||
全部跳过(运行闭环不依赖它们)。
|
||||
"""
|
||||
|
||||
import math
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
@@ -74,13 +73,13 @@ class TrainingEnvironmentTests(unittest.TestCase):
|
||||
self.assertIsInstance(reward, float)
|
||||
self.assertFalse(terminated and truncated)
|
||||
|
||||
def test_q4_directional_episode_reports_blocked_or_fallback(self):
|
||||
def test_q4_directional_reports_blocked_or_fallback(self):
|
||||
env = LocalizationEnv(problem=4, directional_probability=1.0)
|
||||
obs, info = env.reset(seed=7)
|
||||
_, info = env.reset(seed=7)
|
||||
self.assertTrue(info["source"]["directional"])
|
||||
terminated = truncated = False
|
||||
for _ in range(env.max_episode_steps + 2):
|
||||
obs, reward, terminated, truncated, info = env.step(
|
||||
_, _, terminated, truncated, info = env.step(
|
||||
env.action_space.sample())
|
||||
if terminated or truncated:
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user