Exemple #1
0
 def eat(self, i):
     self.env.step(mk_action("move", 0))
     self.env.step(mk_action("hotbar.{}".format(i), 1))
     self.env.step(mk_action("hotbar.{}".format(i), 0))
     self.env.step(mk_action("use", 1))
Exemple #2
0
 def wake(self):
     self.env.step(mk_action("use", 0))
     self.env.step(mk_action("hotbar.9", 1))
     self.env.step(mk_action("hotbar.9", 0))
Exemple #3
0
 def __init__(self, env, action_space, p_goal, n_goal):
     OpencogAgent.__init__(self, env, action_space, p_goal, n_goal)
     env.step(mk_action("hotbar.9", 1))  # Press the hotbar key
     env.step(
         mk_action("hotbar.9", 0)
     )  # Release hotbar key - agent should now be holding diamond_pickaxe