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

Add an xlogfile to the generation of the ttyrecs. #316

Merged
merged 1 commit into from
Apr 14, 2022
Merged

Conversation

cdmatters
Copy link
Contributor

An xlogfile is a logfile that gives details of the episodes that have
just passed (https://nethackwiki.com/wiki/Xlogfile). These were
previously being generated in the HACKDIR (temporary var dir). By
setting the SCOREPREFIX and touching the file, you can can change the
path that the file (always ending 'xlogfile') is generated.

NB: There is a lock based on fnctl on the logfile. To avoid multiple
nles in different trying to write to the same file (with the same savedir)
we prepend the process number, like ttyrecs. For writing to same savedir
within same process, an id should be added to both ttyrec and xlogfile.
This can be done in future (along with relabelling ttyrec to ttyrec2).

The log file records all COMPLETED episodes (in the NetHack sense),
since it derives from the features used to calculate top ten. In
standard usage it should lead to one row per episode, with all ttyrecs
from the same process in the same file. You can then find the ttyrec
corresponding to each row (start counting at 0th row).

@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 Apr 14, 2022
An xlogfile is a logfile that gives details of the episodes that have
just passed (https://nethackwiki.com/wiki/Xlogfile).  These were
previously being generated in the HACKDIR (temporary var dir). By
setting the SCOREPREFIX and touching the file, you can can change the
path that the file (always ending 'xlogfile') is generated.

NB: There is a lock based on fnctl on the logfile. To avoid multiple
nles in different trying to write to the same file (with the same savedir)
we prepend the process number, like ttyrecs. For writing to same savedir
within same process, an id should be added to both ttyrec and xlogfile.
This can be done in future (along with relabelling ttyrec to ttyrec2).

The log file records all COMPLETED episodes (in the NetHack sense),
since it derives from the features used to calculate top ten. In
standard usage it should lead to one row per episode, with all ttyrecs
from the same process in the same file. You can then find the ttyrec
corresponding to each row (start counting at 0th row).
@cdmatters
Copy link
Contributor Author

(Was review by heiner internally)

@cdmatters cdmatters requested a review from tscmoo April 14, 2022 16:06
@cdmatters cdmatters merged commit 9880831 into main Apr 14, 2022
@cdmatters cdmatters deleted the eric/xlogfile branch April 14, 2022 16:17
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