Skip to content

Impossible to implement a stateful environment - step uses an immutable reference to self #1

Description

@benjamincburns

Per the title, I'm attempting to implement a custom environment for Relearn, but I hit a major roadblock. All methods defined in the Environment trait specify an immutable reference to self. The environment that I'm working on is stateful, and I can't really change this, as the environment wraps a library that I don't control.

Ideally the initial_state would also allow mutation of self, but I can work around that if that's not to your liking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions