toybox-rs / Toybox

The Machine Learning Toybox for testing the behavior of autonomous agents.
http://toybox.rs
27 stars 12 forks source link

How to get the value range of the state observation? #185

Open drmeerkat opened 3 years ago

drmeerkat commented 3 years ago

Hi guys,

I'm trying to normalize the state_to_json() outputs. For example, in the pong game, the function returns something like,

{'reset': False,
 'p1_score': 0,
 'p2_score': 0,
 'ball': {'position': {'x': 75.0, 'y': 117.0},
  'velocity': {'x': -3.0, 'y': 1.0}},
 'p1_paddle': {'position': {'x': 140.0, 'y': 96.5},
  'velocity': {'x': 0.0, 'y': 0.5}},
 'p2_paddle': {'position': {'x': 16.0, 'y': 114.0},
  'velocity': {'x': 0.0, 'y': 0.0}}}

Is there a way to know the max/min value of each attribute?

Thank you!