Skip to content
Snippets Groups Projects

refactor tree data structure and add unit test for the normalization of the features

2 unresolved threads
16 files
+ 37622
64
Compare changes
  • Side-by-side
  • Inline
Files
16
import numpy as np
import numpy as np
from utils.observation_utils import split_tree, min_gt
from utils.observation_utils import split_tree_into_feature_groups, min_gt
class OrderedAgent:
class OrderedAgent:
@@ -12,8 +12,7 @@ class OrderedAgent:
@@ -12,8 +12,7 @@ class OrderedAgent:
:param state: input is the observation of the agent
:param state: input is the observation of the agent
:return: returns an action
:return: returns an action
"""
"""
_, distance, _ = split_tree(tree=np.array(state), num_features_per_node=11,
_, distance, _ = split_tree_into_feature_groups(state, 1)
current_depth=0)
distance = distance[1:]
distance = distance[1:]
min_dist = min_gt(distance, 0)
min_dist = min_gt(distance, 0)
min_direction = np.where(distance == min_dist)
min_direction = np.where(distance == min_dist)
Loading