Skip to content

Conversation

@BartekCupial
Copy link
Collaborator

@BartekCupial BartekCupial commented Jun 13, 2025

Overview

The current Crafter observation system has two key limitations that impact agent performance:

  • Limited objects: 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).
  • Misleading directional descriptions: The current format (e.g., "Tree 5 steps north-east") causes LLMs to attempt invalid diagonal movements, as they think that "north-east" is a valid action.

Added more customization to the crafter language wrapper:

  • unique_items: Toggle between showing all objects vs. only the closest of each type
  • precise_location: Choose between explicit directional format vs. diagonal descriptions
    • True: "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:

- tree 1 step south and 4 steps west
- tree 3 steps west
- tree 2 steps south and 3 steps west
- tree 1 step south and 2 steps west
- table 3 steps north and 1 step west
- tree 1 step west
- tree 1 step south and 1 step west
- tree 2 steps south
- tree 2 steps south and 3 steps east
- tree 1 step south and 4 steps east

Instead of

- tree 1 step west
- grass 1 step east
- table 4 steps north-west

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.

@DavidePaglieri DavidePaglieri changed the title More information in crafter observation Optional additional info in crafter observation Jul 18, 2025
@BartekCupial BartekCupial merged commit 393505a into balrog-ai:main Aug 19, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants