Commit b1e76401 authored by Erik Nygren's avatar Erik Nygren
Browse files

minor updates

parent 38423832
Pipeline #468 failed with stage
in 1 minute and 53 seconds
......@@ -342,8 +342,8 @@ class TreeObsForRailEnv(ObservationBuilder):
elif num_transitions == 0:
# Wrong cell type, but let's cover it and treat it as a dead-end, just in case
print("WRONG CELL TYPE detected in tree-search (0 transitions possible) at cell", position[0],
position[1], direction)
#print("WRONG CELL TYPE detected in tree-search (0 transitions possible) at cell", position[0],
# position[1], direction)
last_isTerminal = True
break
......
......@@ -1021,6 +1021,8 @@ class RailEnv(Environment):
nbits = 0
tmp = self.rail.get_transitions((pos[0], pos[1]))
print(np.sum(self.rail.get_transitions((pos[0], pos[1],direction))),self.rail.get_transitions((pos[0], pos[1],direction)),self.rail.get_transitions((pos[0], pos[1])),(pos[0], pos[1],direction))
while tmp > 0:
nbits += (tmp & 1)
tmp = tmp >> 1
......
......@@ -30,8 +30,8 @@ def checkFrozenImage(sFileImage):
if bytesFrozenImage is None:
bytesFrozenImage = bytesImage
else:
assert(bytesFrozenImage.shape == bytesImage.shape)
assert((np.sum(np.square(bytesFrozenImage - bytesImage)) / bytesFrozenImage.size) < 1e-3)
assert (bytesFrozenImage.shape == bytesImage.shape)
assert ((np.sum(np.square(bytesFrozenImage - bytesImage)) / bytesFrozenImage.size) < 1e-3)
def test_render_env():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment