Skip to content

Lava termination has no explicit negative reward in Craftax Classic #50

@Pabloo22

Description

@Pabloo22

Hi,

Thanks so much for the great repo!

I've been working with Craftax Classic and noticed a small quirk: stepping into lava terminates the episode immediately without applying an explicit negative reward. Since the immediate reward signal is neutral, death by lava is only indirectly discouraged by cutting off future returns.

For RL training, this abrupt termination without a direct penalty can be a weak deterrent, meaning agents might struggle to learn a strong local avoidance signal for lava.

Would you be open to a small fix for this? I think the simplest approach would be to just set the player's health to zero when they step into lava, right before the terminal check. This way, your existing health-delta logic will naturally catch the drop and apply the proper negative reward.

I’d be more than happy to open a PR for this if you agree with the approach!

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