Skip to content

Commit

Permalink
refactor call for Gyx.Gym.Utils.gyx_space/1 #26¨
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricardo C committed Mar 1, 2019
1 parent 1a74f20 commit 2b3d62a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/Gym/environment.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defmodule Gyx.Gym.Environment do
"""
alias Gyx.Python.HelperAsync
alias Gyx.Core.{Env, Exp}
alias Gyx.Gym.Utils
import Gyx.Gym.Utils, only: [gyx_space: 1]
use Env
use GenServer
require Logger
Expand Down Expand Up @@ -65,7 +65,7 @@ defmodule Gyx.Gym.Environment do
env: env,
current_state: initial_state,
session: state.session,
action_space: Utils.gyx_space(action_space)
action_space: gyx_space(action_space)
}}
end

Expand Down
2 changes: 1 addition & 1 deletion lib/Gym/space_handler.ex
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ defmodule Gyx.Gym.Utils do
gym_space_string |> parse |> create_space
end

def parse(gym_space_string) do
defp parse(gym_space_string) do
{regex, type} =
Enum.find(@space_types, {nil, :unknown}, fn {regex, _} ->
Regex.match?(regex, Kernel.inspect(gym_space_string))
Expand Down

0 comments on commit 2b3d62a

Please sign in to comment.