We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4dac217 commit 979795bCopy full SHA for 979795b
python/ml/raylib/environment.py
@@ -240,9 +240,11 @@ def print_probs(self, model):
240
241
best_actions = [pair for pair in zip(action_probs[0].tolist(), self.actions, range(self.num_actions))]
242
best_actions.sort(key=lambda pair: -pair[0])
243
+ i = 0
244
for prob, action, id in best_actions:
245
if prob != 0:
- print(self.action_to_string(action), "{:0.4f} %".format(prob * 100))
246
+ print(f"{i}: "+self.action_to_string(action), "{:0.4f} %".format(prob * 100))
247
+ i = i + 1
248
return best_actions[0][2]
249
250
def as_byte_vector(self):
0 commit comments