Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make number of states dynamic #2

Open
aileen-reichelt opened this issue Mar 8, 2022 · 2 comments
Open

Make number of states dynamic #2

aileen-reichelt opened this issue Mar 8, 2022 · 2 comments
Labels
q-learning Issues related to our q-learning agent. question Further information is requested

Comments

@aileen-reichelt
Copy link
Collaborator

In the current coli-agent/callbacks.py (PR #1), there's a TODO in the agent's setup() function to make the number of states, on which the size of the q-table depends, dynamic. One way to do this could be to pass a generic "example" game state dict to state_to_features() and see how long the returned np.array is. This dict could perhaps be stored outside of callbacks.py (don't know where exactly) so that in can also be accessed in tests. Does that seem like a good solution? Or did you already have something in mind @ivo-1? The only potential problem I see with this approach is that, depending on how complicated state_to_features() ends up being, it could take extra time.

@aileen-reichelt aileen-reichelt added question Further information is requested q-learning Issues related to our q-learning agent. labels Mar 8, 2022
@ivo-1
Copy link
Owner

ivo-1 commented Mar 8, 2022

Maybe we can just pass the initial game state to see how long the returned array is. If state_to_features() takes that long that it's not viable, it's taking too long 😆

@aileen-reichelt
Copy link
Collaborator Author

We currently have a file of which the length == number of states

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
q-learning Issues related to our q-learning agent. question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants