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

refactor: action to a subclass of ndarray for a clearer interface and consistent repr. #122

Merged
merged 1 commit into from
Dec 27, 2024

Conversation

anordin95
Copy link
Contributor

@anordin95 anordin95 commented Dec 27, 2024

Add a clearer interface for Action & ensure a consistent representation (i.e. it's always an np.array with 5 int8's, not sometimes a list with some bools and some ints, etc.).

Note: I went with np.int8 rather than np.uint8 since the game-logic subtracts from the (row, col) fields sometimes resulting in -1.

I also added a distinction between moves & actions and noted what it means in the docs.

@anordin95 anordin95 force-pushed the refactor-action branch 3 times, most recently from 99d5c4a to 2919f48 Compare December 27, 2024 00:30
Copy link
Owner

@strakam strakam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i like it ! :)

@strakam strakam merged commit ba73902 into strakam:master Dec 27, 2024
3 checks passed
@anordin95
Copy link
Contributor Author

i like it ! :)

right on!

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

Successfully merging this pull request may close these issues.

2 participants