Skip to content

Commit

Permalink
remove duplicated code in BitFlippingEnv (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
findmyway authored Jan 25, 2021
1 parent 6e43963 commit fd23dc4
Showing 1 changed file with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@ struct BitFlippingEnv <: AbstractEnv
goal_state::BitArray{1}
end

function BitFlippingEnv(; N = 8)
rng = Random.GLOBAL_RNG
state = bitrand(rng, N)
goal_state = bitrand(rng, N)
BitFlippingEnv(N, rng, state, goal_state)
end

function BitFlippingEnv(; N = 8, rng = Random.GLOBAL_RNG)
state = bitrand(rng, N)
goal_state = bitrand(rng, N)
Expand Down

0 comments on commit fd23dc4

Please sign in to comment.