Skip to content

Commit

Permalink
Rename render_initialise to render_init
Browse files Browse the repository at this point in the history
  • Loading branch information
RedTachyon committed Dec 6, 2023
1 parent fc92b74 commit 729c2d4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gymnasium/envs/phys2d/cartpole.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def render_image(
np.array(pygame.surfarray.pixels3d(screen)), axes=(1, 0, 2)
)

def render_initialise(
def render_init(
self, screen_width: int = 600, screen_height: int = 400
) -> RenderStateType:
"""Initialises the render state for a screen width and height."""
Expand Down
2 changes: 1 addition & 1 deletion gymnasium/envs/phys2d/pendulum.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def render_image(
np.array(pygame.surfarray.pixels3d(screen)), axes=(1, 0, 2)
)

def render_initialise(
def render_init(
self,
screen_width: int = 600,
screen_height: int = 400,
Expand Down
2 changes: 1 addition & 1 deletion gymnasium/envs/tabular/blackjack.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ def reward(
reward = reward * jnp.logical_not(condition) + 1 * condition
return reward

def render_initialise(
def render_init(
self, screen_width: int = 600, screen_height: int = 500
) -> RenderStateType:
"""Returns an initial render state."""
Expand Down
2 changes: 1 addition & 1 deletion gymnasium/envs/tabular/cliffwalking.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def reward(
reward = -1 + (-99 * state.fallen[0])
return jax.lax.convert_element_type(reward, jnp.float32)

def render_initialise(
def render_init(
self, screen_width: int = 600, screen_height: int = 500
) -> RenderStateType:
"""Returns an initial render state."""
Expand Down
2 changes: 1 addition & 1 deletion gymnasium/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def render_image(
"""Show the state."""
raise NotImplementedError

def render_initialise(self, **kwargs) -> RenderStateType:
def render_init(self, **kwargs) -> RenderStateType:
"""Initialize the render state."""
raise NotImplementedError

Expand Down

0 comments on commit 729c2d4

Please sign in to comment.