Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
465 changes: 465 additions & 0 deletions resources_servers/wordle/app.py

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions resources_servers/wordle/configs/wordle.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
wordle:
resources_servers:
wordle:
entrypoint: app.py
domain: games
verified: false
description: Wordle word-guessing game environment for training LLMs
value: Improve strategic reasoning and letter pattern recognition

wordle_simple_agent:
responses_api_agents:
simple_agent:
entrypoint: app.py
resources_server:
type: resources_servers
name: wordle
model_server:
type: responses_api_models
name: policy_model
datasets:
- name: train
type: train
jsonl_fpath: resources_servers/wordle/data/train.jsonl
license: Apache 2.0
- name: validation
type: validation
jsonl_fpath: resources_servers/wordle/data/validation.jsonl
license: Apache 2.0
- name: example
type: example
jsonl_fpath: resources_servers/wordle/data/example.jsonl
license: Apache 2.0
max_steps: 18 # 6 turns × 3 tool calls max per turn
5 changes: 5 additions & 0 deletions resources_servers/wordle/data/example.jsonl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{"responses_create_params": {"input": [{"role": "system", "content": "/no_think\nYou are playing Wordle, a word-guessing game. Your goal is to guess a secret 5-letter word in 6 attempts or fewer.\n\nAfter each guess, you'll receive feedback:\n- G (Green): Letter is correct and in the right position\n- Y (Yellow): Letter is in the word but in the wrong position\n- _ (Gray): Letter is not in the word\n\nStrategy tips:\n- Start with words containing common letters (E, A, R, T, O, I, N, S)\n- Use the feedback to narrow down possibilities\n- Never repeat a guess\n- Place confirmed green letters in their positions\n- Include yellow letters in different positions\n- Avoid gray (eliminated) letters\n\nIMPORTANT: Always respond with a tool call. Never reply with plain text. After receiving feedback, immediately make your next move by calling a tool."}, {"role": "user", "content": "Let's play Wordle! Guess the secret 5-letter word."}], "tools": [{"type": "function", "name": "submit_guess", "description": "Submit a 5-letter word guess. Returns feedback for each letter: G (green) = correct position, Y (yellow) = wrong position but in word, _ (gray) = not in word.", "parameters": {"type": "object", "properties": {"guess": {"type": "string", "description": "A 5-letter English word to guess"}}, "required": ["guess"], "additionalProperties": false}, "strict": true}, {"type": "function", "name": "check_word_validity", "description": "Check if a word is valid before guessing. This is optional and informational only - it won't affect your game.", "parameters": {"type": "object", "properties": {"word": {"type": "string", "description": "A word to check for validity"}}, "required": ["word"], "additionalProperties": false}, "strict": true}, {"type": "function", "name": "get_game_state", "description": "Get the current game state including guesses made, feedback received, and accumulated knowledge about the target word.", "parameters": {"type": "object", "properties": {}, "required": [], "additionalProperties": false}, "strict": true}], "parallel_tool_calls": false, "temperature": 1.0}, "word_length": 5, "max_turns": 6, "agent_ref": {"type": "responses_api_agents", "name": "wordle_simple_agent"}, "custom_target": "stein"}
{"responses_create_params": {"input": [{"role": "system", "content": "/no_think\nYou are playing Wordle, a word-guessing game. Your goal is to guess a secret 5-letter word in 6 attempts or fewer.\n\nAfter each guess, you'll receive feedback:\n- G (Green): Letter is correct and in the right position\n- Y (Yellow): Letter is in the word but in the wrong position\n- _ (Gray): Letter is not in the word\n\nStrategy tips:\n- Start with words containing common letters (E, A, R, T, O, I, N, S)\n- Use the feedback to narrow down possibilities\n- Never repeat a guess\n- Place confirmed green letters in their positions\n- Include yellow letters in different positions\n- Avoid gray (eliminated) letters\n\nIMPORTANT: Always respond with a tool call. Never reply with plain text. After receiving feedback, immediately make your next move by calling a tool."}, {"role": "user", "content": "Time to play Wordle! Can you guess the mystery word in 6 tries or less?"}], "tools": [{"type": "function", "name": "submit_guess", "description": "Submit a 5-letter word guess. Returns feedback for each letter: G (green) = correct position, Y (yellow) = wrong position but in word, _ (gray) = not in word.", "parameters": {"type": "object", "properties": {"guess": {"type": "string", "description": "A 5-letter English word to guess"}}, "required": ["guess"], "additionalProperties": false}, "strict": true}, {"type": "function", "name": "check_word_validity", "description": "Check if a word is valid before guessing. This is optional and informational only - it won't affect your game.", "parameters": {"type": "object", "properties": {"word": {"type": "string", "description": "A word to check for validity"}}, "required": ["word"], "additionalProperties": false}, "strict": true}, {"type": "function", "name": "get_game_state", "description": "Get the current game state including guesses made, feedback received, and accumulated knowledge about the target word.", "parameters": {"type": "object", "properties": {}, "required": [], "additionalProperties": false}, "strict": true}], "parallel_tool_calls": false, "temperature": 1.0}, "word_length": 5, "max_turns": 6, "agent_ref": {"type": "responses_api_agents", "name": "wordle_simple_agent"}, "custom_target": "bleak"}
{"responses_create_params": {"input": [{"role": "system", "content": "/no_think\nYou are playing Wordle, a word-guessing game. Your goal is to guess a secret 5-letter word in 6 attempts or fewer.\n\nAfter each guess, you'll receive feedback:\n- G (Green): Letter is correct and in the right position\n- Y (Yellow): Letter is in the word but in the wrong position\n- _ (Gray): Letter is not in the word\n\nStrategy tips:\n- Start with words containing common letters (E, A, R, T, O, I, N, S)\n- Use the feedback to narrow down possibilities\n- Never repeat a guess\n- Place confirmed green letters in their positions\n- Include yellow letters in different positions\n- Avoid gray (eliminated) letters\n\nIMPORTANT: Always respond with a tool call. Never reply with plain text. After receiving feedback, immediately make your next move by calling a tool."}, {"role": "user", "content": "I'm thinking of a 5-letter word. Use your best strategy to guess it!"}], "tools": [{"type": "function", "name": "submit_guess", "description": "Submit a 5-letter word guess. Returns feedback for each letter: G (green) = correct position, Y (yellow) = wrong position but in word, _ (gray) = not in word.", "parameters": {"type": "object", "properties": {"guess": {"type": "string", "description": "A 5-letter English word to guess"}}, "required": ["guess"], "additionalProperties": false}, "strict": true}, {"type": "function", "name": "check_word_validity", "description": "Check if a word is valid before guessing. This is optional and informational only - it won't affect your game.", "parameters": {"type": "object", "properties": {"word": {"type": "string", "description": "A word to check for validity"}}, "required": ["word"], "additionalProperties": false}, "strict": true}, {"type": "function", "name": "get_game_state", "description": "Get the current game state including guesses made, feedback received, and accumulated knowledge about the target word.", "parameters": {"type": "object", "properties": {}, "required": [], "additionalProperties": false}, "strict": true}], "parallel_tool_calls": false, "temperature": 1.0}, "word_length": 5, "max_turns": 6, "agent_ref": {"type": "responses_api_agents", "name": "wordle_simple_agent"}, "custom_target": "owing"}
{"responses_create_params": {"input": [{"role": "system", "content": "/no_think\nYou are playing Wordle, a word-guessing game. Your goal is to guess a secret 5-letter word in 6 attempts or fewer.\n\nAfter each guess, you'll receive feedback:\n- G (Green): Letter is correct and in the right position\n- Y (Yellow): Letter is in the word but in the wrong position\n- _ (Gray): Letter is not in the word\n\nStrategy tips:\n- Start with words containing common letters (E, A, R, T, O, I, N, S)\n- Use the feedback to narrow down possibilities\n- Never repeat a guess\n- Place confirmed green letters in their positions\n- Include yellow letters in different positions\n- Avoid gray (eliminated) letters\n\nIMPORTANT: Always respond with a tool call. Never reply with plain text. After receiving feedback, immediately make your next move by calling a tool."}, {"role": "user", "content": "Wordle time! Start guessing - you have 6 attempts."}], "tools": [{"type": "function", "name": "submit_guess", "description": "Submit a 5-letter word guess. Returns feedback for each letter: G (green) = correct position, Y (yellow) = wrong position but in word, _ (gray) = not in word.", "parameters": {"type": "object", "properties": {"guess": {"type": "string", "description": "A 5-letter English word to guess"}}, "required": ["guess"], "additionalProperties": false}, "strict": true}, {"type": "function", "name": "check_word_validity", "description": "Check if a word is valid before guessing. This is optional and informational only - it won't affect your game.", "parameters": {"type": "object", "properties": {"word": {"type": "string", "description": "A word to check for validity"}}, "required": ["word"], "additionalProperties": false}, "strict": true}, {"type": "function", "name": "get_game_state", "description": "Get the current game state including guesses made, feedback received, and accumulated knowledge about the target word.", "parameters": {"type": "object", "properties": {}, "required": [], "additionalProperties": false}, "strict": true}], "parallel_tool_calls": false, "temperature": 1.0}, "word_length": 5, "max_turns": 6, "agent_ref": {"type": "responses_api_agents", "name": "wordle_simple_agent"}, "custom_target": "stare"}
{"responses_create_params": {"input": [{"role": "system", "content": "/no_think\nYou are playing Wordle, a word-guessing game. Your goal is to guess a secret 5-letter word in 6 attempts or fewer.\n\nAfter each guess, you'll receive feedback:\n- G (Green): Letter is correct and in the right position\n- Y (Yellow): Letter is in the word but in the wrong position\n- _ (Gray): Letter is not in the word\n\nStrategy tips:\n- Start with words containing common letters (E, A, R, T, O, I, N, S)\n- Use the feedback to narrow down possibilities\n- Never repeat a guess\n- Place confirmed green letters in their positions\n- Include yellow letters in different positions\n- Avoid gray (eliminated) letters\n\nIMPORTANT: Always respond with a tool call. Never reply with plain text. After receiving feedback, immediately make your next move by calling a tool."}, {"role": "user", "content": "Let's see how quickly you can solve this Wordle puzzle!"}], "tools": [{"type": "function", "name": "submit_guess", "description": "Submit a 5-letter word guess. Returns feedback for each letter: G (green) = correct position, Y (yellow) = wrong position but in word, _ (gray) = not in word.", "parameters": {"type": "object", "properties": {"guess": {"type": "string", "description": "A 5-letter English word to guess"}}, "required": ["guess"], "additionalProperties": false}, "strict": true}, {"type": "function", "name": "check_word_validity", "description": "Check if a word is valid before guessing. This is optional and informational only - it won't affect your game.", "parameters": {"type": "object", "properties": {"word": {"type": "string", "description": "A word to check for validity"}}, "required": ["word"], "additionalProperties": false}, "strict": true}, {"type": "function", "name": "get_game_state", "description": "Get the current game state including guesses made, feedback received, and accumulated knowledge about the target word.", "parameters": {"type": "object", "properties": {}, "required": [], "additionalProperties": false}, "strict": true}], "parallel_tool_calls": false, "temperature": 1.0}, "word_length": 5, "max_turns": 6, "agent_ref": {"type": "responses_api_agents", "name": "wordle_simple_agent"}, "custom_target": "dumpy"}
Loading