Closed pdeubel closed 3 years ago
The resulting parsed inputs then get flattened and concatenated so that the Brain will become a one-dimensional NumPy Array
this probably breaks CNN-brains. Currently my implementation of CNN-Brains works very badly anyways, so we may just drop them.
Solves #13. Unfortunately I also did some work on #47 which is already in this PR: #49. So this PR stays a draft until #49 is merged then I will resolve the conflicts.
TODO here:
This PR does the following:
parse_brain_input_output()
method that takes either an input for the brain (i.e. observation from an environment) or an output from the brain and parses it into a suited format, depending on the target Space.parse_brain_input_output()
is called recursively. The resulting parsed inputs then get flattened and concatenated so that the Brain will become a one-dimensional NumPy Array. If a brain output is parsed the output will be reshaped to match the Tuple output space, i.e. the subspaces of the Tuple have certain dimensions and a tuple is created where its entries will correspond to these dimensions.