mainly tidied up beerpong.py and beerpong_reward_staged.py

This commit is contained in:
Onur
2022-06-30 17:55:00 +02:00
parent fea2ae7d11
commit a7051cd8b7
6 changed files with 120 additions and 124 deletions
@@ -2,12 +2,12 @@ from typing import Tuple, Union
import numpy as np
from alr_envs.black_box.raw_interface_wrapper import RawInterfaceWrapper
from alr_envs.mp.raw_interface_wrapper import RawInterfaceWrapper
class MPWrapper(RawInterfaceWrapper):
def get_context_mask(self):
def context_mask(self):
return np.hstack([
[self.env.random_start] * self.env.n_links, # cos
[self.env.random_start] * self.env.n_links, # sin
@@ -25,3 +25,7 @@ class MPWrapper(RawInterfaceWrapper):
@property
def current_vel(self) -> Union[float, int, np.ndarray, Tuple]:
return self.env.current_vel
@property
def dt(self) -> Union[float, int]:
return self.env.dt