|
| 1 | +action_pattern: ^<answer>(.*?)</answer>$ |
| 2 | +think_action_pattern: <think>(.*?)</think>\s*<answer>(.*?)</answer> |
| 3 | +user_prompt_no_think_format: <answer> [your answer] </answer> |
| 4 | +user_prompt_think_format: <think> [Your thoughts] </think> <answer> [your answer] </answer> |
| 5 | + |
| 6 | +max_tokens_per_step: 128 |
| 7 | +max_actions_per_traj: 10 |
| 8 | +default_history_length: 5 |
| 9 | + |
| 10 | +env_manager_cls: roll.pipeline.agentic.env_manager.step_env_manager.StepEnvManager |
| 11 | +custom_env: |
| 12 | + SimpleSokoban: |
| 13 | + env_type: sokoban |
| 14 | + max_tokens_per_step: ${max_tokens_per_step} |
| 15 | + user_prompt_format: ${user_prompt_no_think_format} |
| 16 | + env_manager_cls: ${env_manager_cls} |
| 17 | + use_thread_lock: true |
| 18 | + history_length: ${default_history_length} |
| 19 | + agent_system_template: ${agent_system_template} |
| 20 | + agent_template: ${agent_template} |
| 21 | + env_config: # keys should be a subset of SokobanConfig |
| 22 | + env_instruction: "You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets. When you are right next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer must be one of action in a turn, format is <answer>Right</answer>" |
| 23 | + action_pattern: ${action_pattern} |
| 24 | + max_steps: ${max_actions_per_traj} |
| 25 | + dim_x: 6 |
| 26 | + dim_y: 6 |
| 27 | + num_boxes: 1 |
| 28 | + LargerSokoban: |
| 29 | + env_type: sokoban |
| 30 | + max_tokens_per_step: ${max_tokens_per_step} |
| 31 | + user_prompt_format: ${user_prompt_no_think_format} |
| 32 | + env_manager_cls: roll.pipeline.agentic.env_manager.step_env_manager.StepEnvManager |
| 33 | + use_thread_lock: true |
| 34 | + history_length: ${default_history_length} |
| 35 | + agent_system_template: ${agent_system_template} |
| 36 | + agent_template: ${agent_template} |
| 37 | + env_config: |
| 38 | + env_instruction: "You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets. When you are right next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer must be one of action in a turn, format is <answer>Right</answer>" |
| 39 | + action_pattern: ${action_pattern} |
| 40 | + max_steps: ${max_actions_per_traj} |
| 41 | + dim_x: 8 |
| 42 | + dim_y: 8 |
| 43 | + num_boxes: 2 |
| 44 | + search_depth: 10 |
| 45 | + SokobanDifferentGridVocab: |
| 46 | + env_type: sokoban |
| 47 | + max_tokens_per_step: ${max_tokens_per_step} |
| 48 | + user_prompt_format: ${user_prompt_no_think_format} |
| 49 | + env_manager_cls: roll.pipeline.agentic.env_manager.step_env_manager.StepEnvManager |
| 50 | + use_thread_lock: true |
| 51 | + history_length: ${default_history_length} |
| 52 | + agent_system_template: ${agent_system_template} |
| 53 | + agent_template: ${agent_template} |
| 54 | + env_config: # keys should be a subset of SokobanConfig |
| 55 | + env_instruction: "You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets. When you are right next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer must be one of action in a turn, format is <answer>Right</answer>" |
| 56 | + action_pattern: ${action_pattern} |
| 57 | + max_steps: ${max_actions_per_traj} |
| 58 | + search_depth: 30 |
| 59 | + dim_x: 6 |
| 60 | + dim_y: 6 |
| 61 | + num_boxes: 1 |
| 62 | + grid_lookup: { 0: "W", 1: ".", 2: "G", 3: "C", 4: "B", 5: "A", 6: "@" } |
| 63 | + grid_vocab: { "W": "wall", ".": "empty", "G": "target", "C": "box on target", "B": "box", "A": "player", "@": "player on target" } |
| 64 | + FrozenLake: |
| 65 | + env_type: frozen_lake |
| 66 | + max_tokens_per_step: ${max_tokens_per_step} |
| 67 | + user_prompt_format: ${user_prompt_no_think_format} |
| 68 | + env_manager_cls: roll.pipeline.agentic.env_manager.step_env_manager.StepEnvManager |
| 69 | + use_thread_lock: true |
| 70 | + history_length: ${default_history_length} |
| 71 | + agent_system_template: ${agent_system_template} |
| 72 | + agent_template: ${agent_template} |
| 73 | + env_config: |
| 74 | + env_instruction: "You are solving the FrozenLake puzzle. Forbid the whole and go to the target. You may move to the unintended direction due to the slippery ice. The answer must be one of action in a turn, format is <answer>Right</answer>" |
| 75 | + action_pattern: ${action_pattern} |
| 76 | + max_steps: ${max_actions_per_traj} |
| 77 | + is_slippery: false |
| 78 | + FrozenLakeThink: |
| 79 | + env_type: frozen_lake |
| 80 | + max_tokens_per_step: ${max_tokens_per_step} |
| 81 | + user_prompt_format: ${user_prompt_think_format} |
| 82 | + env_manager_cls: roll.pipeline.agentic.env_manager.step_env_manager.StepEnvManager |
| 83 | + use_thread_lock: true |
| 84 | + history_length: ${default_history_length} |
| 85 | + agent_system_template: ${agent_system_template} |
| 86 | + agent_template: ${agent_template} |
| 87 | + env_config: |
| 88 | + env_instruction: "You are solving the FrozenLake puzzle. Forbid the whole and go to the target. You may move to the unintended direction due to the slippery ice. The answer must be one of action in a turn, format is <answer>Right</answer>" |
| 89 | + action_pattern: ${think_action_pattern} |
| 90 | + max_steps: ${max_actions_per_traj} |
| 91 | + is_slippery: false |
| 92 | + WebShopEnv: |
| 93 | + env_type: webshop |
| 94 | + max_tokens_per_step: ${max_tokens_per_step} |
| 95 | + user_prompt_format: ${user_prompt_no_think_format} |
| 96 | + env_manager_cls: ${env_manager_cls} |
| 97 | + use_thread_lock: true |
| 98 | + history_length: ${default_history_length} |
| 99 | + agent_system_template: ${agent_system_template} |
| 100 | + agent_template: ${agent_template} |
| 101 | + env_config: |
| 102 | + observation_mode: text |
| 103 | + max_steps: ${max_actions_per_traj} |
| 104 | + |
| 105 | +agent_system_template: | |
| 106 | + You're a helpful assistant. You are a good game player. You are aiming to get high reward in the game. |
| 107 | +
|
| 108 | +agent_template: | |
| 109 | + ## Env Instruction: {env_instruction} |
| 110 | + |
| 111 | + ## State Description: |
| 112 | + Prior to this step, you have completed {step_count} steps. |
| 113 | + Recent History: Below are the most recent {history_length} observations, the corresponding actions you took, and the environmental reward feedback: |
| 114 | + [{history}] |
| 115 | + |
| 116 | + Current State: |
| 117 | + You are currently at step {current_step}. Your current observation is: [{current_observation}] |
| 118 | + |
| 119 | + ## Output Format Requirement: |
| 120 | + Your response *must* strictly adhere to the following format: <answer> [your answer] </answer>, like <answer> [your answer] </answer>, with no extra text. |
| 121 | + Response Length Limit: Your output must not exceed {max_response_length} words (tokens). |
| 122 | + |
| 123 | + Determine the Next Action: |
0 commit comments