Skip to content

Add anagram word puzzle environment#353

Open
Thomasyoung113 wants to merge 2 commits intoNousResearch:mainfrom
Thomasyoung113:add-anagram-environment
Open

Add anagram word puzzle environment#353
Thomasyoung113 wants to merge 2 commits intoNousResearch:mainfrom
Thomasyoung113:add-anagram-environment

Conversation

@Thomasyoung113
Copy link

Adds a new environment for training LLMs on anagram/word unscrambling tasks. This tests pattern recognition and vocabulary skills.

Features

  • Built-in word list with 100+ common English words of varying lengths (3-10+ characters)
  • Configurable word length range via min_word_length and max_word_length
  • Support for thinking mode with <think></think> tags
  • Automatic word scrambling with guarantee that scrambled version differs from original
  • Clean answer extraction with <answer></answer> tags
  • Comprehensive metrics tracking (success rate, format compliance, etc.)
  • WandB integration for visualization

Example

Given scrambled letters elppa, the model should respond with:

<think>Let me rearrange these letters... e, l, p, p, a... that's apple!</think>
<answer>apple</answer>

Configuration

Uses similar patterns to text_reversal_environment.py for consistency.

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.

1 participant