Skip to content
Snippets Groups Projects
Commit 18d38f20 authored by cody_wild8's avatar cody_wild8
Browse files

Stop random agent from terminating too quickly

parent 68d20336
No related branches found
No related tags found
No related merge requests found
...@@ -74,9 +74,14 @@ class MineRLAgent(): ...@@ -74,9 +74,14 @@ class MineRLAgent():
# YOUR CODE GOES HERE # YOUR CODE GOES HERE
_ = single_episode_env.reset() _ = single_episode_env.reset()
done = False done = False
steps = 0
min_steps = 500
while not done: while not done:
random_act = single_episode_env.action_space.sample() random_act = single_episode_env.action_space.sample()
if steps < min_steps and random_act['equip'] == 'snowball':
random_act['equip'] = 'air'
single_episode_env.step(random_act) single_episode_env.step(random_act)
steps += 1
class MineRLBehavioralCloningAgent(MineRLAgent): class MineRLBehavioralCloningAgent(MineRLAgent):
def load_agent(self): def load_agent(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment