Optional additional info in crafter observation #55
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.
Overview
The current Crafter observation system has two key limitations that impact agent performance:
np.unique(semantic)displays only one object of each type, making it difficult for models to plan effectively in environments with multiple similar objects (e.g., navigating mines surrounded by stones or combat with multiple enemies).Added more customization to the crafter language wrapper:
unique_items: Toggle between showing all objects vs. only the closest of each typeprecise_location: Choose between explicit directional format vs. diagonal descriptionsTrue: "1 step south and 4 steps west"False: "5 steps to your south-west"skip_items: Exclude specified items to reduce observation noise (common:["grass", "path", "sand"])edge_only_items: Display only edges of large uniform areas (common:["water", "lava"])Example language description
The new system can provide richer environmental context:
Instead of
Performance Impact
This change improves the performance of the best models. However some weaker models can become worse since this change increases the amount of data in the context.
Backward Compatibility
All changes are opt-in. The environment maintains legacy parameters as defaults, ensuring existing implementations continue to work without modification.