-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add back achievement logging that was accidentally deleted
- Loading branch information
1 parent
fbe4b50
commit e1f21bc
Showing
3 changed files
with
21 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from craftax.craftax.craftax_state import EnvState | ||
from craftax.craftax.constants import * | ||
|
||
|
||
def log_achievements_to_info(state: EnvState, done: bool): | ||
achievements = state.achievements * done * 100.0 | ||
info = {} | ||
for achievement in Achievement: | ||
name = f"Achievements/{achievement.name.lower()}" | ||
info[name] = achievements[achievement.value] | ||
return info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters