Add Craftax moonshot environment#539
Closed
Infatoshi wants to merge 2 commits into
Closed
Conversation
Contributor
Author
|
Closing this version. Reworking the patch to update the existing craftax environment directly instead of adding craftax_moonshot side-by-side. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a side-by-side
craftax_moonshotimplementation for the 4.0 branch. This keeps the existing Craftax implementation intact while adding a CPU-oriented version with a smaller packed float observation path, reset-state caching, tiled stepping, and a per-buffer VecEnv rollout hook used only by environments that opt in.The
src/vecenv.hchange is intentionally narrow: default environments keep the existingc_steprollout loop, whilecraftax_moonshotdefinesMY_VEC_STEP_RANGEto avoid the scalar fallback during Puffer rollouts.Measured throughput
On a Ryzen 9 9950X3D + RTX PRO 6000 Blackwell workstation, pinned to the V-Cache cores:
Short-run dashboard measurement: about 4.0M training SPS with env around 47% of wall time.
Raw random-action env-only measurement on 4096 agents: about 16.8M env SPS.
Verification
Results:
Repo-wide pytest/ruff are currently blocked by pre-existing upstream dependency/lint issues unrelated to this PR.