Commit f6ef8e88 authored by Jayant Khatkar's avatar Jayant Khatkar

bugfix int/float mixup

parent cbae0a49
......@@ -31,7 +31,7 @@ class ActionDistribution:
# Normalise
if sum(q)==0:
self.q = [1/len(q)] * len(q)
self.q = [1/float(len(q))] * len(q)
else:
self.q = (np.array(q).astype(float)/sum(q)).tolist()
......@@ -170,9 +170,8 @@ class Tree:
and second element is a dictionary of the other paths
"""
robot_state = self.graph.node[node_id]["state"]
system_state = {k:self.comms[k].random_action() for k in self.comms}
system_state[self.id] = robot_state
system_state[self.id] = self.graph.node[node_id]["state"]
return system_state
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment