Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Add condition mask to blstats observation. #219

Merged
merged 2 commits into from
Jul 20, 2021
Merged

Add condition mask to blstats observation. #219

merged 2 commits into from
Jul 20, 2021

Conversation

heiner
Copy link
Contributor

@heiner heiner commented Jul 19, 2021

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 19, 2021
@heiner
Copy link
Contributor Author

heiner commented Jul 19, 2021

As a bitset, this isn't exactly ML-friendly.

One way of using this:

is_slimed = bool(blstats[nethack.NLE_BL_CONDITION] & nethack.BL_MASK_SLIME)

@heiner heiner requested a review from cdmatters July 19, 2021 13:44
Copy link
Contributor

@cdmatters cdmatters left a comment

Choose a reason for hiding this comment

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

Looks all very straightforward and from a code elegance point of view I woould go with this solution, but it does mean that every single person (pretty much) will implement their own 'factorisation' themselves....

What are the best reasons for not just adding 13 items to the blstats vector?

@heiner
Copy link
Contributor Author

heiner commented Jul 19, 2021

Added constants for the blstats indices, PTAL.

I'd rather not add 13 more entries to blstats tbh.

Copy link
Contributor

@cdmatters cdmatters left a comment

Choose a reason for hiding this comment

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

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants