Skip to content
Snippets Groups Projects
Commit 13bb5d7b authored by Christoph Kowalski's avatar Christoph Kowalski
Browse files

Fixed minor representation issues

parent bb93cbab
No related branches found
No related tags found
2 merge requests!110V1.2.0 changes,!109SB3 RL with Hydra
Pipeline #61077 passed
......@@ -101,7 +101,6 @@ class AdvancedStateConverterInt(StateToObservationConverter):
for free_idx in grid_idxs:
grid[free_idx[0]][free_idx[1]].append(self.counter_list.index("Empty"))
grid[free_idx[0]][free_idx[1]].append(self.counter_list.index("Empty"))
return np.array(grid)
def vectorize_item(self, item, item_list):
......@@ -109,7 +108,7 @@ class AdvancedStateConverterInt(StateToObservationConverter):
item_name = "None"
elif isinstance(item, deque):
if len(item) > 0:
item = item[0]
item = item[-1]
item_name = item.name
else:
item = None
......@@ -126,7 +125,7 @@ class AdvancedStateConverterInt(StateToObservationConverter):
print("Ohohoho Percentage kann 100 werden ")
time.sleep(20)
return "Abort"
encoding += item.progress_percentage
encoding += int(item.progress_percentage *100)
encoding *= 100
else:
encoding *= 100
......@@ -141,7 +140,7 @@ class AdvancedStateConverterInt(StateToObservationConverter):
for item in containing_items:
encoding += item
encoding *= 100
return encoding / 100
return encoding
@staticmethod
def vectorize_counter(counter, counter_list):
......
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