Skip to content

Determine data class repr sizes programatically#5

Open
Wheest wants to merge 7 commits intoluchris429:mainfrom
Wheest:pez/dryObs
Open

Determine data class repr sizes programatically#5
Wheest wants to merge 7 commits intoluchris429:mainfrom
Wheest:pez/dryObs

Conversation

@Wheest
Copy link

@Wheest Wheest commented Apr 8, 2025

Note, this PR builds off of #4, so the diff will be way smaller if that is merged.

The reason for this feature is that in a few places the representation size of things like the number of actions and the terrain is hard-coded. This violates DRY principles, since if we, for example, add a new action, then we need to update this in a few places.

This PR fixes this by adding a property to the TerrainState and Action dataclasses that returns the repr_size.

There may be other places where this can be applied, but so far I'm only touching things exposed by my own modifications.

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.

1 participant