Skip to content

experience_replay_interface.py: terminal_actions defined as int, but de-facto float #83

@Wuodan

Description

@Wuodan

There is a bit of inconsistency in class Experience in experience_replay/experience_replay_interface.py.
terminal_actions is defined as int, the documentation says it's int or math.inf (float). And in the code it's only filed by buffer_management.py with this line:
terminal_actions = float((n_frames - 1) - i) if "race_time" in rollout_results else math.inf

So de-facto terminal_actions is always float, not just when it's math.inf.

I tried replacing replacing float()' with inf()` and math.inf with sys.maxsize and got some error like "int cannot be converted to C long" or "int to large for C long". Other easy workarounds also failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions