Skip to content

Commit

Permalink
fix structural generation bug and slow down rendering.
Browse files Browse the repository at this point in the history
  • Loading branch information
wenkesj committed Jun 12, 2019
1 parent e23e79c commit e60825d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions gym_tool_use/transfers.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def structural_color_transfer(colors, np_random):
"""
# Force the colors to be random and unique.
color_keys = trap_tube_env.SYMBOLIC_OBJECTS + [trap_tube_env.GROUND]
color_keys.pop(color_keys.index(trap_tube_env.TUBE2))
color_values = []
exclude_color_values = [
trap_tube_env.AGENT_COLOR, trap_tube_env.FOOD_COLOR]
Expand All @@ -89,6 +90,7 @@ def structural_color_transfer(colors, np_random):
color_values.append(value)

new_colors = dict(zip(color_keys, color_values))
new_colors[trap_tube_env.TUBE2] = new_colors[trap_tube_env.TUBE1]
colors.update(new_colors)
return colors

Expand Down
2 changes: 1 addition & 1 deletion gym_tool_use/trap_tube_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ class BaseTrapTubeEnv(gym_pycolab.PyColabEnv):

def __init__(self,
max_iterations=50,
delay=100,
delay=250,
resize_scale=32,
default_reward=0.):
super(BaseTrapTubeEnv, self).__init__(
Expand Down

0 comments on commit e60825d

Please sign in to comment.