messages
list
ground_truth
list
dataset
string
difficulty
string
id
string
problem_family
string
name
string
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective (output check)\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node and meets the puzzle's acceptance criteria\n- **Rejected**: Robot is routed to the NONE node, or caught in an infinite loop, or robot reaches the END node but fails to meet the puzzle's acceptance criteria \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted if they meet the puzzle criteria, otherwise rejected\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nReplace patterns RB with BB, then put 'BB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BBR'", "expected_accepted": true, "expected_output": "BBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'BB' β†’ output: 'BBBB'", "expected_accepted": true, "expected_output": "BBBB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'BBBBR'", "expected_accepted": true, "expected_output": "BBBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'BBR' β†’ output: 'BBBBR'", "expected_accepted": true, "expected_output": "BBBBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RBB' β†’ output: 'BBRBB'", "expected_accepted": true, "expected_output": "BBRBB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BBB'", "expected_accepted": true, "expected_output": "BBB", "input": "B" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BBB' β†’ output: 'BBBBB'", "expected_accepted": true, "expected_output": "BBBBB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'BBBR'", "expected_accepted": true, "expected_output": "BBBR", "input": "BR" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BBRR'", "expected_accepted": true, "expected_output": "BBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BBBB'", "expected_accepted": true, "expected_output": "BBBB", "input": "BB" }, { "check_output": true, "description": "Input 'BRRR' β†’ mutated: 'BRRR' β†’ output: 'BBBRRR'", "expected_accepted": true, "expected_output": "BBBRRR", "input": "BRRR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BBBBB'", "expected_accepted": true, "expected_output": "BBBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BBRRR'", "expected_accepted": true, "expected_output": "BBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BBBR' β†’ output: 'BBBBBR'", "expected_accepted": true, "expected_output": "BBBBBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'BBBB' β†’ output: 'BBBBBB'", "expected_accepted": true, "expected_output": "BBBBBB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RRRBBBRB' β†’ mutated: 'RRBBBBBB' β†’ output: 'BBRRBBBBBB'", "expected_accepted": true, "expected_output": "BBRRBBBBBB", "input": "RRRBBBRB" }, { "check_output": true, "description": "Input 'RBRRBBBBRBBR' β†’ mutated: 'BBRBBBBBBBBR' β†’ output: 'BBBBRBBBBBBBBR'", "expected_accepted": true, "expected_output": "BBBBRBBBBBBBBR", "input": "RBRRBBBBRBBR" } ]
manufactoria
hard
342539cf-c4a3-4e8e-855c-b3bc5832feea
prepend_sequence
Prepend BB after Replace patterns RB with BB
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective (output check)\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node and meets the puzzle's acceptance criteria\n- **Rejected**: Robot is routed to the NONE node, or caught in an infinite loop, or robot reaches the END node but fails to meet the puzzle's acceptance criteria \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted if they meet the puzzle criteria, otherwise rejected\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nRemove patterns RB, then put 'RR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RR'", "expected_accepted": true, "expected_output": "RR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RRR'", "expected_accepted": true, "expected_output": "RRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: '' β†’ output: 'RR'", "expected_accepted": true, "expected_output": "RR", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'RRBBR'", "expected_accepted": true, "expected_output": "RRBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'R' β†’ output: 'RRR'", "expected_accepted": true, "expected_output": "RRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'R' β†’ output: 'RRR'", "expected_accepted": true, "expected_output": "RRR", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RRRR'", "expected_accepted": true, "expected_output": "RRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'RRBR'", "expected_accepted": true, "expected_output": "RRBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'B' β†’ output: 'RRB'", "expected_accepted": true, "expected_output": "RRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RRBB'", "expected_accepted": true, "expected_output": "RRBB", "input": "BB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RRB'", "expected_accepted": true, "expected_output": "RRB", "input": "B" }, { "check_output": true, "description": "Input 'BBRB' β†’ mutated: 'BB' β†’ output: 'RRBB'", "expected_accepted": true, "expected_output": "RRBB", "input": "BBRB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'RRBBB'", "expected_accepted": true, "expected_output": "RRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RRRRR'", "expected_accepted": true, "expected_output": "RRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BR' β†’ output: 'RRBR'", "expected_accepted": true, "expected_output": "RRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: '' β†’ output: 'RR'", "expected_accepted": true, "expected_output": "RR", "input": "RBRB" }, { "check_output": true, "description": "Input 'RRBBBBRR' β†’ mutated: 'RBBBRR' β†’ output: 'RRRBBBRR'", "expected_accepted": true, "expected_output": "RRRBBBRR", "input": "RRBBBBRR" }, { "check_output": true, "description": "Input 'BBBBRBBBRBBR' β†’ mutated: 'BBBBBBBR' β†’ output: 'RRBBBBBBBR'", "expected_accepted": true, "expected_output": "RRBBBBBBBR", "input": "BBBBRBBBRBBR" } ]
manufactoria
hard
d1724967-5a2f-43c9-83cb-a938ff5a6a77
prepend_sequence
Prepend RR after Remove patterns RB
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective (output check)\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node and meets the puzzle's acceptance criteria\n- **Rejected**: Robot is routed to the NONE node, or caught in an infinite loop, or robot reaches the END node but fails to meet the puzzle's acceptance criteria \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted if they meet the puzzle criteria, otherwise rejected\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nReplace patterns RR with R, then put 'BB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BBR'", "expected_accepted": true, "expected_output": "BBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BBRB'", "expected_accepted": true, "expected_output": "BBRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'BBBBR'", "expected_accepted": true, "expected_output": "BBBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBR' β†’ output: 'BBRBR'", "expected_accepted": true, "expected_output": "BBRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RB' β†’ output: 'BBRB'", "expected_accepted": true, "expected_output": "BBRB", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'R' β†’ output: 'BBR'", "expected_accepted": true, "expected_output": "BBR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'BBBR'", "expected_accepted": true, "expected_output": "BBBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'BBBRB'", "expected_accepted": true, "expected_output": "BBBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BBBB'", "expected_accepted": true, "expected_output": "BBBB", "input": "BB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BBB'", "expected_accepted": true, "expected_output": "BBB", "input": "B" }, { "check_output": true, "description": "Input 'RRRR' β†’ mutated: 'RR' β†’ output: 'BBRR'", "expected_accepted": true, "expected_output": "BBRR", "input": "RRRR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BBBBB'", "expected_accepted": true, "expected_output": "BBBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RR' β†’ output: 'BBRR'", "expected_accepted": true, "expected_output": "BBRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'BBBRBR'", "expected_accepted": true, "expected_output": "BBBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'BBRBRB'", "expected_accepted": true, "expected_output": "BBRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBBRBRBR' β†’ mutated: 'BBBRBRBR' β†’ output: 'BBBBBRBRBR'", "expected_accepted": true, "expected_output": "BBBBBRBRBR", "input": "BBBRBRBR" }, { "check_output": true, "description": "Input 'RBBBBRRBBRRR' β†’ mutated: 'RBBBBRBBRR' β†’ output: 'BBRBBBBRBBRR'", "expected_accepted": true, "expected_output": "BBRBBBBRBBRR", "input": "RBBBBRRBBRRR" } ]
manufactoria
hard
2b32396f-9ba1-4e3b-9723-3940e4d2a1b2
prepend_sequence
Prepend BB after Replace patterns RR with R
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective (output check)\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node and meets the puzzle's acceptance criteria\n- **Rejected**: Robot is routed to the NONE node, or caught in an infinite loop, or robot reaches the END node but fails to meet the puzzle's acceptance criteria \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted if they meet the puzzle criteria, otherwise rejected\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nReplace patterns RB with RR, then put 'RBR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RBR'", "expected_accepted": true, "expected_output": "RBR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RBRR'", "expected_accepted": true, "expected_output": "RBRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RR' β†’ output: 'RBRRR'", "expected_accepted": true, "expected_output": "RBRRR", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'RBRBBR'", "expected_accepted": true, "expected_output": "RBRBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RRR' β†’ output: 'RBRRRR'", "expected_accepted": true, "expected_output": "RBRRRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRR' β†’ output: 'RBRRRR'", "expected_accepted": true, "expected_output": "RBRRRR", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RBRB'", "expected_accepted": true, "expected_output": "RBRB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RBRRR'", "expected_accepted": true, "expected_output": "RBRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'RBRBR'", "expected_accepted": true, "expected_output": "RBRBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRR' β†’ output: 'RBRBRR'", "expected_accepted": true, "expected_output": "RBRBRR", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RBRBB'", "expected_accepted": true, "expected_output": "RBRBB", "input": "BB" }, { "check_output": true, "description": "Input 'RRBR' β†’ mutated: 'RRRR' β†’ output: 'RBRRRRR'", "expected_accepted": true, "expected_output": "RBRRRRR", "input": "RRBR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'RBRBBB'", "expected_accepted": true, "expected_output": "RBRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RBRRRR'", "expected_accepted": true, "expected_output": "RBRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRRR' β†’ output: 'RBRBRRR'", "expected_accepted": true, "expected_output": "RBRBRRR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RRRR' β†’ output: 'RBRRRRR'", "expected_accepted": true, "expected_output": "RBRRRRR", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBBRRBRB' β†’ mutated: 'BBBRRRRR' β†’ output: 'RBRBBBRRRRR'", "expected_accepted": true, "expected_output": "RBRBBBRRRRR", "input": "BBBRRBRB" }, { "check_output": true, "description": "Input 'RBBBRBBBBRBB' β†’ mutated: 'RRBBRRBBBRRB' β†’ output: 'RBRRRBBRRBBBRRB'", "expected_accepted": true, "expected_output": "RBRRRBBRRBBBRRB", "input": "RBBBRBBBBRBB" } ]
manufactoria
hard
fd10261d-cccc-43e2-9239-ef26e380fe96
prepend_sequence
Prepend RBR after Replace patterns RB with RR
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective (output check)\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node and meets the puzzle's acceptance criteria\n- **Rejected**: Robot is routed to the NONE node, or caught in an infinite loop, or robot reaches the END node but fails to meet the puzzle's acceptance criteria \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted if they meet the puzzle criteria, otherwise rejected\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nReplace patterns RB with BR, then put 'BBBR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BBBR'", "expected_accepted": true, "expected_output": "BBBR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BBBRR'", "expected_accepted": true, "expected_output": "BBBRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'BR' β†’ output: 'BBBRBR'", "expected_accepted": true, "expected_output": "BBBRBR", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'BBBRBBR'", "expected_accepted": true, "expected_output": "BBBRBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'BRR' β†’ output: 'BBBRBRR'", "expected_accepted": true, "expected_output": "BBBRBRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RBR' β†’ output: 'BBBRRBR'", "expected_accepted": true, "expected_output": "BBBRRBR", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BBBRB'", "expected_accepted": true, "expected_output": "BBBRB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BBBRRR'", "expected_accepted": true, "expected_output": "BBBRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'BBBRBR'", "expected_accepted": true, "expected_output": "BBBRBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BBR' β†’ output: 'BBBRBBR'", "expected_accepted": true, "expected_output": "BBBRBBR", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BBBRBB'", "expected_accepted": true, "expected_output": "BBBRBB", "input": "BB" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BBRR' β†’ output: 'BBBRBBRR'", "expected_accepted": true, "expected_output": "BBBRBBRR", "input": "BRBR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BBBRBBB'", "expected_accepted": true, "expected_output": "BBBRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BBBRRRR'", "expected_accepted": true, "expected_output": "BBBRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'BRBR' β†’ output: 'BBBRBRBR'", "expected_accepted": true, "expected_output": "BBBRBRBR", "input": "RBRB" }, { "check_output": true, "description": "Input 'RRBBRBBB' β†’ mutated: 'RBRBBRBB' β†’ output: 'BBBRRBRBBRBB'", "expected_accepted": true, "expected_output": "BBBRRBRBBRBB", "input": "RRBBRBBB" }, { "check_output": true, "description": "Input 'BBRRBRRBBBRR' β†’ mutated: 'BBRBRRBRBBRR' β†’ output: 'BBBRBBRBRRBRBBRR'", "expected_accepted": true, "expected_output": "BBBRBBRBRRBRBBRR", "input": "BBRRBRRBBBRR" } ]
manufactoria
hard
d3a216c5-e8c0-4d02-b040-78d921c033b0
prepend_sequence
Prepend BBBR after Replace patterns RB with BR
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective (output check)\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node and meets the puzzle's acceptance criteria\n- **Rejected**: Robot is routed to the NONE node, or caught in an infinite loop, or robot reaches the END node but fails to meet the puzzle's acceptance criteria \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted if they meet the puzzle criteria, otherwise rejected\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nReplace patterns BB with RB, then put 'BRBB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BRBB'", "expected_accepted": true, "expected_output": "BRBB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BRBBR'", "expected_accepted": true, "expected_output": "BRBBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BRBBRB'", "expected_accepted": true, "expected_output": "BRBBRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'RBR' β†’ output: 'BRBBRBR'", "expected_accepted": true, "expected_output": "BRBBRBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBR' β†’ output: 'BRBBRBR'", "expected_accepted": true, "expected_output": "BRBBRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'BRBBRRB'", "expected_accepted": true, "expected_output": "BRBBRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BRBBB'", "expected_accepted": true, "expected_output": "BRBBB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BRBBRR'", "expected_accepted": true, "expected_output": "BRBBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'BRBBBR'", "expected_accepted": true, "expected_output": "BRBBBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'BRBBBRB'", "expected_accepted": true, "expected_output": "BRBBBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'RB' β†’ output: 'BRBBRB'", "expected_accepted": true, "expected_output": "BRBBRB", "input": "BB" }, { "check_output": true, "description": "Input 'RRRB' β†’ mutated: 'RRRB' β†’ output: 'BRBBRRRB'", "expected_accepted": true, "expected_output": "BRBBRRRB", "input": "RRRB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'RBB' β†’ output: 'BRBBRBB'", "expected_accepted": true, "expected_output": "BRBBRBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BRBBRRR'", "expected_accepted": true, "expected_output": "BRBBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'BRBBBRBR'", "expected_accepted": true, "expected_output": "BRBBBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'BRBBRBRB'", "expected_accepted": true, "expected_output": "BRBBRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RBBRBRRB' β†’ mutated: 'RRBRBRRB' β†’ output: 'BRBBRRBRBRRB'", "expected_accepted": true, "expected_output": "BRBBRRBRBRRB", "input": "RBBRBRRB" }, { "check_output": true, "description": "Input 'RBBRBRBRBRBR' β†’ mutated: 'RRBRBRBRBRBR' β†’ output: 'BRBBRRBRBRBRBRBR'", "expected_accepted": true, "expected_output": "BRBBRRBRBRBRBRBR", "input": "RBBRBRBRBRBR" } ]
manufactoria
hard
cd60fdcd-f94a-43fc-83c4-c6ae96f71818
prepend_sequence
Prepend BRBB after Replace patterns BB with RB
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective (output check)\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node and meets the puzzle's acceptance criteria\n- **Rejected**: Robot is routed to the NONE node, or caught in an infinite loop, or robot reaches the END node but fails to meet the puzzle's acceptance criteria \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted if they meet the puzzle criteria, otherwise rejected\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nReplace patterns RR with R, then put 'RBBB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RBBB'", "expected_accepted": true, "expected_output": "RBBB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RBBBR'", "expected_accepted": true, "expected_output": "RBBBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'RBBBRB'", "expected_accepted": true, "expected_output": "RBBBRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'RBBBBBR'", "expected_accepted": true, "expected_output": "RBBBBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBR' β†’ output: 'RBBBRBR'", "expected_accepted": true, "expected_output": "RBBBRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RB' β†’ output: 'RBBBRB'", "expected_accepted": true, "expected_output": "RBBBRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RBBBB'", "expected_accepted": true, "expected_output": "RBBBB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'R' β†’ output: 'RBBBR'", "expected_accepted": true, "expected_output": "RBBBR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'RBBBBR'", "expected_accepted": true, "expected_output": "RBBBBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'RBBBBRB'", "expected_accepted": true, "expected_output": "RBBBBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RBBBBB'", "expected_accepted": true, "expected_output": "RBBBBB", "input": "BB" }, { "check_output": true, "description": "Input 'BBBR' β†’ mutated: 'BBBR' β†’ output: 'RBBBBBBR'", "expected_accepted": true, "expected_output": "RBBBBBBR", "input": "BBBR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'RBBBBBB'", "expected_accepted": true, "expected_output": "RBBBBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RR' β†’ output: 'RBBBRR'", "expected_accepted": true, "expected_output": "RBBBRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'RBBBBRBR'", "expected_accepted": true, "expected_output": "RBBBBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'RBBBRBRB'", "expected_accepted": true, "expected_output": "RBBBRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBRRRBBB' β†’ mutated: 'BBRRBBB' β†’ output: 'RBBBBBRRBBB'", "expected_accepted": true, "expected_output": "RBBBBBRRBBB", "input": "BBRRRBBB" }, { "check_output": true, "description": "Input 'BRBBBBRBRRBR' β†’ mutated: 'BRBBBBRBRBR' β†’ output: 'RBBBBRBBBBRBRBR'", "expected_accepted": true, "expected_output": "RBBBBRBBBBRBRBR", "input": "BRBBBBRBRRBR" } ]
manufactoria
hard
e382f9e2-519a-4ae3-9e26-b7f6cad09f93
prepend_sequence
Prepend RBBB after Replace patterns RR with R
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective (output check)\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node and meets the puzzle's acceptance criteria\n- **Rejected**: Robot is routed to the NONE node, or caught in an infinite loop, or robot reaches the END node but fails to meet the puzzle's acceptance criteria \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted if they meet the puzzle criteria, otherwise rejected\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nReplace patterns BR with RB, then put 'R' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'R'", "expected_accepted": true, "expected_output": "R", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RR'", "expected_accepted": true, "expected_output": "RR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'RRB'", "expected_accepted": true, "expected_output": "RRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BRB' β†’ output: 'RBRB'", "expected_accepted": true, "expected_output": "RBRB", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RRB' β†’ output: 'RRRB'", "expected_accepted": true, "expected_output": "RRRB", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'RRRB'", "expected_accepted": true, "expected_output": "RRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RB'", "expected_accepted": true, "expected_output": "RB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RRR'", "expected_accepted": true, "expected_output": "RRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'RB' β†’ output: 'RRB'", "expected_accepted": true, "expected_output": "RRB", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'RBB' β†’ output: 'RRBB'", "expected_accepted": true, "expected_output": "RRBB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RBB'", "expected_accepted": true, "expected_output": "RBB", "input": "BB" }, { "check_output": true, "description": "Input 'BBBB' β†’ mutated: 'BBBB' β†’ output: 'RBBBB'", "expected_accepted": true, "expected_output": "RBBBB", "input": "BBBB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'RBBB'", "expected_accepted": true, "expected_output": "RBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RRRR'", "expected_accepted": true, "expected_output": "RRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'RBRB' β†’ output: 'RRBRB'", "expected_accepted": true, "expected_output": "RRBRB", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RRBB' β†’ output: 'RRRBB'", "expected_accepted": true, "expected_output": "RRRBB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RRBBBBRB' β†’ mutated: 'RRBBBRBB' β†’ output: 'RRRBBBRBB'", "expected_accepted": true, "expected_output": "RRRBBBRBB", "input": "RRBBBBRB" }, { "check_output": true, "description": "Input 'RRRBBBRRRBRB' β†’ mutated: 'RRRBBRBRRRBB' β†’ output: 'RRRRBBRBRRRBB'", "expected_accepted": true, "expected_output": "RRRRBBRBRRRBB", "input": "RRRBBBRRRBRB" } ]
manufactoria
hard
21327bdf-7d3d-4ef0-8263-6a14f0db7c96
prepend_sequence
Prepend R after Replace patterns BR with RB