Skip to content

Commit

Permalink
fixed some bugs
Browse files Browse the repository at this point in the history
mablue committed Jun 2, 2021
1 parent 99ed03b commit 7ff04b6
Showing 2 changed files with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
@@ -14,6 +14,8 @@ def __init__(self, ropes, stock):
self.ropes = ropes
self.size = 4
self.stock = stock
self.viewer = None

# init
# self.Monkey_pos = 0
# self.Monkey_last_pos = 0
@@ -27,7 +29,7 @@ def __init__(self, ropes, stock):
low=-np.inf,
high=np.inf,
shape=(1,),
dtype=reset)
dtype=np.float32)

def seed(self, seed=None):
self.np_random, seed = seeding.np_random(seed)
@@ -60,8 +62,7 @@ def step(self, action):

done = True if self.time == 100 else False
reward = 0.01 * self.Monkey_last_pos_price - self.Monkey_price
if done:
env.reset()

# Optionally we can pass additional info, we are not using that for now
info = {'time': self.time}

Binary file modified ppo_monkey.zip
Binary file not shown.

0 comments on commit 7ff04b6

Please sign in to comment.