Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

How to understand the code in realtime-evolution-strategy? #109

Open
ppalantir opened this issue Jul 1, 2021 · 0 comments
Open

How to understand the code in realtime-evolution-strategy? #109

ppalantir opened this issue Jul 1, 2021 · 0 comments

Comments

@ppalantir
Copy link

def get_state(parameters, t, window_size = 20): outside = [] d = t - window_size + 1 for parameter in parameters: block = ( parameter[d : t + 1] if d >= 0 else -d * [parameter[0]] + parameter[0 : t + 1] ) res = [] for i in range(window_size - 1): res.append(block[i + 1] - block[i]) for i in range(1, window_size, 1): res.append(block[i] - block[0]) outside.append(res) return np.array(outside).reshape((1, -1))

my question is why define state as this format?
is there any reference for helping understanding this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant