From 45bf1dff1dd4e6b61bc3090d54ec1d9e946a27c7 Mon Sep 17 00:00:00 2001 From: Tao HUANG <756058918@qq.com> Date: Thu, 24 Feb 2022 23:53:57 +0800 Subject: [PATCH 1/2] Fix bug of __getitem__() in ExtendedTimeStep --- .DS_Store | Bin 0 -> 6148 bytes dmc.py | 11 ++++++----- 2 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5b5a721bd8069d0c1ed825886cb1e76d7fe41cd5 GIT binary patch literal 6148 zcmeHKJx>Bb5Pgehf>DzzE$&>29$w+#ej*jcGl#U{A^v?oXpyU+M$X_ nUg>aA!i62h%#~5RN3}wKA`4>bv2;ieMgIs`8q_EQzskTH5aN5s literal 0 HcmV?d00001 diff --git a/dmc.py b/dmc.py index 3b3c422..094030b 100644 --- a/dmc.py +++ b/dmc.py @@ -11,11 +11,12 @@ class ExtendedTimeStep(NamedTuple): - step_type: Any - reward: Any - discount: Any - observation: Any - action: Any + def __init__(self, step_type, reward, discount, observation, action): + self.step_type = step_type + self.reward = reward + self.discount = discount + self.observation = observation + self.action = action def first(self): return self.step_type == StepType.FIRST From 3bb6fca587661310ac08a690e904d41adeaa5d99 Mon Sep 17 00:00:00 2001 From: Tao HUANG <59811234+TaoHuang13@users.noreply.github.com> Date: Thu, 24 Feb 2022 23:54:37 +0800 Subject: [PATCH 2/2] Delete .DS_Store --- .DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 5b5a721bd8069d0c1ed825886cb1e76d7fe41cd5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKJx>Bb5Pgehf>DzzE$&>29$w+#ej*jcGl#U{A^v?oXpyU+M$X_ nUg>aA!i62h%#~5RN3}wKA`4>bv2;ieMgIs`8q_EQzskTH5aN5s