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 RR with RB, then put 'RRR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RRR'", "expected_accepted": true, "expected_output": "RRR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RRRR'", "expected_accepted": true, "expected_output": "RRRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'RRRRB'", "expected_accepted": true, "expected_output": "RRRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'RRRBBR'", "expected_accepted": true, "expected_output": "RRRBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBR' β†’ output: 'RRRRBR'", "expected_accepted": true, "expected_output": "RRRRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RBB' β†’ output: 'RRRRBB'", "expected_accepted": true, "expected_output": "RRRRBB", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RB' β†’ output: 'RRRRB'", "expected_accepted": true, "expected_output": "RRRRB", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'RRRBR'", "expected_accepted": true, "expected_output": "RRRBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'RRRBRB'", "expected_accepted": true, "expected_output": "RRRBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RRRBB'", "expected_accepted": true, "expected_output": "RRRBB", "input": "BB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RRRB'", "expected_accepted": true, "expected_output": "RRRB", "input": "B" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'RRRBRBR'", "expected_accepted": true, "expected_output": "RRRBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'RRRBBB'", "expected_accepted": true, "expected_output": "RRRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RBR' β†’ output: 'RRRRBR'", "expected_accepted": true, "expected_output": "RRRRBR", "input": "RRR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'RRRRBRB'", "expected_accepted": true, "expected_output": "RRRRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRBRRRRB' β†’ mutated: 'BRBRBRBB' β†’ output: 'RRRBRBRBRBB'", "expected_accepted": true, "expected_output": "RRRBRBRBRBB", "input": "BRBRRRRB" }, { "check_output": true, "description": "Input 'RRRRRBRRRBBB' β†’ mutated: 'RBRBRBRBRBBB' β†’ output: 'RRRRBRBRBRBRBBB'", "expected_accepted": true, "expected_output": "RRRRBRBRBRBRBBB", "input": "RRRRRBRRRBBB" } ]
manufactoria
hard
1b2fa0c2-677f-49a6-bd97-fa72092c22d6
prepend_sequence
Prepend RRR after Replace patterns RR 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 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: 'RB' β†’ output: 'BBBRRB'", "expected_accepted": true, "expected_output": "BBBRRB", "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: 'RBR' β†’ output: 'BBBRRBR'", "expected_accepted": true, "expected_output": "BBBRRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'BRB' β†’ output: 'BBBRBRB'", "expected_accepted": true, "expected_output": "BBBRBRB", "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: 'BR' β†’ output: 'BBBRBR'", "expected_accepted": true, "expected_output": "BBBRBR", "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: 'BRB' β†’ output: 'BBBRBRB'", "expected_accepted": true, "expected_output": "BBBRBRB", "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 'BRBB' β†’ mutated: 'BRBB' β†’ output: 'BBBRBRBB'", "expected_accepted": true, "expected_output": "BBBRBRBB", "input": "BRBB" }, { "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: 'BRR' β†’ output: 'BBBRBRR'", "expected_accepted": true, "expected_output": "BBBRBRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'BBBRBRBR'", "expected_accepted": true, "expected_output": "BBBRBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'BBBRRBRB'", "expected_accepted": true, "expected_output": "BBBRRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBBRRBBR' β†’ mutated: 'BBBBRBBR' β†’ output: 'BBBRBBBBRBBR'", "expected_accepted": true, "expected_output": "BBBRBBBBRBBR", "input": "BBBRRBBR" }, { "check_output": true, "description": "Input 'BBBBRRBBBRRR' β†’ mutated: 'BBBBBRBBBBRR' β†’ output: 'BBBRBBBBBRBBBBRR'", "expected_accepted": true, "expected_output": "BBBRBBBBBRBBBBRR", "input": "BBBBRRBBBRRR" } ]
manufactoria
hard
253bc09e-af7e-4ef9-88c1-9e959b48e471
prepend_sequence
Prepend BBBR after Replace patterns RR 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\nRemove patterns BR, 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: 'B' β†’ output: 'BRBBB'", "expected_accepted": true, "expected_output": "BRBBB", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'R' β†’ output: 'BRBBR'", "expected_accepted": true, "expected_output": "BRBBR", "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 'BRB' β†’ mutated: 'B' β†’ output: 'BRBBB'", "expected_accepted": true, "expected_output": "BRBBB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: '' β†’ output: 'BRBB'", "expected_accepted": true, "expected_output": "BRBB", "input": "BR" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BRBBRR'", "expected_accepted": true, "expected_output": "BRBBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BRBBBB'", "expected_accepted": true, "expected_output": "BRBBBB", "input": "BB" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: '' β†’ output: 'BRBB'", "expected_accepted": true, "expected_output": "BRBB", "input": "BRBR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BRBBBBB'", "expected_accepted": true, "expected_output": "BRBBBBB", "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 'RBRB' β†’ mutated: 'RB' β†’ output: 'BRBBRB'", "expected_accepted": true, "expected_output": "BRBBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBRRRRBB' β†’ mutated: 'BRRRBB' β†’ output: 'BRBBBRRRBB'", "expected_accepted": true, "expected_output": "BRBBBRRRBB", "input": "BBRRRRBB" }, { "check_output": true, "description": "Input 'BRBBBBBBRBRR' β†’ mutated: 'BBBBBR' β†’ output: 'BRBBBBBBBR'", "expected_accepted": true, "expected_output": "BRBBBBBBBR", "input": "BRBBBBBBRBRR" } ]
manufactoria
hard
d20b52c0-c38b-4f0f-ba90-f2bd651cedb0
prepend_sequence
Prepend BRBB after Remove patterns 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 RB with RR, then put 'RRRR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RRRR'", "expected_accepted": true, "expected_output": "RRRR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RRRRR'", "expected_accepted": true, "expected_output": "RRRRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RR' β†’ output: 'RRRRRR'", "expected_accepted": true, "expected_output": "RRRRRR", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'RRRRBBR'", "expected_accepted": true, "expected_output": "RRRRBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RRR' β†’ output: 'RRRRRRR'", "expected_accepted": true, "expected_output": "RRRRRRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRR' β†’ output: 'RRRRRRR'", "expected_accepted": true, "expected_output": "RRRRRRR", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RRRRB'", "expected_accepted": true, "expected_output": "RRRRB", "input": "B" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRR' β†’ output: 'RRRRBRR'", "expected_accepted": true, "expected_output": "RRRRBRR", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'RRRRBR'", "expected_accepted": true, "expected_output": "RRRRBR", "input": "BR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RRRRBB'", "expected_accepted": true, "expected_output": "RRRRBB", "input": "BB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RRRRRR'", "expected_accepted": true, "expected_output": "RRRRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BRRR' β†’ mutated: 'BRRR' β†’ output: 'RRRRBRRR'", "expected_accepted": true, "expected_output": "RRRRBRRR", "input": "BRRR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'RRRRBBB'", "expected_accepted": true, "expected_output": "RRRRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RRRRRRR'", "expected_accepted": true, "expected_output": "RRRRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRRR' β†’ output: 'RRRRBRRR'", "expected_accepted": true, "expected_output": "RRRRBRRR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RRRR' β†’ output: 'RRRRRRRR'", "expected_accepted": true, "expected_output": "RRRRRRRR", "input": "RBRB" }, { "check_output": true, "description": "Input 'RBBBRBRR' β†’ mutated: 'RRBBRRRR' β†’ output: 'RRRRRRBBRRRR'", "expected_accepted": true, "expected_output": "RRRRRRBBRRRR", "input": "RBBBRBRR" }, { "check_output": true, "description": "Input 'RRBRRBRBBBBB' β†’ mutated: 'RRRRRRRRBBBB' β†’ output: 'RRRRRRRRRRRRBBBB'", "expected_accepted": true, "expected_output": "RRRRRRRRRRRRBBBB", "input": "RRBRRBRBBBBB" } ]
manufactoria
hard
b71dffb7-68ae-4edb-9af9-860e4bd23347
prepend_sequence
Prepend RRRR 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 BR with BB, 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: 'RB' β†’ output: 'RBRRB'", "expected_accepted": true, "expected_output": "RBRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBB' β†’ output: 'RBRBBB'", "expected_accepted": true, "expected_output": "RBRBBB", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBB' β†’ output: 'RBRRBB'", "expected_accepted": true, "expected_output": "RBRRBB", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'RBRRRB'", "expected_accepted": true, "expected_output": "RBRRRB", "input": "RRB" }, { "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: 'BB' β†’ output: 'RBRBB'", "expected_accepted": true, "expected_output": "RBRBB", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BBB' β†’ output: 'RBRBBB'", "expected_accepted": true, "expected_output": "RBRBBB", "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 'B' β†’ mutated: 'B' β†’ output: 'RBRB'", "expected_accepted": true, "expected_output": "RBRB", "input": "B" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBBB' β†’ output: 'RBRRBBB'", "expected_accepted": true, "expected_output": "RBRRBBB", "input": "RBRB" }, { "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: 'BBBB' β†’ output: 'RBRBBBB'", "expected_accepted": true, "expected_output": "RBRBBBB", "input": "BRBR" }, { "check_output": true, "description": "Input 'BRBBBBRB' β†’ mutated: 'BBBBBBBB' β†’ output: 'RBRBBBBBBBB'", "expected_accepted": true, "expected_output": "RBRBBBBBBBB", "input": "BRBBBBRB" }, { "check_output": true, "description": "Input 'RRRRRBBRRBRR' β†’ mutated: 'RRRRRBBBRBBR' β†’ output: 'RBRRRRRRBBBRBBR'", "expected_accepted": true, "expected_output": "RBRRRRRRBBBRBBR", "input": "RRRRRBBRRBRR" } ]
manufactoria
hard
86e0aa06-e2cc-4328-a122-5eaa03fb73cd
prepend_sequence
Prepend RBR after Replace patterns BR 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\nReplace patterns RR with BR, then put 'BBB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BBB'", "expected_accepted": true, "expected_output": "BBB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BBBR'", "expected_accepted": true, "expected_output": "BBBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BBBRB'", "expected_accepted": true, "expected_output": "BBBRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'BBBBBR'", "expected_accepted": true, "expected_output": "BBBBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBR' β†’ output: 'BBBRBR'", "expected_accepted": true, "expected_output": "BBBRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'BRB' β†’ output: 'BBBBRB'", "expected_accepted": true, "expected_output": "BBBBRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BBBB'", "expected_accepted": true, "expected_output": "BBBB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'BR' β†’ output: 'BBBBR'", "expected_accepted": true, "expected_output": "BBBBR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'BBBBR'", "expected_accepted": true, "expected_output": "BBBBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'BBBBRB'", "expected_accepted": true, "expected_output": "BBBBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BBBBB'", "expected_accepted": true, "expected_output": "BBBBB", "input": "BB" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'BBBBRBR'", "expected_accepted": true, "expected_output": "BBBBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BBBBBB'", "expected_accepted": true, "expected_output": "BBBBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'BRR' β†’ output: 'BBBBRR'", "expected_accepted": true, "expected_output": "BBBBRR", "input": "RRR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'BBBRBRB'", "expected_accepted": true, "expected_output": "BBBRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RBRRRBRR' β†’ mutated: 'RBBRRBBR' β†’ output: 'BBBRBBRRBBR'", "expected_accepted": true, "expected_output": "BBBRBBRRBBR", "input": "RBRRRBRR" }, { "check_output": true, "description": "Input 'RRBRBRBBBBBB' β†’ mutated: 'BRBRBRBBBBBB' β†’ output: 'BBBBRBRBRBBBBBB'", "expected_accepted": true, "expected_output": "BBBBRBRBRBBBBBB", "input": "RRBRBRBBBBBB" } ]
manufactoria
hard
fdb519af-b487-4805-872f-e174ee509c8d
prepend_sequence
Prepend BBB after Replace patterns RR 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 RR with B, 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: 'RB' β†’ output: 'RRRB'", "expected_accepted": true, "expected_output": "RRRB", "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: 'RBR' β†’ output: 'RRRBR'", "expected_accepted": true, "expected_output": "RRRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'BB' β†’ output: 'RRBB'", "expected_accepted": true, "expected_output": "RRBB", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'B' β†’ output: 'RRB'", "expected_accepted": true, "expected_output": "RRB", "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: 'BRB' β†’ output: 'RRBRB'", "expected_accepted": true, "expected_output": "RRBRB", "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 'BRRB' β†’ mutated: 'BBB' β†’ output: 'RRBBB'", "expected_accepted": true, "expected_output": "RRBBB", "input": "BRRB" }, { "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: 'BR' β†’ output: 'RRBR'", "expected_accepted": true, "expected_output": "RRBR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'RRBRBR'", "expected_accepted": true, "expected_output": "RRBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'RRRBRB'", "expected_accepted": true, "expected_output": "RRRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RBRBBRBB' β†’ mutated: 'RBRBBRBB' β†’ output: 'RRRBRBBRBB'", "expected_accepted": true, "expected_output": "RRRBRBBRBB", "input": "RBRBBRBB" }, { "check_output": true, "description": "Input 'RBBBRRRRBRRR' β†’ mutated: 'RBBBBBBBR' β†’ output: 'RRRBBBBBBBR'", "expected_accepted": true, "expected_output": "RRRBBBBBBBR", "input": "RBBBRRRRBRRR" } ]
manufactoria
hard
dc8a5f1c-7639-4b67-be4b-d055b13dc791
prepend_sequence
Prepend RR after Replace patterns RR with B
[ { "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 'BBR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BBR'", "expected_accepted": true, "expected_output": "BBR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BBRR'", "expected_accepted": true, "expected_output": "BBRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'BB' β†’ output: 'BBRBB'", "expected_accepted": true, "expected_output": "BBRBB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'BBRBBR'", "expected_accepted": true, "expected_output": "BBRBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'BBR' β†’ output: 'BBRBBR'", "expected_accepted": true, "expected_output": "BBRBBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RBB' β†’ output: 'BBRRBB'", "expected_accepted": true, "expected_output": "BBRRBB", "input": "RRB" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BBB' β†’ output: 'BBRBBB'", "expected_accepted": true, "expected_output": "BBRBBB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'BBRBR'", "expected_accepted": true, "expected_output": "BBRBR", "input": "BR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BBRBB'", "expected_accepted": true, "expected_output": "BBRBB", "input": "BB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BBRB'", "expected_accepted": true, "expected_output": "BBRB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BBRRR'", "expected_accepted": true, "expected_output": "BBRRR", "input": "RR" }, { "check_output": true, "description": "Input 'RBBB' β†’ mutated: 'BBBB' β†’ output: 'BBRBBBB'", "expected_accepted": true, "expected_output": "BBRBBBB", "input": "RBBB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BBRBBB'", "expected_accepted": true, "expected_output": "BBRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BBRRRR'", "expected_accepted": true, "expected_output": "BBRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BBBR' β†’ output: 'BBRBBBR'", "expected_accepted": true, "expected_output": "BBRBBBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'BBBB' β†’ output: 'BBRBBBB'", "expected_accepted": true, "expected_output": "BBRBBBB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RBRBRRRB' β†’ mutated: 'BBBBRRBB' β†’ output: 'BBRBBBBRRBB'", "expected_accepted": true, "expected_output": "BBRBBBBRRBB", "input": "RBRBRRRB" }, { "check_output": true, "description": "Input 'RRBRRBRRRBRR' β†’ mutated: 'RBBRBBRRBBRR' β†’ output: 'BBRRBBRBBRRBBRR'", "expected_accepted": true, "expected_output": "BBRRBBRBBRRBBRR", "input": "RRBRRBRRRBRR" } ]
manufactoria
hard
a9ce6b5c-70e5-4ef9-b669-7a62dbeafe74
prepend_sequence
Prepend BBR 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 RR, then put 'RBB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RBB'", "expected_accepted": true, "expected_output": "RBB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RBBR'", "expected_accepted": true, "expected_output": "RBBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'RBBRB'", "expected_accepted": true, "expected_output": "RBBRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'RBBBBR'", "expected_accepted": true, "expected_output": "RBBBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBR' β†’ output: 'RBBRBR'", "expected_accepted": true, "expected_output": "RBBRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'B' β†’ output: 'RBBB'", "expected_accepted": true, "expected_output": "RBBB", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: '' β†’ output: 'RBB'", "expected_accepted": true, "expected_output": "RBB", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'RBBBR'", "expected_accepted": true, "expected_output": "RBBBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'RBBBRB'", "expected_accepted": true, "expected_output": "RBBBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RBBB'", "expected_accepted": true, "expected_output": "RBBB", "input": "B" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RBBBB'", "expected_accepted": true, "expected_output": "RBBBB", "input": "BB" }, { "check_output": true, "description": "Input 'BBRB' β†’ mutated: 'BBRB' β†’ output: 'RBBBBRB'", "expected_accepted": true, "expected_output": "RBBBBRB", "input": "BBRB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'RBBBBB'", "expected_accepted": true, "expected_output": "RBBBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'R' β†’ output: 'RBBR'", "expected_accepted": true, "expected_output": "RBBR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'RBBBRBR'", "expected_accepted": true, "expected_output": "RBBBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'RBBRBRB'", "expected_accepted": true, "expected_output": "RBBRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RRRBRBBB' β†’ mutated: 'RBRBBB' β†’ output: 'RBBRBRBBB'", "expected_accepted": true, "expected_output": "RBBRBRBBB", "input": "RRRBRBBB" }, { "check_output": true, "description": "Input 'BBRBRBRBRRRR' β†’ mutated: 'BBRBRBRB' β†’ output: 'RBBBBRBRBRB'", "expected_accepted": true, "expected_output": "RBBBBRBRBRB", "input": "BBRBRBRBRRRR" } ]
manufactoria
hard
557df39a-1394-4e69-9da3-53c92311686e
prepend_sequence
Prepend RBB after Remove patterns 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 BB with RB, then put 'RBB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RBB'", "expected_accepted": true, "expected_output": "RBB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RBBR'", "expected_accepted": true, "expected_output": "RBBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'RBBRB'", "expected_accepted": true, "expected_output": "RBBRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'RBR' β†’ output: 'RBBRBR'", "expected_accepted": true, "expected_output": "RBBRBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBR' β†’ output: 'RBBRBR'", "expected_accepted": true, "expected_output": "RBBRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'RBBRRB'", "expected_accepted": true, "expected_output": "RBBRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RBBRR'", "expected_accepted": true, "expected_output": "RBBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'RBBBR'", "expected_accepted": true, "expected_output": "RBBBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'RBBBRB'", "expected_accepted": true, "expected_output": "RBBBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'RB' β†’ output: 'RBBRB'", "expected_accepted": true, "expected_output": "RBBRB", "input": "BB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RBBB'", "expected_accepted": true, "expected_output": "RBBB", "input": "B" }, { "check_output": true, "description": "Input 'RRRB' β†’ mutated: 'RRRB' β†’ output: 'RBBRRRB'", "expected_accepted": true, "expected_output": "RBBRRRB", "input": "RRRB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'RBB' β†’ output: 'RBBRBB'", "expected_accepted": true, "expected_output": "RBBRBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RBBRRR'", "expected_accepted": true, "expected_output": "RBBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'RBBBRBR'", "expected_accepted": true, "expected_output": "RBBBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'RBBRBRB'", "expected_accepted": true, "expected_output": "RBBRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RBRBRBBB' β†’ mutated: 'RBRBRRBB' β†’ output: 'RBBRBRBRRBB'", "expected_accepted": true, "expected_output": "RBBRBRBRRBB", "input": "RBRBRBBB" }, { "check_output": true, "description": "Input 'BRRRBBRRBRBB' β†’ mutated: 'BRRRRBRRBRRB' β†’ output: 'RBBBRRRRBRRBRRB'", "expected_accepted": true, "expected_output": "RBBBRRRRBRRBRRB", "input": "BRRRBBRRBRBB" } ]
manufactoria
hard
995e5fe2-f8f0-4dfe-a814-00399eae71c6
prepend_sequence
Prepend RBB 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 BB with BR, then put 'BRR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BRRRB'", "expected_accepted": true, "expected_output": "BRRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BRR' β†’ output: 'BRRBRR'", "expected_accepted": true, "expected_output": "BRRBRR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBR' β†’ output: 'BRRRBR'", "expected_accepted": true, "expected_output": "BRRRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'BRRRRB'", "expected_accepted": true, "expected_output": "BRRRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BRRB'", "expected_accepted": true, "expected_output": "BRRB", "input": "B" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'BRRBRB'", "expected_accepted": true, "expected_output": "BRRBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'BRRBR'", "expected_accepted": true, "expected_output": "BRRBR", "input": "BR" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BR' β†’ output: 'BRRBR'", "expected_accepted": true, "expected_output": "BRRBR", "input": "BB" }, { "check_output": true, "description": "Input 'RBBB' β†’ mutated: 'RBRB' β†’ output: 'BRRRBRB'", "expected_accepted": true, "expected_output": "BRRRBRB", "input": "RBBB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BRB' β†’ output: 'BRRBRB'", "expected_accepted": true, "expected_output": "BRRBRB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BRRRRR'", "expected_accepted": true, "expected_output": "BRRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'BRRBRBR'", "expected_accepted": true, "expected_output": "BRRBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'BRRRBRB'", "expected_accepted": true, "expected_output": "BRRRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBRBRRRR' β†’ mutated: 'BRRBRRRR' β†’ output: 'BRRBRRBRRRR'", "expected_accepted": true, "expected_output": "BRRBRRBRRRR", "input": "BBRBRRRR" }, { "check_output": true, "description": "Input 'BRRBRBRBBRRB' β†’ mutated: 'BRRBRBRBRRRB' β†’ output: 'BRRBRRBRBRBRRRB'", "expected_accepted": true, "expected_output": "BRRBRRBRBRBRRRB", "input": "BRRBRBRBBRRB" } ]
manufactoria
hard
8ebae0f9-fa16-496f-8ee4-4604c4130907
prepend_sequence
Prepend BRR after Replace patterns BB 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 BR with BB, 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: 'BBB' β†’ output: 'RBBB'", "expected_accepted": true, "expected_output": "RBBB", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBB' β†’ output: 'RRBB'", "expected_accepted": true, "expected_output": "RRBB", "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 'RR' β†’ mutated: 'RR' β†’ output: 'RRR'", "expected_accepted": true, "expected_output": "RRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BB' β†’ output: 'RBB'", "expected_accepted": true, "expected_output": "RBB", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BBB' β†’ output: 'RBBB'", "expected_accepted": true, "expected_output": "RBBB", "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 'B' β†’ mutated: 'B' β†’ output: 'RB'", "expected_accepted": true, "expected_output": "RB", "input": "B" }, { "check_output": true, "description": "Input 'RBBB' β†’ mutated: 'RBBB' β†’ output: 'RRBBB'", "expected_accepted": true, "expected_output": "RRBBB", "input": "RBBB" }, { "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: 'BBBB' β†’ output: 'RBBBB'", "expected_accepted": true, "expected_output": "RBBBB", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBBB' β†’ output: 'RRBBB'", "expected_accepted": true, "expected_output": "RRBBB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RBRRRRRR' β†’ mutated: 'RBBRRRRR' β†’ output: 'RRBBRRRRR'", "expected_accepted": true, "expected_output": "RRBBRRRRR", "input": "RBRRRRRR" }, { "check_output": true, "description": "Input 'BRRBBRBBRRRR' β†’ mutated: 'BBRBBBBBBRRR' β†’ output: 'RBBRBBBBBBRRR'", "expected_accepted": true, "expected_output": "RBBRBBBBBBRRR", "input": "BRRBBRBBRRRR" } ]
manufactoria
hard
4f67bc8e-3622-4341-b333-5431fa97af6e
prepend_sequence
Prepend R after Replace patterns BR 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 BR, then put 'BRBR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BRBR'", "expected_accepted": true, "expected_output": "BRBR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BRBRR'", "expected_accepted": true, "expected_output": "BRBRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BRBRRB'", "expected_accepted": true, "expected_output": "BRBRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'B' β†’ output: 'BRBRB'", "expected_accepted": true, "expected_output": "BRBRB", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'R' β†’ output: 'BRBRR'", "expected_accepted": true, "expected_output": "BRBRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'BRBRRRB'", "expected_accepted": true, "expected_output": "BRBRRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BRBRB'", "expected_accepted": true, "expected_output": "BRBRB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BRBRRR'", "expected_accepted": true, "expected_output": "BRBRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: '' β†’ output: 'BRBR'", "expected_accepted": true, "expected_output": "BRBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'B' β†’ output: 'BRBRB'", "expected_accepted": true, "expected_output": "BRBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BRBRBB'", "expected_accepted": true, "expected_output": "BRBRBB", "input": "BB" }, { "check_output": true, "description": "Input 'BBBB' β†’ mutated: 'BBBB' β†’ output: 'BRBRBBBB'", "expected_accepted": true, "expected_output": "BRBRBBBB", "input": "BBBB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BRBRBBB'", "expected_accepted": true, "expected_output": "BRBRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BRBRRRR'", "expected_accepted": true, "expected_output": "BRBRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: '' β†’ output: 'BRBR'", "expected_accepted": true, "expected_output": "BRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RB' β†’ output: 'BRBRRB'", "expected_accepted": true, "expected_output": "BRBRRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBBBRRRB' β†’ mutated: 'BBBRRB' β†’ output: 'BRBRBBBRRB'", "expected_accepted": true, "expected_output": "BRBRBBBRRB", "input": "BBBBRRRB" }, { "check_output": true, "description": "Input 'BBRBBBRRRBBB' β†’ mutated: 'BBBRRBBB' β†’ output: 'BRBRBBBRRBBB'", "expected_accepted": true, "expected_output": "BRBRBBBRRBBB", "input": "BBRBBBRRRBBB" } ]
manufactoria
hard
f804d699-bdb0-42b4-8d98-d443064fccb0
prepend_sequence
Prepend BRBR after Remove patterns 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 BR with RB, then put 'RBRB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RBRB'", "expected_accepted": true, "expected_output": "RBRB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RBRBR'", "expected_accepted": true, "expected_output": "RBRBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'RBRBRB'", "expected_accepted": true, "expected_output": "RBRBRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BRB' β†’ output: 'RBRBBRB'", "expected_accepted": true, "expected_output": "RBRBBRB", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RRB' β†’ output: 'RBRBRRB'", "expected_accepted": true, "expected_output": "RBRBRRB", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'RBRBRRB'", "expected_accepted": true, "expected_output": "RBRBRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RBRBB'", "expected_accepted": true, "expected_output": "RBRBB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RBRBRR'", "expected_accepted": true, "expected_output": "RBRBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'RB' β†’ output: 'RBRBRB'", "expected_accepted": true, "expected_output": "RBRBRB", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'RBB' β†’ output: 'RBRBRBB'", "expected_accepted": true, "expected_output": "RBRBRBB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RBRBBB'", "expected_accepted": true, "expected_output": "RBRBBB", "input": "BB" }, { "check_output": true, "description": "Input 'RRRR' β†’ mutated: 'RRRR' β†’ output: 'RBRBRRRR'", "expected_accepted": true, "expected_output": "RBRBRRRR", "input": "RRRR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'RBRBBBB'", "expected_accepted": true, "expected_output": "RBRBBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RBRBRRR'", "expected_accepted": true, "expected_output": "RBRBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'RBRB' β†’ output: 'RBRBRBRB'", "expected_accepted": true, "expected_output": "RBRBRBRB", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RRBB' β†’ output: 'RBRBRRBB'", "expected_accepted": true, "expected_output": "RBRBRRBB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBBBRRRR' β†’ mutated: 'BBBRBRRR' β†’ output: 'RBRBBBBRBRRR'", "expected_accepted": true, "expected_output": "RBRBBBBRBRRR", "input": "BBBBRRRR" }, { "check_output": true, "description": "Input 'RRBBBBBRBRBB' β†’ mutated: 'RRBBBBRBRBBB' β†’ output: 'RBRBRRBBBBRBRBBB'", "expected_accepted": true, "expected_output": "RBRBRRBBBBRBRBBB", "input": "RRBBBBBRBRBB" } ]
manufactoria
hard
6f4147ed-ce1d-495a-b708-b1e8a1789bc2
prepend_sequence
Prepend RBRB after Replace patterns BR 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 'BRBR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BRBR'", "expected_accepted": true, "expected_output": "BRBR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BRBRR'", "expected_accepted": true, "expected_output": "BRBRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BRBRRB'", "expected_accepted": true, "expected_output": "BRBRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'BRBRBBR'", "expected_accepted": true, "expected_output": "BRBRBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBR' β†’ output: 'BRBRRBR'", "expected_accepted": true, "expected_output": "BRBRRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RB' β†’ output: 'BRBRRB'", "expected_accepted": true, "expected_output": "BRBRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'R' β†’ output: 'BRBRR'", "expected_accepted": true, "expected_output": "BRBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'BRBRBR'", "expected_accepted": true, "expected_output": "BRBRBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'BRBRBRB'", "expected_accepted": true, "expected_output": "BRBRBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BRBRB'", "expected_accepted": true, "expected_output": "BRBRB", "input": "B" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BRBRBB'", "expected_accepted": true, "expected_output": "BRBRBB", "input": "BB" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'BRBRRBRB'", "expected_accepted": true, "expected_output": "BRBRRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BRBRBBB'", "expected_accepted": true, "expected_output": "BRBRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RR' β†’ output: 'BRBRRR'", "expected_accepted": true, "expected_output": "BRBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'BRBRBRBR'", "expected_accepted": true, "expected_output": "BRBRBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'BRRBRBBB' β†’ mutated: 'BRBRBBB' β†’ output: 'BRBRBRBRBBB'", "expected_accepted": true, "expected_output": "BRBRBRBRBBB", "input": "BRRBRBBB" }, { "check_output": true, "description": "Input 'BRBBRRBRBRRB' β†’ mutated: 'BRBBRBRBRB' β†’ output: 'BRBRBRBBRBRBRB'", "expected_accepted": true, "expected_output": "BRBRBRBBRBRBRB", "input": "BRBBRRBRBRRB" } ]
manufactoria
hard
6255f7c5-030d-435e-92df-696a478fb55d
prepend_sequence
Prepend BRBR 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 BB with RB, then put 'RBRB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RBRB'", "expected_accepted": true, "expected_output": "RBRB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RBRBR'", "expected_accepted": true, "expected_output": "RBRBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'RBRBRB'", "expected_accepted": true, "expected_output": "RBRBRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'RBR' β†’ output: 'RBRBRBR'", "expected_accepted": true, "expected_output": "RBRBRBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBR' β†’ output: 'RBRBRBR'", "expected_accepted": true, "expected_output": "RBRBRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'RBRBRRB'", "expected_accepted": true, "expected_output": "RBRBRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'RBRBBRB'", "expected_accepted": true, "expected_output": "RBRBBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'RBRBBR'", "expected_accepted": true, "expected_output": "RBRBBR", "input": "BR" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RBRBB'", "expected_accepted": true, "expected_output": "RBRBB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RBRBRR'", "expected_accepted": true, "expected_output": "RBRBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'RB' β†’ output: 'RBRBRB'", "expected_accepted": true, "expected_output": "RBRBRB", "input": "BB" }, { "check_output": true, "description": "Input 'BRBB' β†’ mutated: 'BRRB' β†’ output: 'RBRBBRRB'", "expected_accepted": true, "expected_output": "RBRBBRRB", "input": "BRBB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'RBB' β†’ output: 'RBRBRBB'", "expected_accepted": true, "expected_output": "RBRBRBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RBRBRRR'", "expected_accepted": true, "expected_output": "RBRBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'RBRBBRBR'", "expected_accepted": true, "expected_output": "RBRBBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'RBRBRBRB'", "expected_accepted": true, "expected_output": "RBRBRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RBBRBRBR' β†’ mutated: 'RRBRBRBR' β†’ output: 'RBRBRRBRBRBR'", "expected_accepted": true, "expected_output": "RBRBRRBRBRBR", "input": "RBBRBRBR" }, { "check_output": true, "description": "Input 'BBBBBBBRRBBR' β†’ mutated: 'RBRBRBBRRRBR' β†’ output: 'RBRBRBRBRBBRRRBR'", "expected_accepted": true, "expected_output": "RBRBRBRBRBBRRRBR", "input": "BBBBBBBRRBBR" } ]
manufactoria
hard
b3c4d577-a760-4fca-b637-a1dc64c18a58
prepend_sequence
Prepend RBRB 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\nRemove patterns RR, 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: 'B' β†’ output: 'RBBBB'", "expected_accepted": true, "expected_output": "RBBBB", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: '' β†’ output: 'RBBB'", "expected_accepted": true, "expected_output": "RBBB", "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 'B' β†’ mutated: 'B' β†’ output: 'RBBBB'", "expected_accepted": true, "expected_output": "RBBBB", "input": "B" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RBBBBB'", "expected_accepted": true, "expected_output": "RBBBBB", "input": "BB" }, { "check_output": true, "description": "Input 'BRBB' β†’ mutated: 'BRBB' β†’ output: 'RBBBBRBB'", "expected_accepted": true, "expected_output": "RBBBBRBB", "input": "BRBB" }, { "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: 'R' β†’ output: 'RBBBR'", "expected_accepted": true, "expected_output": "RBBBR", "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 'RBBBRBBR' β†’ mutated: 'RBBBRBBR' β†’ output: 'RBBBRBBBRBBR'", "expected_accepted": true, "expected_output": "RBBBRBBBRBBR", "input": "RBBBRBBR" }, { "check_output": true, "description": "Input 'BBRRBBBRRRBB' β†’ mutated: 'BBBBBRBB' β†’ output: 'RBBBBBBBBRBB'", "expected_accepted": true, "expected_output": "RBBBBBBBBRBB", "input": "BBRRBBBRRRBB" } ]
manufactoria
hard
6b66c8d8-2120-429d-a90f-2ce9add47f24
prepend_sequence
Prepend RBBB after Remove patterns 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 BR with B, then put 'B' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'B'", "expected_accepted": true, "expected_output": "B", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BRB'", "expected_accepted": true, "expected_output": "BRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BB' β†’ output: 'BBB'", "expected_accepted": true, "expected_output": "BBB", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RB' β†’ output: 'BRB'", "expected_accepted": true, "expected_output": "BRB", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'BRRB'", "expected_accepted": true, "expected_output": "BRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "B" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BB' β†’ output: 'BBB'", "expected_accepted": true, "expected_output": "BBB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'B' β†’ output: 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "BR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BBB'", "expected_accepted": true, "expected_output": "BBB", "input": "BB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "RR" }, { "check_output": true, "description": "Input 'BBRB' β†’ mutated: 'BBB' β†’ output: 'BBBB'", "expected_accepted": true, "expected_output": "BBBB", "input": "BBRB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BBBB'", "expected_accepted": true, "expected_output": "BBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BB' β†’ output: 'BBB'", "expected_accepted": true, "expected_output": "BBB", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBB' β†’ output: 'BRBB'", "expected_accepted": true, "expected_output": "BRBB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBRBBRBR' β†’ mutated: 'BBBBB' β†’ output: 'BBBBBB'", "expected_accepted": true, "expected_output": "BBBBBB", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBBRBRRBRBB' β†’ mutated: 'RBBBBRBBB' β†’ output: 'BRBBBBRBBB'", "expected_accepted": true, "expected_output": "BRBBBBRBBB", "input": "RBBBRBRRBRBB" } ]
manufactoria
hard
398d0698-c38d-4f31-8780-92e5d510fd33
prepend_sequence
Prepend B after Replace patterns BR with B
[ { "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 B, then put 'BBB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BBB'", "expected_accepted": true, "expected_output": "BBB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BBBR'", "expected_accepted": true, "expected_output": "BBBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BBBRB'", "expected_accepted": true, "expected_output": "BBBRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BR' β†’ output: 'BBBBR'", "expected_accepted": true, "expected_output": "BBBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBR' β†’ output: 'BBBRBR'", "expected_accepted": true, "expected_output": "BBBRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'BBBRRB'", "expected_accepted": true, "expected_output": "BBBRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BBBB'", "expected_accepted": true, "expected_output": "BBBB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BBBRR'", "expected_accepted": true, "expected_output": "BBBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'BBBBR'", "expected_accepted": true, "expected_output": "BBBBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'BBBBRB'", "expected_accepted": true, "expected_output": "BBBBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'B' β†’ output: 'BBBB'", "expected_accepted": true, "expected_output": "BBBB", "input": "BB" }, { "check_output": true, "description": "Input 'RRRB' β†’ mutated: 'RRRB' β†’ output: 'BBBRRRB'", "expected_accepted": true, "expected_output": "BBBRRRB", "input": "RRRB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BB' β†’ output: 'BBBBB'", "expected_accepted": true, "expected_output": "BBBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BBBRRR'", "expected_accepted": true, "expected_output": "BBBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'BBBBRBR'", "expected_accepted": true, "expected_output": "BBBBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'BBBRBRB'", "expected_accepted": true, "expected_output": "BBBRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBRRBBRR' β†’ mutated: 'BRRBRR' β†’ output: 'BBBBRRBRR'", "expected_accepted": true, "expected_output": "BBBBRRBRR", "input": "BBRRBBRR" }, { "check_output": true, "description": "Input 'BRRBRRBBBBRB' β†’ mutated: 'BRRBRRBBRB' β†’ output: 'BBBBRRBRRBBRB'", "expected_accepted": true, "expected_output": "BBBBRRBRRBBRB", "input": "BRRBRRBBBBRB" } ]
manufactoria
hard
4d512e3c-1c6e-45bf-8ffe-7236503b83fa
prepend_sequence
Prepend BBB after Replace patterns BB with B
[ { "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 BR, 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: 'RB' β†’ output: 'RRRB'", "expected_accepted": true, "expected_output": "RRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'B' β†’ output: 'RRB'", "expected_accepted": true, "expected_output": "RRB", "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: 'RRB' β†’ output: 'RRRRB'", "expected_accepted": true, "expected_output": "RRRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'B' β†’ output: 'RRB'", "expected_accepted": true, "expected_output": "RRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: '' β†’ output: 'RR'", "expected_accepted": true, "expected_output": "RR", "input": "BR" }, { "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 'RR' β†’ mutated: 'RR' β†’ output: 'RRRR'", "expected_accepted": true, "expected_output": "RRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: '' β†’ output: 'RR'", "expected_accepted": true, "expected_output": "RR", "input": "BRBR" }, { "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 'RBRB' β†’ mutated: 'RB' β†’ output: 'RRRB'", "expected_accepted": true, "expected_output": "RRRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBBBBBBB' β†’ mutated: 'BBBBBBBB' β†’ output: 'RRBBBBBBBB'", "expected_accepted": true, "expected_output": "RRBBBBBBBB", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'RRRRRBRBBBBR' β†’ mutated: 'RRRRRBBB' β†’ output: 'RRRRRRRBBB'", "expected_accepted": true, "expected_output": "RRRRRRRBBB", "input": "RRRRRBRBBBBR" } ]
manufactoria
hard
d91e8acc-e7e7-4dce-a5aa-e7ec8d4609b4
prepend_sequence
Prepend RR after Remove patterns 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 BR, then put 'RRRR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RRRR'", "expected_accepted": true, "expected_output": "RRRR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RRRRR'", "expected_accepted": true, "expected_output": "RRRRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'RRRRRB'", "expected_accepted": true, "expected_output": "RRRRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BRR' β†’ output: 'RRRRBRR'", "expected_accepted": true, "expected_output": "RRRRBRR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBR' β†’ output: 'RRRRRBR'", "expected_accepted": true, "expected_output": "RRRRRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'RRRRRRB'", "expected_accepted": true, "expected_output": "RRRRRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RRRRRR'", "expected_accepted": true, "expected_output": "RRRRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'RRRRBR'", "expected_accepted": true, "expected_output": "RRRRBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'RRRRBRB'", "expected_accepted": true, "expected_output": "RRRRBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BR' β†’ output: 'RRRRBR'", "expected_accepted": true, "expected_output": "RRRRBR", "input": "BB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RRRRB'", "expected_accepted": true, "expected_output": "RRRRB", "input": "B" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'RRRRBRBR'", "expected_accepted": true, "expected_output": "RRRRBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BRB' β†’ output: 'RRRRBRB'", "expected_accepted": true, "expected_output": "RRRRBRB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RRRRRRR'", "expected_accepted": true, "expected_output": "RRRRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'RRRRRBRB'", "expected_accepted": true, "expected_output": "RRRRRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RBRBBRRR' β†’ mutated: 'RBRBRRRR' β†’ output: 'RRRRRBRBRRRR'", "expected_accepted": true, "expected_output": "RRRRRBRBRRRR", "input": "RBRBBRRR" }, { "check_output": true, "description": "Input 'BBBBBRRBRRRB' β†’ mutated: 'BRBRBRRBRRRB' β†’ output: 'RRRRBRBRBRRBRRRB'", "expected_accepted": true, "expected_output": "RRRRBRBRBRRBRRRB", "input": "BBBBBRRBRRRB" } ]
manufactoria
hard
3c672174-e6d6-4a10-901a-8dd42bfe1fdb
prepend_sequence
Prepend RRRR after Replace patterns BB 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 BR with BB, then put 'RB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RB'", "expected_accepted": true, "expected_output": "RB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RBR'", "expected_accepted": true, "expected_output": "RBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'RBRB'", "expected_accepted": true, "expected_output": "RBRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBB' β†’ output: 'RBBBB'", "expected_accepted": true, "expected_output": "RBBBB", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBB' β†’ output: 'RBRBB'", "expected_accepted": true, "expected_output": "RBRBB", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'RBRRB'", "expected_accepted": true, "expected_output": "RBRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RBRR'", "expected_accepted": true, "expected_output": "RBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BB' β†’ output: 'RBBB'", "expected_accepted": true, "expected_output": "RBBB", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BBB' β†’ output: 'RBBBB'", "expected_accepted": true, "expected_output": "RBBBB", "input": "BRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RBB'", "expected_accepted": true, "expected_output": "RBB", "input": "B" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RBBB'", "expected_accepted": true, "expected_output": "RBBB", "input": "BB" }, { "check_output": true, "description": "Input 'RBBB' β†’ mutated: 'RBBB' β†’ output: 'RBRBBB'", "expected_accepted": true, "expected_output": "RBRBBB", "input": "RBBB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'RBBBB'", "expected_accepted": true, "expected_output": "RBBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RBRRR'", "expected_accepted": true, "expected_output": "RBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BBBB' β†’ output: 'RBBBBB'", "expected_accepted": true, "expected_output": "RBBBBB", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBBB' β†’ output: 'RBRBBB'", "expected_accepted": true, "expected_output": "RBRBBB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RRRBRBBR' β†’ mutated: 'RRRBBBBB' β†’ output: 'RBRRRBBBBB'", "expected_accepted": true, "expected_output": "RBRRRBBBBB", "input": "RRRBRBBR" }, { "check_output": true, "description": "Input 'RRRBBBRBBRBB' β†’ mutated: 'RRRBBBBBBBBB' β†’ output: 'RBRRRBBBBBBBBB'", "expected_accepted": true, "expected_output": "RBRRRBBBBBBBBB", "input": "RRRBBBRBBRBB" } ]
manufactoria
hard
ae95af75-0ee9-4cfb-9e52-7863d2fecb4d
prepend_sequence
Prepend RB after Replace patterns BR 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\nReplace patterns RB with BR, then put 'BR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'BR' β†’ output: 'BRBR'", "expected_accepted": true, "expected_output": "BRBR", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'BRBBR'", "expected_accepted": true, "expected_output": "BRBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'BRR' β†’ output: 'BRBRR'", "expected_accepted": true, "expected_output": "BRBRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RBR' β†’ output: 'BRRBR'", "expected_accepted": true, "expected_output": "BRRBR", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BRB'", "expected_accepted": true, "expected_output": "BRB", "input": "B" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BBR' β†’ output: 'BRBBR'", "expected_accepted": true, "expected_output": "BRBBR", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'BRBR'", "expected_accepted": true, "expected_output": "BRBR", "input": "BR" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BRBB'", "expected_accepted": true, "expected_output": "BRBB", "input": "BB" }, { "check_output": true, "description": "Input 'BBRB' β†’ mutated: 'BBBR' β†’ output: 'BRBBBR'", "expected_accepted": true, "expected_output": "BRBBBR", "input": "BBRB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BRBBB'", "expected_accepted": true, "expected_output": "BRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BBRR' β†’ output: 'BRBBRR'", "expected_accepted": true, "expected_output": "BRBBRR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'BRBR' β†’ output: 'BRBRBR'", "expected_accepted": true, "expected_output": "BRBRBR", "input": "RBRB" }, { "check_output": true, "description": "Input 'RBRRBBRR' β†’ mutated: 'BRRBRBRR' β†’ output: 'BRBRRBRBRR'", "expected_accepted": true, "expected_output": "BRBRRBRBRR", "input": "RBRRBBRR" }, { "check_output": true, "description": "Input 'RBRRBRBBBRBR' β†’ mutated: 'BRRBRBRBBBRR' β†’ output: 'BRBRRBRBRBBBRR'", "expected_accepted": true, "expected_output": "BRBRRBRBRBBBRR", "input": "RBRRBRBBBRBR" } ]
manufactoria
hard
6141049d-5864-4cc2-9eab-7018fe4c3df3
prepend_sequence
Prepend BR 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 BR with B, then put 'RRRB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RRRB'", "expected_accepted": true, "expected_output": "RRRB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RRRBR'", "expected_accepted": true, "expected_output": "RRRBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'RRRBRB'", "expected_accepted": true, "expected_output": "RRRBRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BB' β†’ output: 'RRRBBB'", "expected_accepted": true, "expected_output": "RRRBBB", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RB' β†’ output: 'RRRBRB'", "expected_accepted": true, "expected_output": "RRRBRB", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'RRRBRRB'", "expected_accepted": true, "expected_output": "RRRBRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RRRBB'", "expected_accepted": true, "expected_output": "RRRBB", "input": "B" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BB' β†’ output: 'RRRBBB'", "expected_accepted": true, "expected_output": "RRRBBB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'B' β†’ output: 'RRRBB'", "expected_accepted": true, "expected_output": "RRRBB", "input": "BR" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RRRBRR'", "expected_accepted": true, "expected_output": "RRRBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RRRBBB'", "expected_accepted": true, "expected_output": "RRRBBB", "input": "BB" }, { "check_output": true, "description": "Input 'RBBB' β†’ mutated: 'RBBB' β†’ output: 'RRRBRBBB'", "expected_accepted": true, "expected_output": "RRRBRBBB", "input": "RBBB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'RRRBBBB'", "expected_accepted": true, "expected_output": "RRRBBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RRRBRRR'", "expected_accepted": true, "expected_output": "RRRBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BB' β†’ output: 'RRRBBB'", "expected_accepted": true, "expected_output": "RRRBBB", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBB' β†’ output: 'RRRBRBB'", "expected_accepted": true, "expected_output": "RRRBRBB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RRRBRRRR' β†’ mutated: 'RRRBRRR' β†’ output: 'RRRBRRRBRRR'", "expected_accepted": true, "expected_output": "RRRBRRRBRRR", "input": "RRRBRRRR" }, { "check_output": true, "description": "Input 'BRRBBBBRRRBB' β†’ mutated: 'BRBBBBRRBB' β†’ output: 'RRRBBRBBBBRRBB'", "expected_accepted": true, "expected_output": "RRRBBRBBBBRRBB", "input": "BRRBBBBRRRBB" } ]
manufactoria
hard
04af2f97-c770-4c57-be4d-9efb41a47c43
prepend_sequence
Prepend RRRB after Replace patterns BR with B
[ { "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 '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: '' β†’ output: 'BBBR'", "expected_accepted": true, "expected_output": "BBBR", "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: 'R' β†’ output: 'BBBRR'", "expected_accepted": true, "expected_output": "BBBRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'R' β†’ output: 'BBBRR'", "expected_accepted": true, "expected_output": "BBBRR", "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: 'B' β†’ output: 'BBBRB'", "expected_accepted": true, "expected_output": "BBBRB", "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 'RBRB' β†’ mutated: '' β†’ output: 'BBBR'", "expected_accepted": true, "expected_output": "BBBR", "input": "RBRB" }, { "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 'BRBR' β†’ mutated: 'BR' β†’ output: 'BBBRBR'", "expected_accepted": true, "expected_output": "BBBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'BRRRRRBB' β†’ mutated: 'BRRRRB' β†’ output: 'BBBRBRRRRB'", "expected_accepted": true, "expected_output": "BBBRBRRRRB", "input": "BRRRRRBB" }, { "check_output": true, "description": "Input 'BRRBBBRBBBRB' β†’ mutated: 'BRBBBB' β†’ output: 'BBBRBRBBBB'", "expected_accepted": true, "expected_output": "BBBRBRBBBB", "input": "BRRBBBRBBBRB" } ]
manufactoria
hard
c75a111f-e9ff-4f5f-b096-87f6418c6f61
prepend_sequence
Prepend BBBR 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 BB, 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: 'RB' β†’ output: 'BBBRRB'", "expected_accepted": true, "expected_output": "BBBRRB", "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: 'RBR' β†’ output: 'BBBRRBR'", "expected_accepted": true, "expected_output": "BBBRRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'BBB' β†’ output: 'BBBRBBB'", "expected_accepted": true, "expected_output": "BBBRBBB", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'BB' β†’ output: 'BBBRBB'", "expected_accepted": true, "expected_output": "BBBRBB", "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: 'BRB' β†’ output: 'BBBRBRB'", "expected_accepted": true, "expected_output": "BBBRBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BBBRB'", "expected_accepted": true, "expected_output": "BBBRB", "input": "B" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BBBRBB'", "expected_accepted": true, "expected_output": "BBBRBB", "input": "BB" }, { "check_output": true, "description": "Input 'BBRB' β†’ mutated: 'BBRB' β†’ output: 'BBBRBBRB'", "expected_accepted": true, "expected_output": "BBBRBBRB", "input": "BBRB" }, { "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: 'BBR' β†’ output: 'BBBRBBR'", "expected_accepted": true, "expected_output": "BBBRBBR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'BBBRBRBR'", "expected_accepted": true, "expected_output": "BBBRBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'BBBRRBRB'", "expected_accepted": true, "expected_output": "BBBRRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBBRBRRR' β†’ mutated: 'BBBRBBBR' β†’ output: 'BBBRBBBRBBBR'", "expected_accepted": true, "expected_output": "BBBRBBBRBBBR", "input": "BBBRBRRR" }, { "check_output": true, "description": "Input 'BRRRRBRBRRBB' β†’ mutated: 'BBBBBBRBBBBB' β†’ output: 'BBBRBBBBBBRBBBBB'", "expected_accepted": true, "expected_output": "BBBRBBBBBBRBBBBB", "input": "BRRRRBRBRRBB" } ]
manufactoria
hard
de0ad2e7-9ecd-428f-a5d7-b803aa04ab15
prepend_sequence
Prepend BBBR after Replace patterns RR 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 RR, then put 'BBR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BBR'", "expected_accepted": true, "expected_output": "BBR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BBRR'", "expected_accepted": true, "expected_output": "BBRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BBRRB'", "expected_accepted": true, "expected_output": "BBRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'BBRBBR'", "expected_accepted": true, "expected_output": "BBRBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBR' β†’ output: 'BBRRBR'", "expected_accepted": true, "expected_output": "BBRRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'B' β†’ output: 'BBRB'", "expected_accepted": true, "expected_output": "BBRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BBRB'", "expected_accepted": true, "expected_output": "BBRB", "input": "B" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'BBRBRB'", "expected_accepted": true, "expected_output": "BBRBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'BBRBR'", "expected_accepted": true, "expected_output": "BBRBR", "input": "BR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BBRBB'", "expected_accepted": true, "expected_output": "BBRBB", "input": "BB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: '' β†’ output: 'BBR'", "expected_accepted": true, "expected_output": "BBR", "input": "RR" }, { "check_output": true, "description": "Input 'RBBB' β†’ mutated: 'RBBB' β†’ output: 'BBRRBBB'", "expected_accepted": true, "expected_output": "BBRRBBB", "input": "RBBB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BBRBBB'", "expected_accepted": true, "expected_output": "BBRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'R' β†’ output: 'BBRR'", "expected_accepted": true, "expected_output": "BBRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'BBRBRBR'", "expected_accepted": true, "expected_output": "BBRBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'BBRRBRB'", "expected_accepted": true, "expected_output": "BBRRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RRBRBRRB' β†’ mutated: 'BRBB' β†’ output: 'BBRBRBB'", "expected_accepted": true, "expected_output": "BBRBRBB", "input": "RRBRBRRB" }, { "check_output": true, "description": "Input 'BRRBRBRBBRRR' β†’ mutated: 'BBRBRBBR' β†’ output: 'BBRBBRBRBBR'", "expected_accepted": true, "expected_output": "BBRBBRBRBBR", "input": "BRRBRBRBBRRR" } ]
manufactoria
hard
d8452551-6d5b-4d43-bfb9-67cd90f16dde
prepend_sequence
Prepend BBR after Remove patterns 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 RR with BB, 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: 'BBB' β†’ output: 'RBBBBBB'", "expected_accepted": true, "expected_output": "RBBBBBB", "input": "RRB" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'RBBBBRB'", "expected_accepted": true, "expected_output": "RBBBBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'RBBBBR'", "expected_accepted": true, "expected_output": "RBBBBR", "input": "BR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RBBBBB'", "expected_accepted": true, "expected_output": "RBBBBB", "input": "BB" }, { "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: 'BB' β†’ output: 'RBBBBB'", "expected_accepted": true, "expected_output": "RBBBBB", "input": "RR" }, { "check_output": true, "description": "Input 'BRRB' β†’ mutated: 'BBBB' β†’ output: 'RBBBBBBB'", "expected_accepted": true, "expected_output": "RBBBBBBB", "input": "BRRB" }, { "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: 'BBR' β†’ output: 'RBBBBBR'", "expected_accepted": true, "expected_output": "RBBBBBR", "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 'BBRBRRBR' β†’ mutated: 'BBRBBBBR' β†’ output: 'RBBBBBRBBBBR'", "expected_accepted": true, "expected_output": "RBBBBBRBBBBR", "input": "BBRBRRBR" }, { "check_output": true, "description": "Input 'RBRRRRRRRBRB' β†’ mutated: 'RBBBBBBBRBRB' β†’ output: 'RBBBRBBBBBBBRBRB'", "expected_accepted": true, "expected_output": "RBBBRBBBBBBBRBRB", "input": "RBRRRRRRRBRB" } ]
manufactoria
hard
5e309773-99e5-4072-ab52-74034a94c815
prepend_sequence
Prepend RBBB after Replace patterns RR 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\nReplace patterns BR with B, then put 'BRB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BRB'", "expected_accepted": true, "expected_output": "BRB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BRBR'", "expected_accepted": true, "expected_output": "BRBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BRBRB'", "expected_accepted": true, "expected_output": "BRBRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BB' β†’ output: 'BRBBB'", "expected_accepted": true, "expected_output": "BRBBB", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RB' β†’ output: 'BRBRB'", "expected_accepted": true, "expected_output": "BRBRB", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'BRBRRB'", "expected_accepted": true, "expected_output": "BRBRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BRBRR'", "expected_accepted": true, "expected_output": "BRBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'B' β†’ output: 'BRBB'", "expected_accepted": true, "expected_output": "BRBB", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BB' β†’ output: 'BRBBB'", "expected_accepted": true, "expected_output": "BRBBB", "input": "BRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BRBB'", "expected_accepted": true, "expected_output": "BRBB", "input": "B" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BRBBB'", "expected_accepted": true, "expected_output": "BRBBB", "input": "BB" }, { "check_output": true, "description": "Input 'RRBR' β†’ mutated: 'RRB' β†’ output: 'BRBRRB'", "expected_accepted": true, "expected_output": "BRBRRB", "input": "RRBR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BRBBBB'", "expected_accepted": true, "expected_output": "BRBBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BRBRRR'", "expected_accepted": true, "expected_output": "BRBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BB' β†’ output: 'BRBBB'", "expected_accepted": true, "expected_output": "BRBBB", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBB' β†’ output: 'BRBRBB'", "expected_accepted": true, "expected_output": "BRBRBB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RBBRBBRR' β†’ mutated: 'RBBBBR' β†’ output: 'BRBRBBBBR'", "expected_accepted": true, "expected_output": "BRBRBBBBR", "input": "RBBRBBRR" }, { "check_output": true, "description": "Input 'BBBBRBBBBBRB' β†’ mutated: 'BBBBBBBBBB' β†’ output: 'BRBBBBBBBBBBB'", "expected_accepted": true, "expected_output": "BRBBBBBBBBBBB", "input": "BBBBRBBBBBRB" } ]
manufactoria
hard
b53d0368-f0b5-41c6-879c-6e5f466674b0
prepend_sequence
Prepend BRB after Replace patterns BR with B
[ { "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 B, then put 'BRRR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BRRRRB'", "expected_accepted": true, "expected_output": "BRRRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BB' β†’ output: 'BRRRBB'", "expected_accepted": true, "expected_output": "BRRRBB", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RB' β†’ output: 'BRRRRB'", "expected_accepted": true, "expected_output": "BRRRRB", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'BRRRRRB'", "expected_accepted": true, "expected_output": "BRRRRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BRRRB'", "expected_accepted": true, "expected_output": "BRRRB", "input": "B" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BB' β†’ output: 'BRRRBB'", "expected_accepted": true, "expected_output": "BRRRBB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'B' β†’ output: 'BRRRB'", "expected_accepted": true, "expected_output": "BRRRB", "input": "BR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BRRRBB'", "expected_accepted": true, "expected_output": "BRRRBB", "input": "BB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BRRRRR'", "expected_accepted": true, "expected_output": "BRRRRR", "input": "RR" }, { "check_output": true, "description": "Input 'RRBR' β†’ mutated: 'RRB' β†’ output: 'BRRRRRB'", "expected_accepted": true, "expected_output": "BRRRRRB", "input": "RRBR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BRRRBBB'", "expected_accepted": true, "expected_output": "BRRRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BRRRRRR'", "expected_accepted": true, "expected_output": "BRRRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BB' β†’ output: 'BRRRBB'", "expected_accepted": true, "expected_output": "BRRRBB", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBB' β†’ output: 'BRRRRBB'", "expected_accepted": true, "expected_output": "BRRRRBB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBBBBBBB' β†’ mutated: 'BBBBBBBB' β†’ output: 'BRRRBBBBBBBB'", "expected_accepted": true, "expected_output": "BRRRBBBBBBBB", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBRRRRRBRBRB' β†’ mutated: 'BBRRRRBBB' β†’ output: 'BRRRBBRRRRBBB'", "expected_accepted": true, "expected_output": "BRRRBBRRRRBBB", "input": "BBRRRRRBRBRB" } ]
manufactoria
hard
1ce196c1-e5be-4ab2-945e-ce5919daff71
prepend_sequence
Prepend BRRR after Replace patterns BR with B
[ { "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 'RBRB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RBRB'", "expected_accepted": true, "expected_output": "RBRB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RBRBR'", "expected_accepted": true, "expected_output": "RBRBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'BR' β†’ output: 'RBRBBR'", "expected_accepted": true, "expected_output": "RBRBBR", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'RBRBBBR'", "expected_accepted": true, "expected_output": "RBRBBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'BRR' β†’ output: 'RBRBBRR'", "expected_accepted": true, "expected_output": "RBRBBRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RBR' β†’ output: 'RBRBRBR'", "expected_accepted": true, "expected_output": "RBRBRBR", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RBRBB'", "expected_accepted": true, "expected_output": "RBRBB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RBRBRR'", "expected_accepted": true, "expected_output": "RBRBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'RBRBBR'", "expected_accepted": true, "expected_output": "RBRBBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BBR' β†’ output: 'RBRBBBR'", "expected_accepted": true, "expected_output": "RBRBBBR", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RBRBBB'", "expected_accepted": true, "expected_output": "RBRBBB", "input": "BB" }, { "check_output": true, "description": "Input 'RBBR' β†’ mutated: 'BRBR' β†’ output: 'RBRBBRBR'", "expected_accepted": true, "expected_output": "RBRBBRBR", "input": "RBBR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'RBRBBBB'", "expected_accepted": true, "expected_output": "RBRBBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RBRBRRR'", "expected_accepted": true, "expected_output": "RBRBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BBRR' β†’ output: 'RBRBBBRR'", "expected_accepted": true, "expected_output": "RBRBBBRR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'BRBR' β†’ output: 'RBRBBRBR'", "expected_accepted": true, "expected_output": "RBRBBRBR", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRRBBRRB' β†’ mutated: 'BRBRBRBR' β†’ output: 'RBRBBRBRBRBR'", "expected_accepted": true, "expected_output": "RBRBBRBRBRBR", "input": "BRRBBRRB" }, { "check_output": true, "description": "Input 'BRBBBBBRRRRR' β†’ mutated: 'BBRBBBBRRRRR' β†’ output: 'RBRBBBRBBBBRRRRR'", "expected_accepted": true, "expected_output": "RBRBBBRBBBBRRRRR", "input": "BRBBBBBRRRRR" } ]
manufactoria
hard
e17f4213-69d3-4033-b206-a92ee017f5b0
prepend_sequence
Prepend RBRB 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 BR with R, then put 'BRR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BRRRB'", "expected_accepted": true, "expected_output": "BRRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BR' β†’ output: 'BRRBR'", "expected_accepted": true, "expected_output": "BRRBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RR' β†’ output: 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'BRRRRB'", "expected_accepted": true, "expected_output": "BRRRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BRRB'", "expected_accepted": true, "expected_output": "BRRB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'R' β†’ output: 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'RB' β†’ output: 'BRRRB'", "expected_accepted": true, "expected_output": "BRRRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BRRBB'", "expected_accepted": true, "expected_output": "BRRBB", "input": "BB" }, { "check_output": true, "description": "Input 'BBRR' β†’ mutated: 'BRR' β†’ output: 'BRRBRR'", "expected_accepted": true, "expected_output": "BRRBRR", "input": "BBRR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BRRBBB'", "expected_accepted": true, "expected_output": "BRRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BRRRRR'", "expected_accepted": true, "expected_output": "BRRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'RR' β†’ output: 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RRB' β†’ output: 'BRRRRB'", "expected_accepted": true, "expected_output": "BRRRRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RBBRBRRB' β†’ mutated: 'RBRRRB' β†’ output: 'BRRRBRRRB'", "expected_accepted": true, "expected_output": "BRRRBRRRB", "input": "RBBRBRRB" }, { "check_output": true, "description": "Input 'BBBRRRRBRRBR' β†’ mutated: 'BBRRRRRRR' β†’ output: 'BRRBBRRRRRRR'", "expected_accepted": true, "expected_output": "BRRBBRRRRRRR", "input": "BBBRRRRBRRBR" } ]
manufactoria
hard
ca05f7d0-2605-480c-a7d3-94f88f3e1d11
prepend_sequence
Prepend BRR after Replace patterns BR 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\nRemove patterns RB, then put 'RRRR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RRRR'", "expected_accepted": true, "expected_output": "RRRR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RRRRR'", "expected_accepted": true, "expected_output": "RRRRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: '' β†’ output: 'RRRR'", "expected_accepted": true, "expected_output": "RRRR", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'RRRRBBR'", "expected_accepted": true, "expected_output": "RRRRBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'R' β†’ output: 'RRRRR'", "expected_accepted": true, "expected_output": "RRRRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'R' β†’ output: 'RRRRR'", "expected_accepted": true, "expected_output": "RRRRR", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RRRRB'", "expected_accepted": true, "expected_output": "RRRRB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RRRRRR'", "expected_accepted": true, "expected_output": "RRRRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'RRRRBR'", "expected_accepted": true, "expected_output": "RRRRBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'B' β†’ output: 'RRRRB'", "expected_accepted": true, "expected_output": "RRRRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RRRRBB'", "expected_accepted": true, "expected_output": "RRRRBB", "input": "BB" }, { "check_output": true, "description": "Input 'RBRR' β†’ mutated: 'RR' β†’ output: 'RRRRRR'", "expected_accepted": true, "expected_output": "RRRRRR", "input": "RBRR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'RRRRBBB'", "expected_accepted": true, "expected_output": "RRRRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RRRRRRR'", "expected_accepted": true, "expected_output": "RRRRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BR' β†’ output: 'RRRRBR'", "expected_accepted": true, "expected_output": "RRRRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: '' β†’ output: 'RRRR'", "expected_accepted": true, "expected_output": "RRRR", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRRBBBBB' β†’ mutated: 'BRBBBB' β†’ output: 'RRRRBRBBBB'", "expected_accepted": true, "expected_output": "RRRRBRBBBB", "input": "BRRBBBBB" }, { "check_output": true, "description": "Input 'RRBBBBRRRRRB' β†’ mutated: 'RBBBRRRR' β†’ output: 'RRRRRBBBRRRR'", "expected_accepted": true, "expected_output": "RRRRRBBBRRRR", "input": "RRBBBBRRRRRB" } ]
manufactoria
hard
144b0e0b-2429-478b-9b81-29e3428b829f
prepend_sequence
Prepend RRRR 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 B, then put 'BRR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BRRRB'", "expected_accepted": true, "expected_output": "BRRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'BRRBBR'", "expected_accepted": true, "expected_output": "BRRBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBR' β†’ output: 'BRRRBR'", "expected_accepted": true, "expected_output": "BRRRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'BB' β†’ output: 'BRRBB'", "expected_accepted": true, "expected_output": "BRRBB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BRRB'", "expected_accepted": true, "expected_output": "BRRB", "input": "B" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'BRRBRB'", "expected_accepted": true, "expected_output": "BRRBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'BRRBR'", "expected_accepted": true, "expected_output": "BRRBR", "input": "BR" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'B' β†’ output: 'BRRB'", "expected_accepted": true, "expected_output": "BRRB", "input": "RR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BRRBB'", "expected_accepted": true, "expected_output": "BRRBB", "input": "BB" }, { "check_output": true, "description": "Input 'RBBR' β†’ mutated: 'RBBR' β†’ output: 'BRRRBBR'", "expected_accepted": true, "expected_output": "BRRRBBR", "input": "RBBR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BRRBBB'", "expected_accepted": true, "expected_output": "BRRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'BR' β†’ output: 'BRRBR'", "expected_accepted": true, "expected_output": "BRRBR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'BRRBRBR'", "expected_accepted": true, "expected_output": "BRRBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'BRRRBRB'", "expected_accepted": true, "expected_output": "BRRRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RRBBRBRB' β†’ mutated: 'BBBRBRB' β†’ output: 'BRRBBBRBRB'", "expected_accepted": true, "expected_output": "BRRBBBRBRB", "input": "RRBBRBRB" }, { "check_output": true, "description": "Input 'BBRBBBRBRBBR' β†’ mutated: 'BBRBBBRBRBBR' β†’ output: 'BRRBBRBBBRBRBBR'", "expected_accepted": true, "expected_output": "BRRBBRBBBRBRBBR", "input": "BBRBBBRBRBBR" } ]
manufactoria
hard
94c0b61e-6447-4288-b5bc-e171d51086f3
prepend_sequence
Prepend BRR after Replace patterns RR with B
[ { "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 B, then put 'BRB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BRB'", "expected_accepted": true, "expected_output": "BRB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BRBR'", "expected_accepted": true, "expected_output": "BRBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BRBRB'", "expected_accepted": true, "expected_output": "BRBRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BR' β†’ output: 'BRBBR'", "expected_accepted": true, "expected_output": "BRBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBR' β†’ output: 'BRBRBR'", "expected_accepted": true, "expected_output": "BRBRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'BRBRRB'", "expected_accepted": true, "expected_output": "BRBRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BRBB'", "expected_accepted": true, "expected_output": "BRBB", "input": "B" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'BRBBRB'", "expected_accepted": true, "expected_output": "BRBBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'BRBBR'", "expected_accepted": true, "expected_output": "BRBBR", "input": "BR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'B' β†’ output: 'BRBB'", "expected_accepted": true, "expected_output": "BRBB", "input": "BB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BRBRR'", "expected_accepted": true, "expected_output": "BRBRR", "input": "RR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'BRBRBRB'", "expected_accepted": true, "expected_output": "BRBRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BB' β†’ output: 'BRBBB'", "expected_accepted": true, "expected_output": "BRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BRBRRR'", "expected_accepted": true, "expected_output": "BRBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'BRBBRBR'", "expected_accepted": true, "expected_output": "BRBBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'BRRBBRRR' β†’ mutated: 'BRRBRRR' β†’ output: 'BRBBRRBRRR'", "expected_accepted": true, "expected_output": "BRBBRRBRRR", "input": "BRRBBRRR" }, { "check_output": true, "description": "Input 'BRRRBRBBBRRB' β†’ mutated: 'BRRRBRBBRRB' β†’ output: 'BRBBRRRBRBBRRB'", "expected_accepted": true, "expected_output": "BRBBRRRBRBBRRB", "input": "BRRRBRBBBRRB" } ]
manufactoria
hard
1c5c75ca-da23-48a2-9f0a-5d65e79a970d
prepend_sequence
Prepend BRB after Replace patterns BB with B
[ { "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 R, then put 'B' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'B'", "expected_accepted": true, "expected_output": "B", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BRB'", "expected_accepted": true, "expected_output": "BRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BR' β†’ output: 'BBR'", "expected_accepted": true, "expected_output": "BBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RR' β†’ output: 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'BRRB'", "expected_accepted": true, "expected_output": "BRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'R' β†’ output: 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'RB' β†’ output: 'BRB'", "expected_accepted": true, "expected_output": "BRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BBB'", "expected_accepted": true, "expected_output": "BBB", "input": "BB" }, { "check_output": true, "description": "Input 'RBBR' β†’ mutated: 'RBR' β†’ output: 'BRBR'", "expected_accepted": true, "expected_output": "BRBR", "input": "RBBR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BBBB'", "expected_accepted": true, "expected_output": "BBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'RR' β†’ output: 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RRB' β†’ output: 'BRRB'", "expected_accepted": true, "expected_output": "BRRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRBBBRRR' β†’ mutated: 'RBBRRR' β†’ output: 'BRBBRRR'", "expected_accepted": true, "expected_output": "BRBBRRR", "input": "BRBBBRRR" }, { "check_output": true, "description": "Input 'BBBBRBBRRBRR' β†’ mutated: 'BBBRBRRRR' β†’ output: 'BBBBRBRRRR'", "expected_accepted": true, "expected_output": "BBBBRBRRRR", "input": "BBBBRBBRRBRR" } ]
manufactoria
hard
9966e5a6-33ba-4a07-9b9e-8243b81665a6
prepend_sequence
Prepend B after Replace patterns BR 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\nRemove patterns BB, then put 'BRR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BRRRB'", "expected_accepted": true, "expected_output": "BRRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'R' β†’ output: 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBR' β†’ output: 'BRRRBR'", "expected_accepted": true, "expected_output": "BRRRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'BRRRRB'", "expected_accepted": true, "expected_output": "BRRRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BRRB'", "expected_accepted": true, "expected_output": "BRRB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'BRRBR'", "expected_accepted": true, "expected_output": "BRRBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'BRRBRB'", "expected_accepted": true, "expected_output": "BRRBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: '' β†’ output: 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "BB" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'BRRRBRB'", "expected_accepted": true, "expected_output": "BRRRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'B' β†’ output: 'BRRB'", "expected_accepted": true, "expected_output": "BRRB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BRRRRR'", "expected_accepted": true, "expected_output": "BRRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'BRRBRBR'", "expected_accepted": true, "expected_output": "BRRBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RRRRRBBR' β†’ mutated: 'RRRRRR' β†’ output: 'BRRRRRRRR'", "expected_accepted": true, "expected_output": "BRRRRRRRR", "input": "RRRRRBBR" }, { "check_output": true, "description": "Input 'BRRRBBBRBBRR' β†’ mutated: 'BRRRBRRR' β†’ output: 'BRRBRRRBRRR'", "expected_accepted": true, "expected_output": "BRRBRRRBRRR", "input": "BRRRBBBRBBRR" } ]
manufactoria
hard
75a009a7-4e7d-4364-a642-e8309517d311
prepend_sequence
Prepend BRR after Remove patterns 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 BB, 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: 'R' β†’ output: 'RBBBR'", "expected_accepted": true, "expected_output": "RBBBR", "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: 'RRB' β†’ output: 'RBBBRRB'", "expected_accepted": true, "expected_output": "RBBBRRB", "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 'BRB' β†’ mutated: 'BRB' β†’ output: 'RBBBBRB'", "expected_accepted": true, "expected_output": "RBBBBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'RBBBBR'", "expected_accepted": true, "expected_output": "RBBBBR", "input": "BR" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RBBBRR'", "expected_accepted": true, "expected_output": "RBBBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: '' β†’ output: 'RBBB'", "expected_accepted": true, "expected_output": "RBBB", "input": "BB" }, { "check_output": true, "description": "Input 'RRBR' β†’ mutated: 'RRBR' β†’ output: 'RBBBRRBR'", "expected_accepted": true, "expected_output": "RBBBRRBR", "input": "RRBR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'B' β†’ output: 'RBBBB'", "expected_accepted": true, "expected_output": "RBBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RBBBRRR'", "expected_accepted": true, "expected_output": "RBBBRRR", "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 'RRRRBRBB' β†’ mutated: 'RRRRBR' β†’ output: 'RBBBRRRRBR'", "expected_accepted": true, "expected_output": "RBBBRRRRBR", "input": "RRRRBRBB" }, { "check_output": true, "description": "Input 'BRBBBBRRBRBB' β†’ mutated: 'BRRRBR' β†’ output: 'RBBBBRRRBR'", "expected_accepted": true, "expected_output": "RBBBBRRRBR", "input": "BRBBBBRRBRBB" } ]
manufactoria
hard
814960f5-b615-47be-b3bf-ac22bd9af7ed
prepend_sequence
Prepend RBBB after Remove patterns 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\nReplace patterns BB with RB, then put 'BR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BRRB'", "expected_accepted": true, "expected_output": "BRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'RBR' β†’ output: 'BRRBR'", "expected_accepted": true, "expected_output": "BRRBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBR' β†’ output: 'BRRBR'", "expected_accepted": true, "expected_output": "BRRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'BRBR'", "expected_accepted": true, "expected_output": "BRBR", "input": "BR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'BRRRB'", "expected_accepted": true, "expected_output": "BRRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'BRBRB'", "expected_accepted": true, "expected_output": "BRBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "RR" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BRB'", "expected_accepted": true, "expected_output": "BRB", "input": "B" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'RB' β†’ output: 'BRRB'", "expected_accepted": true, "expected_output": "BRRB", "input": "BB" }, { "check_output": true, "description": "Input 'BRBB' β†’ mutated: 'BRRB' β†’ output: 'BRBRRB'", "expected_accepted": true, "expected_output": "BRBRRB", "input": "BRBB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'RBB' β†’ output: 'BRRBB'", "expected_accepted": true, "expected_output": "BRRBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'BRBRBR'", "expected_accepted": true, "expected_output": "BRBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'BRRBRB'", "expected_accepted": true, "expected_output": "BRRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RRRBBBBR' β†’ mutated: 'RRRRBRBR' β†’ output: 'BRRRRRBRBR'", "expected_accepted": true, "expected_output": "BRRRRRBRBR", "input": "RRRBBBBR" }, { "check_output": true, "description": "Input 'RBBRRRBRRRBR' β†’ mutated: 'RRBRRRBRRRBR' β†’ output: 'BRRRBRRRBRRRBR'", "expected_accepted": true, "expected_output": "BRRRBRRRBRRRBR", "input": "RBBRRRBRRRBR" } ]
manufactoria
hard
d66468d6-9efa-40bb-b088-91a796856ca3
prepend_sequence
Prepend BR 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 RB with BR, then put 'RRBB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RRBB'", "expected_accepted": true, "expected_output": "RRBB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RRBBR'", "expected_accepted": true, "expected_output": "RRBBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'BR' β†’ output: 'RRBBBR'", "expected_accepted": true, "expected_output": "RRBBBR", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'RRBBBBR'", "expected_accepted": true, "expected_output": "RRBBBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'BRR' β†’ output: 'RRBBBRR'", "expected_accepted": true, "expected_output": "RRBBBRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RBR' β†’ output: 'RRBBRBR'", "expected_accepted": true, "expected_output": "RRBBRBR", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RRBBB'", "expected_accepted": true, "expected_output": "RRBBB", "input": "B" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BBR' β†’ output: 'RRBBBBR'", "expected_accepted": true, "expected_output": "RRBBBBR", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'RRBBBR'", "expected_accepted": true, "expected_output": "RRBBBR", "input": "BR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RRBBBB'", "expected_accepted": true, "expected_output": "RRBBBB", "input": "BB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RRBBRR'", "expected_accepted": true, "expected_output": "RRBBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BRRR' β†’ mutated: 'BRRR' β†’ output: 'RRBBBRRR'", "expected_accepted": true, "expected_output": "RRBBBRRR", "input": "BRRR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'RRBBBBB'", "expected_accepted": true, "expected_output": "RRBBBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RRBBRRR'", "expected_accepted": true, "expected_output": "RRBBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BBRR' β†’ output: 'RRBBBBRR'", "expected_accepted": true, "expected_output": "RRBBBBRR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'BRBR' β†’ output: 'RRBBBRBR'", "expected_accepted": true, "expected_output": "RRBBBRBR", "input": "RBRB" }, { "check_output": true, "description": "Input 'RBBRRBBB' β†’ mutated: 'BRBRBRBB' β†’ output: 'RRBBBRBRBRBB'", "expected_accepted": true, "expected_output": "RRBBBRBRBRBB", "input": "RBBRRBBB" }, { "check_output": true, "description": "Input 'RRBRRRBRBBRR' β†’ mutated: 'RBRRRBRBRBRR' β†’ output: 'RRBBRBRRRBRBRBRR'", "expected_accepted": true, "expected_output": "RRBBRBRRRBRBRBRR", "input": "RRBRRRBRBBRR" } ]
manufactoria
hard
b95e19ab-72f0-47af-8660-89bab8cac20f
prepend_sequence
Prepend RRBB 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\nRemove patterns RB, 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: '' β†’ output: 'RBBB'", "expected_accepted": true, "expected_output": "RBBB", "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: 'R' β†’ output: 'RBBBR'", "expected_accepted": true, "expected_output": "RBBBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'R' β†’ output: 'RBBBR'", "expected_accepted": true, "expected_output": "RBBBR", "input": "RRB" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'B' β†’ output: 'RBBBB'", "expected_accepted": true, "expected_output": "RBBBB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'RBBBBR'", "expected_accepted": true, "expected_output": "RBBBBR", "input": "BR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RBBBBB'", "expected_accepted": true, "expected_output": "RBBBBB", "input": "BB" }, { "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: 'RR' β†’ output: 'RBBBRR'", "expected_accepted": true, "expected_output": "RBBBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BBBB' β†’ mutated: 'BBBB' β†’ output: 'RBBBBBBB'", "expected_accepted": true, "expected_output": "RBBBBBBB", "input": "BBBB" }, { "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: 'RRR' β†’ output: 'RBBBRRR'", "expected_accepted": true, "expected_output": "RBBBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BR' β†’ output: 'RBBBBR'", "expected_accepted": true, "expected_output": "RBBBBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: '' β†’ output: 'RBBB'", "expected_accepted": true, "expected_output": "RBBB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RBRBRBRB' β†’ mutated: '' β†’ output: 'RBBB'", "expected_accepted": true, "expected_output": "RBBB", "input": "RBRBRBRB" }, { "check_output": true, "description": "Input 'BRRRBRRRRRBR' β†’ mutated: 'BRRRRRRR' β†’ output: 'RBBBBRRRRRRR'", "expected_accepted": true, "expected_output": "RBBBBRRRRRRR", "input": "BRRRBRRRRRBR" } ]
manufactoria
hard
2f3e8315-b244-42d4-bcf9-9fc3048a1b17
prepend_sequence
Prepend RBBB 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 BR with RB, then put 'BBRR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BBRR'", "expected_accepted": true, "expected_output": "BBRR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BBRRR'", "expected_accepted": true, "expected_output": "BBRRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BBRRRB'", "expected_accepted": true, "expected_output": "BBRRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BRB' β†’ output: 'BBRRBRB'", "expected_accepted": true, "expected_output": "BBRRBRB", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RRB' β†’ output: 'BBRRRRB'", "expected_accepted": true, "expected_output": "BBRRRRB", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'BBRRRRB'", "expected_accepted": true, "expected_output": "BBRRRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'RBB' β†’ output: 'BBRRRBB'", "expected_accepted": true, "expected_output": "BBRRRBB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'RB' β†’ output: 'BBRRRB'", "expected_accepted": true, "expected_output": "BBRRRB", "input": "BR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BBRRBB'", "expected_accepted": true, "expected_output": "BBRRBB", "input": "BB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BBRRB'", "expected_accepted": true, "expected_output": "BBRRB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BBRRRR'", "expected_accepted": true, "expected_output": "BBRRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BRRB' β†’ mutated: 'RBRB' β†’ output: 'BBRRRBRB'", "expected_accepted": true, "expected_output": "BBRRRBRB", "input": "BRRB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BBRRBBB'", "expected_accepted": true, "expected_output": "BBRRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BBRRRRR'", "expected_accepted": true, "expected_output": "BBRRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'RBRB' β†’ output: 'BBRRRBRB'", "expected_accepted": true, "expected_output": "BBRRRBRB", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RRBB' β†’ output: 'BBRRRRBB'", "expected_accepted": true, "expected_output": "BBRRRRBB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRRBBRBB' β†’ mutated: 'RBRBRBBB' β†’ output: 'BBRRRBRBRBBB'", "expected_accepted": true, "expected_output": "BBRRRBRBRBBB", "input": "BRRBBRBB" }, { "check_output": true, "description": "Input 'RRRBBBRRRBBB' β†’ mutated: 'RRRBBRBRRBBB' β†’ output: 'BBRRRRRBBRBRRBBB'", "expected_accepted": true, "expected_output": "BBRRRRRBBRBRRBBB", "input": "RRRBBBRRRBBB" } ]
manufactoria
hard
5fa08cf9-f2d6-49a4-82be-f434c5c98792
prepend_sequence
Prepend BBRR after Replace patterns BR 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 BR with RB, 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: 'BRB' β†’ output: 'RBBBBRB'", "expected_accepted": true, "expected_output": "RBBBBRB", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RRB' β†’ output: 'RBBBRRB'", "expected_accepted": true, "expected_output": "RBBBRRB", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'RBBBRRB'", "expected_accepted": true, "expected_output": "RBBBRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'RBB' β†’ output: 'RBBBRBB'", "expected_accepted": true, "expected_output": "RBBBRBB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'RB' β†’ output: 'RBBBRB'", "expected_accepted": true, "expected_output": "RBBBRB", "input": "BR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RBBBBB'", "expected_accepted": true, "expected_output": "RBBBBB", "input": "BB" }, { "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: 'RR' β†’ output: 'RBBBRR'", "expected_accepted": true, "expected_output": "RBBBRR", "input": "RR" }, { "check_output": true, "description": "Input 'RRBB' β†’ mutated: 'RRBB' β†’ output: 'RBBBRRBB'", "expected_accepted": true, "expected_output": "RBBBRRBB", "input": "RRBB" }, { "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: 'RRR' β†’ output: 'RBBBRRR'", "expected_accepted": true, "expected_output": "RBBBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'RBRB' β†’ output: 'RBBBRBRB'", "expected_accepted": true, "expected_output": "RBBBRBRB", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RRBB' β†’ output: 'RBBBRRBB'", "expected_accepted": true, "expected_output": "RBBBRRBB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRRBRBBR' β†’ mutated: 'RBRRBBRB' β†’ output: 'RBBBRBRRBBRB'", "expected_accepted": true, "expected_output": "RBBBRBRRBBRB", "input": "BRRBRBBR" }, { "check_output": true, "description": "Input 'BRRBRRBRRRBB' β†’ mutated: 'RBRRBRRBRRBB' β†’ output: 'RBBBRBRRBRRBRRBB'", "expected_accepted": true, "expected_output": "RBBBRBRRBRRBRRBB", "input": "BRRBRRBRRRBB" } ]
manufactoria
hard
9361c881-8aa9-41e8-b578-c4e899e7516b
prepend_sequence
Prepend RBBB after Replace patterns BR 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 RB with RR, 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: 'RR' β†’ output: 'RRRR'", "expected_accepted": true, "expected_output": "RRRR", "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: 'RRR' β†’ output: 'RRRRR'", "expected_accepted": true, "expected_output": "RRRRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRR' β†’ output: 'RRRRR'", "expected_accepted": true, "expected_output": "RRRRR", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RRB'", "expected_accepted": true, "expected_output": "RRB", "input": "B" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRR' β†’ output: 'RRBRR'", "expected_accepted": true, "expected_output": "RRBRR", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'RRBR'", "expected_accepted": true, "expected_output": "RRBR", "input": "BR" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RRRR'", "expected_accepted": true, "expected_output": "RRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RRBB'", "expected_accepted": true, "expected_output": "RRBB", "input": "BB" }, { "check_output": true, "description": "Input 'RRBB' β†’ mutated: 'RRRB' β†’ output: 'RRRRRB'", "expected_accepted": true, "expected_output": "RRRRRB", "input": "RRBB" }, { "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: 'BRRR' β†’ output: 'RRBRRR'", "expected_accepted": true, "expected_output": "RRBRRR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RRRR' β†’ output: 'RRRRRR'", "expected_accepted": true, "expected_output": "RRRRRR", "input": "RBRB" }, { "check_output": true, "description": "Input 'RRBBRRRR' β†’ mutated: 'RRRBRRRR' β†’ output: 'RRRRRBRRRR'", "expected_accepted": true, "expected_output": "RRRRRBRRRR", "input": "RRBBRRRR" }, { "check_output": true, "description": "Input 'BBRBBBBBRRRB' β†’ mutated: 'BBRRBBBBRRRR' β†’ output: 'RRBBRRBBBBRRRR'", "expected_accepted": true, "expected_output": "RRBBRRBBBBRRRR", "input": "BBRBBBBBRRRB" } ]
manufactoria
hard
6a4b7944-75ca-4edc-a5a9-b7e7112aacbe
prepend_sequence
Prepend RR 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 RR, 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: 'RR' β†’ output: 'BRBBRR'", "expected_accepted": true, "expected_output": "BRBBRR", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'BRBBBBR'", "expected_accepted": true, "expected_output": "BRBBBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RRR' β†’ output: 'BRBBRRR'", "expected_accepted": true, "expected_output": "BRBBRRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRR' β†’ output: 'BRBBRRR'", "expected_accepted": true, "expected_output": "BRBBRRR", "input": "RRB" }, { "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: 'BRR' β†’ output: 'BRBBBRR'", "expected_accepted": true, "expected_output": "BRBBBRR", "input": "BRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BRBBB'", "expected_accepted": true, "expected_output": "BRBBB", "input": "B" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BRBBBB'", "expected_accepted": true, "expected_output": "BRBBBB", "input": "BB" }, { "check_output": true, "description": "Input 'RRRB' β†’ mutated: 'RRRR' β†’ output: 'BRBBRRRR'", "expected_accepted": true, "expected_output": "BRBBRRRR", "input": "RRRB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BRBBBBB'", "expected_accepted": true, "expected_output": "BRBBBBB", "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: 'BRRR' β†’ output: 'BRBBBRRR'", "expected_accepted": true, "expected_output": "BRBBBRRR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RRRR' β†’ output: 'BRBBRRRR'", "expected_accepted": true, "expected_output": "BRBBRRRR", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBBBRBBR' β†’ mutated: 'BBBBRRBR' β†’ output: 'BRBBBBBBRRBR'", "expected_accepted": true, "expected_output": "BRBBBBBBRRBR", "input": "BBBBRBBR" }, { "check_output": true, "description": "Input 'RBBBRBRRRRRB' β†’ mutated: 'RRBBRRRRRRRR' β†’ output: 'BRBBRRBBRRRRRRRR'", "expected_accepted": true, "expected_output": "BRBBRRBBRRRRRRRR", "input": "RBBBRBRRRRRB" } ]
manufactoria
hard
5a8e21bf-c6d4-4387-9c26-8e76e22dc22b
prepend_sequence
Prepend BRBB 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 BR 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: 'BR' β†’ output: 'BBBR'", "expected_accepted": true, "expected_output": "BBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RR' β†’ output: 'BBRR'", "expected_accepted": true, "expected_output": "BBRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'BBRRB'", "expected_accepted": true, "expected_output": "BBRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BBRR'", "expected_accepted": true, "expected_output": "BBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'R' β†’ output: 'BBR'", "expected_accepted": true, "expected_output": "BBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'RB' β†’ output: 'BBRB'", "expected_accepted": true, "expected_output": "BBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BBB'", "expected_accepted": true, "expected_output": "BBB", "input": "B" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BBBB'", "expected_accepted": true, "expected_output": "BBBB", "input": "BB" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RRB' β†’ output: 'BBRRB'", "expected_accepted": true, "expected_output": "BBRRB", "input": "RBRB" }, { "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: 'RR' β†’ output: 'BBRR'", "expected_accepted": true, "expected_output": "BBRR", "input": "BRBR" }, { "check_output": true, "description": "Input 'BRBRRRRB' β†’ mutated: 'RRRRRB' β†’ output: 'BBRRRRRB'", "expected_accepted": true, "expected_output": "BBRRRRRB", "input": "BRBRRRRB" }, { "check_output": true, "description": "Input 'BRBRRBBRBBBB' β†’ mutated: 'RRRBRBBBB' β†’ output: 'BBRRRBRBBBB'", "expected_accepted": true, "expected_output": "BBRRRBRBBBB", "input": "BRBRRBBRBBBB" } ]
manufactoria
hard
7cda4f48-1a66-4343-8793-c6bd1c1a7fcd
prepend_sequence
Prepend BB after Replace patterns BR 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 R, 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: 'R' β†’ output: 'RBRR'", "expected_accepted": true, "expected_output": "RBRR", "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: 'RR' β†’ output: 'RBRRR'", "expected_accepted": true, "expected_output": "RBRRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RR' β†’ output: 'RBRRR'", "expected_accepted": true, "expected_output": "RBRRR", "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: 'BR' β†’ output: 'RBRBR'", "expected_accepted": true, "expected_output": "RBRBR", "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 'BBRB' β†’ mutated: 'BBR' β†’ output: 'RBRBBR'", "expected_accepted": true, "expected_output": "RBRBBR", "input": "BBRB" }, { "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: 'BRR' β†’ output: 'RBRBRR'", "expected_accepted": true, "expected_output": "RBRBRR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RR' β†’ output: 'RBRRR'", "expected_accepted": true, "expected_output": "RBRRR", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRBRBBRB' β†’ mutated: 'BRRBR' β†’ output: 'RBRBRRBR'", "expected_accepted": true, "expected_output": "RBRBRRBR", "input": "BRBRBBRB" }, { "check_output": true, "description": "Input 'RRRRRBBRRRRR' β†’ mutated: 'RRRRRBRRRRR' β†’ output: 'RBRRRRRRBRRRRR'", "expected_accepted": true, "expected_output": "RBRRRRRRBRRRRR", "input": "RRRRRBBRRRRR" } ]
manufactoria
hard
564f79ad-a46d-4591-b6b3-2dd54da3e155
prepend_sequence
Prepend RBR after Replace patterns RB 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\nRemove patterns RB, then put 'RRB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RRB'", "expected_accepted": true, "expected_output": "RRB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RRBR'", "expected_accepted": true, "expected_output": "RRBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: '' β†’ output: 'RRB'", "expected_accepted": true, "expected_output": "RRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'RRBBBR'", "expected_accepted": true, "expected_output": "RRBBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'R' β†’ output: 'RRBR'", "expected_accepted": true, "expected_output": "RRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'R' β†’ output: 'RRBR'", "expected_accepted": true, "expected_output": "RRBR", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RRBRR'", "expected_accepted": true, "expected_output": "RRBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'RRBBR'", "expected_accepted": true, "expected_output": "RRBBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'B' β†’ output: 'RRBB'", "expected_accepted": true, "expected_output": "RRBB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RRBBB'", "expected_accepted": true, "expected_output": "RRBBB", "input": "BB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RRBB'", "expected_accepted": true, "expected_output": "RRBB", "input": "B" }, { "check_output": true, "description": "Input 'BRBB' β†’ mutated: 'BB' β†’ output: 'RRBBB'", "expected_accepted": true, "expected_output": "RRBBB", "input": "BRBB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'RRBBBB'", "expected_accepted": true, "expected_output": "RRBBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RRBRRR'", "expected_accepted": true, "expected_output": "RRBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BR' β†’ output: 'RRBBR'", "expected_accepted": true, "expected_output": "RRBBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: '' β†’ output: 'RRB'", "expected_accepted": true, "expected_output": "RRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RBRBRBRB' β†’ mutated: '' β†’ output: 'RRB'", "expected_accepted": true, "expected_output": "RRB", "input": "RBRBRBRB" }, { "check_output": true, "description": "Input 'RBBBRRRRRRBB' β†’ mutated: 'BBRRRRRB' β†’ output: 'RRBBBRRRRRB'", "expected_accepted": true, "expected_output": "RRBBBRRRRRB", "input": "RBBBRRRRRRBB" } ]
manufactoria
hard
37b3d8e2-ec25-46a8-b4b0-e34077866ece
prepend_sequence
Prepend RRB 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\nRemove patterns RB, then put 'BR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: '' β†’ output: 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'BRBBR'", "expected_accepted": true, "expected_output": "BRBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'R' β†’ output: 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'R' β†’ output: 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BRB'", "expected_accepted": true, "expected_output": "BRB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'BRBR'", "expected_accepted": true, "expected_output": "BRBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'B' β†’ output: 'BRB'", "expected_accepted": true, "expected_output": "BRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BRBB'", "expected_accepted": true, "expected_output": "BRBB", "input": "BB" }, { "check_output": true, "description": "Input 'BBBB' β†’ mutated: 'BBBB' β†’ output: 'BRBBBB'", "expected_accepted": true, "expected_output": "BRBBBB", "input": "BBBB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BRBBB'", "expected_accepted": true, "expected_output": "BRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BR' β†’ output: 'BRBR'", "expected_accepted": true, "expected_output": "BRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: '' β†’ output: 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRBRBBRR' β†’ mutated: 'BBRR' β†’ output: 'BRBBRR'", "expected_accepted": true, "expected_output": "BRBBRR", "input": "BRBRBBRR" }, { "check_output": true, "description": "Input 'BRBBRBBBBRRB' β†’ mutated: 'BBBBBR' β†’ output: 'BRBBBBBR'", "expected_accepted": true, "expected_output": "BRBBBBBR", "input": "BRBBRBBBBRRB" } ]
manufactoria
hard
3afd253e-7855-45e4-8ad5-862796f62e04
prepend_sequence
Prepend BR 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\nRemove patterns BB, then put 'RRRR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RRRR'", "expected_accepted": true, "expected_output": "RRRR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RRRRR'", "expected_accepted": true, "expected_output": "RRRRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'RRRRRB'", "expected_accepted": true, "expected_output": "RRRRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'R' β†’ output: 'RRRRR'", "expected_accepted": true, "expected_output": "RRRRR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBR' β†’ output: 'RRRRRBR'", "expected_accepted": true, "expected_output": "RRRRRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'RRRRRRB'", "expected_accepted": true, "expected_output": "RRRRRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RRRRB'", "expected_accepted": true, "expected_output": "RRRRB", "input": "B" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'RRRRBRB'", "expected_accepted": true, "expected_output": "RRRRBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'RRRRBR'", "expected_accepted": true, "expected_output": "RRRRBR", "input": "BR" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RRRRRR'", "expected_accepted": true, "expected_output": "RRRRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: '' β†’ output: 'RRRR'", "expected_accepted": true, "expected_output": "RRRR", "input": "BB" }, { "check_output": true, "description": "Input 'RBBR' β†’ mutated: 'RR' β†’ output: 'RRRRRR'", "expected_accepted": true, "expected_output": "RRRRRR", "input": "RBBR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'B' β†’ output: 'RRRRB'", "expected_accepted": true, "expected_output": "RRRRB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RRRRRRR'", "expected_accepted": true, "expected_output": "RRRRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'RRRRBRBR'", "expected_accepted": true, "expected_output": "RRRRBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'RRRRRBRB'", "expected_accepted": true, "expected_output": "RRRRRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RBRRRBRB' β†’ mutated: 'RBRRRBRB' β†’ output: 'RRRRRBRRRBRB'", "expected_accepted": true, "expected_output": "RRRRRBRRRBRB", "input": "RBRRRBRB" }, { "check_output": true, "description": "Input 'RBBBRBBRBRRB' β†’ mutated: 'RBRRBRRB' β†’ output: 'RRRRRBRRBRRB'", "expected_accepted": true, "expected_output": "RRRRRBRRBRRB", "input": "RBBBRBBRBRRB" } ]
manufactoria
hard
70ad6d63-162f-4b45-9c71-72dd4ca7f17d
prepend_sequence
Prepend RRRR after Remove patterns 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\nReplace patterns BR with RB, then put 'RRB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RRB'", "expected_accepted": true, "expected_output": "RRB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RRBR'", "expected_accepted": true, "expected_output": "RRBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'RRBRB'", "expected_accepted": true, "expected_output": "RRBRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BRB' β†’ output: 'RRBBRB'", "expected_accepted": true, "expected_output": "RRBBRB", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RRB' β†’ output: 'RRBRRB'", "expected_accepted": true, "expected_output": "RRBRRB", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'RRBRRB'", "expected_accepted": true, "expected_output": "RRBRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RRBB'", "expected_accepted": true, "expected_output": "RRBB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RRBRR'", "expected_accepted": true, "expected_output": "RRBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'RB' β†’ output: 'RRBRB'", "expected_accepted": true, "expected_output": "RRBRB", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'RBB' β†’ output: 'RRBRBB'", "expected_accepted": true, "expected_output": "RRBRBB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RRBBB'", "expected_accepted": true, "expected_output": "RRBBB", "input": "BB" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RRBB' β†’ output: 'RRBRRBB'", "expected_accepted": true, "expected_output": "RRBRRBB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'RRBBBB'", "expected_accepted": true, "expected_output": "RRBBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RRBRRR'", "expected_accepted": true, "expected_output": "RRBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'RBRB' β†’ output: 'RRBRBRB'", "expected_accepted": true, "expected_output": "RRBRBRB", "input": "BRBR" }, { "check_output": true, "description": "Input 'RRRBRRBB' β†’ mutated: 'RRRRBRBB' β†’ output: 'RRBRRRRBRBB'", "expected_accepted": true, "expected_output": "RRBRRRRBRBB", "input": "RRRBRRBB" }, { "check_output": true, "description": "Input 'RRRBRBBRRRRR' β†’ mutated: 'RRRRBBRBRRRR' β†’ output: 'RRBRRRRBBRBRRRR'", "expected_accepted": true, "expected_output": "RRBRRRRBBRBRRRR", "input": "RRRBRBBRRRRR" } ]
manufactoria
hard
fc8b5994-6f47-4e6a-8dda-bac448373a2f
prepend_sequence
Prepend RRB after Replace patterns BR 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 BR with R, then put 'BBR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BBR'", "expected_accepted": true, "expected_output": "BBR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BBRR'", "expected_accepted": true, "expected_output": "BBRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BBRRB'", "expected_accepted": true, "expected_output": "BBRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BR' β†’ output: 'BBRBR'", "expected_accepted": true, "expected_output": "BBRBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RR' β†’ output: 'BBRRR'", "expected_accepted": true, "expected_output": "BBRRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'BBRRRB'", "expected_accepted": true, "expected_output": "BBRRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BBRRR'", "expected_accepted": true, "expected_output": "BBRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'R' β†’ output: 'BBRR'", "expected_accepted": true, "expected_output": "BBRR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'RB' β†’ output: 'BBRRB'", "expected_accepted": true, "expected_output": "BBRRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BBRBB'", "expected_accepted": true, "expected_output": "BBRBB", "input": "BB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BBRB'", "expected_accepted": true, "expected_output": "BBRB", "input": "B" }, { "check_output": true, "description": "Input 'RBBB' β†’ mutated: 'RBBB' β†’ output: 'BBRRBBB'", "expected_accepted": true, "expected_output": "BBRRBBB", "input": "RBBB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BBRBBB'", "expected_accepted": true, "expected_output": "BBRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BBRRRR'", "expected_accepted": true, "expected_output": "BBRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'RR' β†’ output: 'BBRRR'", "expected_accepted": true, "expected_output": "BBRRR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RRB' β†’ output: 'BBRRRB'", "expected_accepted": true, "expected_output": "BBRRRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RRBBRRRR' β†’ mutated: 'RRBRRRR' β†’ output: 'BBRRRBRRRR'", "expected_accepted": true, "expected_output": "BBRRRBRRRR", "input": "RRBBRRRR" }, { "check_output": true, "description": "Input 'RBRRBRBBRBRB' β†’ mutated: 'RRRRBRRB' β†’ output: 'BBRRRRRBRRB'", "expected_accepted": true, "expected_output": "BBRRRRRBRRB", "input": "RBRRBRBBRBRB" } ]
manufactoria
hard
3d9500f3-397b-4715-91a9-b0658707a55b
prepend_sequence
Prepend BBR after Replace patterns BR 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 RR with BB, then put 'BRRB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BRRB'", "expected_accepted": true, "expected_output": "BRRB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BRRBR'", "expected_accepted": true, "expected_output": "BRRBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BRRBRB'", "expected_accepted": true, "expected_output": "BRRBRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'BRRBBBR'", "expected_accepted": true, "expected_output": "BRRBBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBR' β†’ output: 'BRRBRBR'", "expected_accepted": true, "expected_output": "BRRBRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'BBB' β†’ output: 'BRRBBBB'", "expected_accepted": true, "expected_output": "BRRBBBB", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'BB' β†’ output: 'BRRBBB'", "expected_accepted": true, "expected_output": "BRRBBB", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'BRRBBR'", "expected_accepted": true, "expected_output": "BRRBBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'BRRBBRB'", "expected_accepted": true, "expected_output": "BRRBBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BRRBBB'", "expected_accepted": true, "expected_output": "BRRBBB", "input": "BB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BRRBB'", "expected_accepted": true, "expected_output": "BRRBB", "input": "B" }, { "check_output": true, "description": "Input 'BRRR' β†’ mutated: 'BBBR' β†’ output: 'BRRBBBBR'", "expected_accepted": true, "expected_output": "BRRBBBBR", "input": "BRRR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BRRBBBB'", "expected_accepted": true, "expected_output": "BRRBBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'BBR' β†’ output: 'BRRBBBR'", "expected_accepted": true, "expected_output": "BRRBBBR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'BRRBBRBR'", "expected_accepted": true, "expected_output": "BRRBBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'BRRBRBRB'", "expected_accepted": true, "expected_output": "BRRBRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRBRRRRR' β†’ mutated: 'BRBBBBBR' β†’ output: 'BRRBBRBBBBBR'", "expected_accepted": true, "expected_output": "BRRBBRBBBBBR", "input": "BRBRRRRR" }, { "check_output": true, "description": "Input 'RBRRRBBRBBBB' β†’ mutated: 'RBBBRBBRBBBB' β†’ output: 'BRRBRBBBRBBRBBBB'", "expected_accepted": true, "expected_output": "BRRBRBBBRBBRBBBB", "input": "RBRRRBBRBBBB" } ]
manufactoria
hard
1fade711-4af5-4231-81bc-de312efc1c88
prepend_sequence
Prepend BRRB after Replace patterns RR 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\nReplace patterns BR with BB, then put 'RRBR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RRBR'", "expected_accepted": true, "expected_output": "RRBR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RRBRR'", "expected_accepted": true, "expected_output": "RRBRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'RRBRRB'", "expected_accepted": true, "expected_output": "RRBRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBB' β†’ output: 'RRBRBBB'", "expected_accepted": true, "expected_output": "RRBRBBB", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBB' β†’ output: 'RRBRRBB'", "expected_accepted": true, "expected_output": "RRBRRBB", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'RRBRRRB'", "expected_accepted": true, "expected_output": "RRBRRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RRBRRR'", "expected_accepted": true, "expected_output": "RRBRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BB' β†’ output: 'RRBRBB'", "expected_accepted": true, "expected_output": "RRBRBB", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BBB' β†’ output: 'RRBRBBB'", "expected_accepted": true, "expected_output": "RRBRBBB", "input": "BRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RRBRB'", "expected_accepted": true, "expected_output": "RRBRB", "input": "B" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RRBRBB'", "expected_accepted": true, "expected_output": "RRBRBB", "input": "BB" }, { "check_output": true, "description": "Input 'RRBB' β†’ mutated: 'RRBB' β†’ output: 'RRBRRRBB'", "expected_accepted": true, "expected_output": "RRBRRRBB", "input": "RRBB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'RRBRBBB'", "expected_accepted": true, "expected_output": "RRBRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RRBRRRR'", "expected_accepted": true, "expected_output": "RRBRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BBBB' β†’ output: 'RRBRBBBB'", "expected_accepted": true, "expected_output": "RRBRBBBB", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBBB' β†’ output: 'RRBRRBBB'", "expected_accepted": true, "expected_output": "RRBRRBBB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRRRRBBR' β†’ mutated: 'BBRRRBBB' β†’ output: 'RRBRBBRRRBBB'", "expected_accepted": true, "expected_output": "RRBRBBRRRBBB", "input": "BRRRRBBR" }, { "check_output": true, "description": "Input 'RRBBRRRRRBBR' β†’ mutated: 'RRBBBRRRRBBB' β†’ output: 'RRBRRRBBBRRRRBBB'", "expected_accepted": true, "expected_output": "RRBRRRBBBRRRRBBB", "input": "RRBBRRRRRBBR" } ]
manufactoria
hard
8201e051-f631-4a45-b7f4-e4f73874de0b
prepend_sequence
Prepend RRBR after Replace patterns BR 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\nReplace patterns RB with BB, then put 'RRBB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RRBB'", "expected_accepted": true, "expected_output": "RRBB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RRBBR'", "expected_accepted": true, "expected_output": "RRBBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'BB' β†’ output: 'RRBBBB'", "expected_accepted": true, "expected_output": "RRBBBB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'RRBBBBR'", "expected_accepted": true, "expected_output": "RRBBBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'BBR' β†’ output: 'RRBBBBR'", "expected_accepted": true, "expected_output": "RRBBBBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RBB' β†’ output: 'RRBBRBB'", "expected_accepted": true, "expected_output": "RRBBRBB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RRBBB'", "expected_accepted": true, "expected_output": "RRBBB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RRBBRR'", "expected_accepted": true, "expected_output": "RRBBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'RRBBBR'", "expected_accepted": true, "expected_output": "RRBBBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BBB' β†’ output: 'RRBBBBB'", "expected_accepted": true, "expected_output": "RRBBBBB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RRBBBB'", "expected_accepted": true, "expected_output": "RRBBBB", "input": "BB" }, { "check_output": true, "description": "Input 'BBRR' β†’ mutated: 'BBRR' β†’ output: 'RRBBBBRR'", "expected_accepted": true, "expected_output": "RRBBBBRR", "input": "BBRR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'RRBBBBB'", "expected_accepted": true, "expected_output": "RRBBBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RRBBRRR'", "expected_accepted": true, "expected_output": "RRBBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BBBR' β†’ output: 'RRBBBBBR'", "expected_accepted": true, "expected_output": "RRBBBBBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'BBBB' β†’ output: 'RRBBBBBB'", "expected_accepted": true, "expected_output": "RRBBBBBB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RRRRBBBR' β†’ mutated: 'RRRBBBBR' β†’ output: 'RRBBRRRBBBBR'", "expected_accepted": true, "expected_output": "RRBBRRRBBBBR", "input": "RRRRBBBR" }, { "check_output": true, "description": "Input 'RRRBRRRRRBRB' β†’ mutated: 'RRBBRRRRBBBB' β†’ output: 'RRBBRRBBRRRRBBBB'", "expected_accepted": true, "expected_output": "RRBBRRBBRRRRBBBB", "input": "RRRBRRRRRBRB" } ]
manufactoria
hard
2a098c89-b6ba-462a-9354-a033f0399e2a
prepend_sequence
Prepend RRBB 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\nReplace patterns RB with R, then put 'BBBB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BBBB'", "expected_accepted": true, "expected_output": "BBBB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BBBBR'", "expected_accepted": true, "expected_output": "BBBBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'R' β†’ output: 'BBBBR'", "expected_accepted": true, "expected_output": "BBBBR", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'BBBBBBR'", "expected_accepted": true, "expected_output": "BBBBBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RR' β†’ output: 'BBBBRR'", "expected_accepted": true, "expected_output": "BBBBRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RR' β†’ output: 'BBBBRR'", "expected_accepted": true, "expected_output": "BBBBRR", "input": "RRB" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BR' β†’ output: 'BBBBBR'", "expected_accepted": true, "expected_output": "BBBBBR", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'BBBBBR'", "expected_accepted": true, "expected_output": "BBBBBR", "input": "BR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BBBBBB'", "expected_accepted": true, "expected_output": "BBBBBB", "input": "BB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BBBBB'", "expected_accepted": true, "expected_output": "BBBBB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BBBBRR'", "expected_accepted": true, "expected_output": "BBBBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BBBR' β†’ mutated: 'BBBR' β†’ output: 'BBBBBBBR'", "expected_accepted": true, "expected_output": "BBBBBBBR", "input": "BBBR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BBBBBBB'", "expected_accepted": true, "expected_output": "BBBBBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BBBBRRR'", "expected_accepted": true, "expected_output": "BBBBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRR' β†’ output: 'BBBBBRR'", "expected_accepted": true, "expected_output": "BBBBBRR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RR' β†’ output: 'BBBBRR'", "expected_accepted": true, "expected_output": "BBBBRR", "input": "RBRB" }, { "check_output": true, "description": "Input 'RRRRRRRB' β†’ mutated: 'RRRRRRR' β†’ output: 'BBBBRRRRRRR'", "expected_accepted": true, "expected_output": "BBBBRRRRRRR", "input": "RRRRRRRB" }, { "check_output": true, "description": "Input 'BBBRRBRBBBBB' β†’ mutated: 'BBBRRRBBBB' β†’ output: 'BBBBBBBRRRBBBB'", "expected_accepted": true, "expected_output": "BBBBBBBRRRBBBB", "input": "BBBRRBRBBBBB" } ]
manufactoria
hard
1ffd855f-3100-4336-8e0a-da05e3e2e96d
prepend_sequence
Prepend BBBB after Replace patterns RB 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 R, 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: 'R' β†’ output: 'BRBBR'", "expected_accepted": true, "expected_output": "BRBBR", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'BRBBBBR'", "expected_accepted": true, "expected_output": "BRBBBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RR' β†’ output: 'BRBBRR'", "expected_accepted": true, "expected_output": "BRBBRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RR' β†’ output: 'BRBBRR'", "expected_accepted": true, "expected_output": "BRBBRR", "input": "RRB" }, { "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: 'BR' β†’ output: 'BRBBBR'", "expected_accepted": true, "expected_output": "BRBBBR", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BRBBBB'", "expected_accepted": true, "expected_output": "BRBBBB", "input": "BB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BRBBB'", "expected_accepted": true, "expected_output": "BRBBB", "input": "B" }, { "check_output": true, "description": "Input 'BBRR' β†’ mutated: 'BBRR' β†’ output: 'BRBBBBRR'", "expected_accepted": true, "expected_output": "BRBBBBRR", "input": "BBRR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BRBBBBB'", "expected_accepted": true, "expected_output": "BRBBBBB", "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: 'BRR' β†’ output: 'BRBBBRR'", "expected_accepted": true, "expected_output": "BRBBBRR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RR' β†’ output: 'BRBBRR'", "expected_accepted": true, "expected_output": "BRBBRR", "input": "RBRB" }, { "check_output": true, "description": "Input 'RBRBRRBB' β†’ mutated: 'RRRRB' β†’ output: 'BRBBRRRRB'", "expected_accepted": true, "expected_output": "BRBBRRRRB", "input": "RBRBRRBB" }, { "check_output": true, "description": "Input 'RBBRBRBRBBRR' β†’ mutated: 'RBRRRBRR' β†’ output: 'BRBBRBRRRBRR'", "expected_accepted": true, "expected_output": "BRBBRBRRRBRR", "input": "RBBRBRBRBBRR" } ]
manufactoria
hard
ed3bec8e-ee29-438c-880e-51abdf335961
prepend_sequence
Prepend BRBB after Replace patterns RB 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 BB, then put 'BR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BRRB'", "expected_accepted": true, "expected_output": "BRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBB' β†’ output: 'BRBBB'", "expected_accepted": true, "expected_output": "BRBBB", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBB' β†’ output: 'BRRBB'", "expected_accepted": true, "expected_output": "BRRBB", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'BRRRB'", "expected_accepted": true, "expected_output": "BRRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BBB' β†’ output: 'BRBBB'", "expected_accepted": true, "expected_output": "BRBBB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BB' β†’ output: 'BRBB'", "expected_accepted": true, "expected_output": "BRBB", "input": "BR" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BRB'", "expected_accepted": true, "expected_output": "BRB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BRBB'", "expected_accepted": true, "expected_output": "BRBB", "input": "BB" }, { "check_output": true, "description": "Input 'BRBB' β†’ mutated: 'BBBB' β†’ output: 'BRBBBB'", "expected_accepted": true, "expected_output": "BRBBBB", "input": "BRBB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BRBBB'", "expected_accepted": true, "expected_output": "BRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BBBB' β†’ output: 'BRBBBB'", "expected_accepted": true, "expected_output": "BRBBBB", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBBB' β†’ output: 'BRRBBB'", "expected_accepted": true, "expected_output": "BRRBBB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RBRRBBRB' β†’ mutated: 'RBBRBBBB' β†’ output: 'BRRBBRBBBB'", "expected_accepted": true, "expected_output": "BRRBBRBBBB", "input": "RBRRBBRB" }, { "check_output": true, "description": "Input 'BBBBBRBRBRBB' β†’ mutated: 'BBBBBBBBBBBB' β†’ output: 'BRBBBBBBBBBBBB'", "expected_accepted": true, "expected_output": "BRBBBBBBBBBBBB", "input": "BBBBBRBRBRBB" } ]
manufactoria
hard
e5bc2bf2-01a1-403f-b68b-c2fd1f5c6f48
prepend_sequence
Prepend BR after Replace patterns BR 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\nReplace patterns BB with R, then put 'BBB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BBB'", "expected_accepted": true, "expected_output": "BBB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BBBR'", "expected_accepted": true, "expected_output": "BBBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BBBRB'", "expected_accepted": true, "expected_output": "BBBRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'RR' β†’ output: 'BBBRR'", "expected_accepted": true, "expected_output": "BBBRR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBR' β†’ output: 'BBBRBR'", "expected_accepted": true, "expected_output": "BBBRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'BBBRRB'", "expected_accepted": true, "expected_output": "BBBRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BBBB'", "expected_accepted": true, "expected_output": "BBBB", "input": "B" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'BBBBRB'", "expected_accepted": true, "expected_output": "BBBBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'BBBBR'", "expected_accepted": true, "expected_output": "BBBBR", "input": "BR" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BBBRR'", "expected_accepted": true, "expected_output": "BBBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'R' β†’ output: 'BBBR'", "expected_accepted": true, "expected_output": "BBBR", "input": "BB" }, { "check_output": true, "description": "Input 'RBBB' β†’ mutated: 'RRB' β†’ output: 'BBBRRB'", "expected_accepted": true, "expected_output": "BBBRRB", "input": "RBBB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'RB' β†’ output: 'BBBRB'", "expected_accepted": true, "expected_output": "BBBRB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BBBRRR'", "expected_accepted": true, "expected_output": "BBBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'BBBBRBR'", "expected_accepted": true, "expected_output": "BBBBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'BBBRBRB'", "expected_accepted": true, "expected_output": "BBBRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RBRRBBRB' β†’ mutated: 'RBRRRRB' β†’ output: 'BBBRBRRRRB'", "expected_accepted": true, "expected_output": "BBBRBRRRRB", "input": "RBRRBBRB" }, { "check_output": true, "description": "Input 'BRRRBBBRBRBR' β†’ mutated: 'BRRRRBRBRBR' β†’ output: 'BBBBRRRRBRBRBR'", "expected_accepted": true, "expected_output": "BBBBRRRRBRBRBR", "input": "BRRRBBBRBRBR" } ]
manufactoria
hard
7a24e63e-face-480c-8946-ecbb17b71518
prepend_sequence
Prepend BBB after Replace patterns BB 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 '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: 'RR' β†’ output: 'RRR'", "expected_accepted": true, "expected_output": "RRR", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'RBBR'", "expected_accepted": true, "expected_output": "RBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RRR' β†’ output: 'RRRR'", "expected_accepted": true, "expected_output": "RRRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRR' β†’ output: 'RRRR'", "expected_accepted": true, "expected_output": "RRRR", "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: 'BR' β†’ output: 'RBR'", "expected_accepted": true, "expected_output": "RBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRR' β†’ output: 'RBRR'", "expected_accepted": true, "expected_output": "RBRR", "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: 'BRRR' β†’ output: 'RBRRR'", "expected_accepted": true, "expected_output": "RBRRR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RRRR' β†’ output: 'RRRRR'", "expected_accepted": true, "expected_output": "RRRRR", "input": "RBRB" }, { "check_output": true, "description": "Input 'RRBBBBRB' β†’ mutated: 'RRRBBBRR' β†’ output: 'RRRRBBBRR'", "expected_accepted": true, "expected_output": "RRRRBBBRR", "input": "RRBBBBRB" }, { "check_output": true, "description": "Input 'RRBBBBRRRBBB' β†’ mutated: 'RRRBBBRRRRBB' β†’ output: 'RRRRBBBRRRRBB'", "expected_accepted": true, "expected_output": "RRRRBBBRRRRBB", "input": "RRBBBBRRRBBB" } ]
manufactoria
hard
eb53478d-e9f0-4c49-914a-69d09e6dcd84
prepend_sequence
Prepend R 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\nRemove patterns 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: 'RB' β†’ output: 'BBRB'", "expected_accepted": true, "expected_output": "BBRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'R' β†’ output: 'BBR'", "expected_accepted": true, "expected_output": "BBR", "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: 'RRB' β†’ output: 'BBRRB'", "expected_accepted": true, "expected_output": "BBRRB", "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: 'BRB' β†’ output: 'BBBRB'", "expected_accepted": true, "expected_output": "BBBRB", "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: '' β†’ output: 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "BB" }, { "check_output": true, "description": "Input 'BRRB' β†’ mutated: 'BRRB' β†’ output: 'BBBRRB'", "expected_accepted": true, "expected_output": "BBBRRB", "input": "BRRB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'B' β†’ output: 'BBB'", "expected_accepted": true, "expected_output": "BBB", "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: '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 'BBRRRRBR' β†’ mutated: 'RRRRBR' β†’ output: 'BBRRRRBR'", "expected_accepted": true, "expected_output": "BBRRRRBR", "input": "BBRRRRBR" }, { "check_output": true, "description": "Input 'BBRBRRBBBBBR' β†’ mutated: 'RBRRBR' β†’ output: 'BBRBRRBR'", "expected_accepted": true, "expected_output": "BBRBRRBR", "input": "BBRBRRBBBBBR" } ]
manufactoria
hard
742cc0c9-54fc-4c4e-b9ab-ede3d5d8f063
prepend_sequence
Prepend BB after Remove patterns 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\nReplace patterns BB with R, then put 'BRB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BRB'", "expected_accepted": true, "expected_output": "BRB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BRBR'", "expected_accepted": true, "expected_output": "BRBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BRBRB'", "expected_accepted": true, "expected_output": "BRBRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'RR' β†’ output: 'BRBRR'", "expected_accepted": true, "expected_output": "BRBRR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBR' β†’ output: 'BRBRBR'", "expected_accepted": true, "expected_output": "BRBRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'BRBRRB'", "expected_accepted": true, "expected_output": "BRBRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'BRBBRB'", "expected_accepted": true, "expected_output": "BRBBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'BRBBR'", "expected_accepted": true, "expected_output": "BRBBR", "input": "BR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'R' β†’ output: 'BRBR'", "expected_accepted": true, "expected_output": "BRBR", "input": "BB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BRBB'", "expected_accepted": true, "expected_output": "BRBB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BRBRR'", "expected_accepted": true, "expected_output": "BRBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BBRB' β†’ mutated: 'RRB' β†’ output: 'BRBRRB'", "expected_accepted": true, "expected_output": "BRBRRB", "input": "BBRB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'RB' β†’ output: 'BRBRB'", "expected_accepted": true, "expected_output": "BRBRB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BRBRRR'", "expected_accepted": true, "expected_output": "BRBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'BRBBRBR'", "expected_accepted": true, "expected_output": "BRBBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'BRBRBRB'", "expected_accepted": true, "expected_output": "BRBRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRBRRBRR' β†’ mutated: 'BRBRRBRR' β†’ output: 'BRBBRBRRBRR'", "expected_accepted": true, "expected_output": "BRBBRBRRBRR", "input": "BRBRRBRR" }, { "check_output": true, "description": "Input 'BBBRBBRBBBRR' β†’ mutated: 'RBRRRRBRR' β†’ output: 'BRBRBRRRRBRR'", "expected_accepted": true, "expected_output": "BRBRBRRRRBRR", "input": "BBBRBBRBBBRR" } ]
manufactoria
hard
bfc2326c-f343-4b80-8f1f-94c58e7d5e46
prepend_sequence
Prepend BRB after Replace patterns BB 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 'BRRB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BRRB'", "expected_accepted": true, "expected_output": "BRRB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BRRBR'", "expected_accepted": true, "expected_output": "BRRBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RR' β†’ output: 'BRRBRR'", "expected_accepted": true, "expected_output": "BRRBRR", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'BRRBBBR'", "expected_accepted": true, "expected_output": "BRRBBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RRR' β†’ output: 'BRRBRRR'", "expected_accepted": true, "expected_output": "BRRBRRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRR' β†’ output: 'BRRBRRR'", "expected_accepted": true, "expected_output": "BRRBRRR", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BRRBRR'", "expected_accepted": true, "expected_output": "BRRBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'BRRBBR'", "expected_accepted": true, "expected_output": "BRRBBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRR' β†’ output: 'BRRBBRR'", "expected_accepted": true, "expected_output": "BRRBBRR", "input": "BRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BRRBB'", "expected_accepted": true, "expected_output": "BRRBB", "input": "B" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BRRBBB'", "expected_accepted": true, "expected_output": "BRRBBB", "input": "BB" }, { "check_output": true, "description": "Input 'BRRR' β†’ mutated: 'BRRR' β†’ output: 'BRRBBRRR'", "expected_accepted": true, "expected_output": "BRRBBRRR", "input": "BRRR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BRRBBBB'", "expected_accepted": true, "expected_output": "BRRBBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BRRBRRR'", "expected_accepted": true, "expected_output": "BRRBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRRR' β†’ output: 'BRRBBRRR'", "expected_accepted": true, "expected_output": "BRRBBRRR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RRRR' β†’ output: 'BRRBRRRR'", "expected_accepted": true, "expected_output": "BRRBRRRR", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBBBRRRB' β†’ mutated: 'BBBBRRRR' β†’ output: 'BRRBBBBBRRRR'", "expected_accepted": true, "expected_output": "BRRBBBBBRRRR", "input": "BBBBRRRB" }, { "check_output": true, "description": "Input 'RRRRBRBBRBRB' β†’ mutated: 'RRRRRRRBRRRR' β†’ output: 'BRRBRRRRRRRBRRRR'", "expected_accepted": true, "expected_output": "BRRBRRRRRRRBRRRR", "input": "RRRRBRBBRBRB" } ]
manufactoria
hard
f3c5881f-e1f6-4d58-a0c4-8b2adcf3f1fc
prepend_sequence
Prepend BRRB 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 RR with BB, then put 'BRB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BRB'", "expected_accepted": true, "expected_output": "BRB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BRBR'", "expected_accepted": true, "expected_output": "BRBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BRBRB'", "expected_accepted": true, "expected_output": "BRBRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'BRBBBR'", "expected_accepted": true, "expected_output": "BRBBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBR' β†’ output: 'BRBRBR'", "expected_accepted": true, "expected_output": "BRBRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'BBB' β†’ output: 'BRBBBB'", "expected_accepted": true, "expected_output": "BRBBBB", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'BB' β†’ output: 'BRBBB'", "expected_accepted": true, "expected_output": "BRBBB", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'BRBBR'", "expected_accepted": true, "expected_output": "BRBBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'BRBBRB'", "expected_accepted": true, "expected_output": "BRBBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BRBBB'", "expected_accepted": true, "expected_output": "BRBBB", "input": "BB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BRBB'", "expected_accepted": true, "expected_output": "BRBB", "input": "B" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'BRBRBRB'", "expected_accepted": true, "expected_output": "BRBRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BRBBBB'", "expected_accepted": true, "expected_output": "BRBBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'BBR' β†’ output: 'BRBBBR'", "expected_accepted": true, "expected_output": "BRBBBR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'BRBBRBR'", "expected_accepted": true, "expected_output": "BRBBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'BBRRBBBR' β†’ mutated: 'BBBBBBBR' β†’ output: 'BRBBBBBBBBR'", "expected_accepted": true, "expected_output": "BRBBBBBBBBR", "input": "BBRRBBBR" }, { "check_output": true, "description": "Input 'BRBBBBBBRRBR' β†’ mutated: 'BRBBBBBBBBBR' β†’ output: 'BRBBRBBBBBBBBBR'", "expected_accepted": true, "expected_output": "BRBBRBBBBBBBBBR", "input": "BRBBBBBBRRBR" } ]
manufactoria
hard
00fcd5c0-6ee7-42fd-a5c1-2cdfb610b1e4
prepend_sequence
Prepend BRB after Replace patterns RR 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\nReplace patterns BR with B, then put 'BR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BRRB'", "expected_accepted": true, "expected_output": "BRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BB' β†’ output: 'BRBB'", "expected_accepted": true, "expected_output": "BRBB", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RB' β†’ output: 'BRRB'", "expected_accepted": true, "expected_output": "BRRB", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'BRRRB'", "expected_accepted": true, "expected_output": "BRRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'B' β†’ output: 'BRB'", "expected_accepted": true, "expected_output": "BRB", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BB' β†’ output: 'BRBB'", "expected_accepted": true, "expected_output": "BRBB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BRBB'", "expected_accepted": true, "expected_output": "BRBB", "input": "BB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BRB'", "expected_accepted": true, "expected_output": "BRB", "input": "B" }, { "check_output": true, "description": "Input 'BRBB' β†’ mutated: 'BBB' β†’ output: 'BRBBB'", "expected_accepted": true, "expected_output": "BRBBB", "input": "BRBB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BRBBB'", "expected_accepted": true, "expected_output": "BRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BB' β†’ output: 'BRBB'", "expected_accepted": true, "expected_output": "BRBB", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBB' β†’ output: 'BRRBB'", "expected_accepted": true, "expected_output": "BRRBB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRRBRRRR' β†’ mutated: 'BRBRRR' β†’ output: 'BRBRBRRR'", "expected_accepted": true, "expected_output": "BRBRBRRR", "input": "BRRBRRRR" }, { "check_output": true, "description": "Input 'BRBBRRRRBRBB' β†’ mutated: 'BBBRRRBBB' β†’ output: 'BRBBBRRRBBB'", "expected_accepted": true, "expected_output": "BRBBBRRRBBB", "input": "BRBBRRRRBRBB" } ]
manufactoria
hard
6d21391f-6a29-46be-918f-ac21226e4eb5
prepend_sequence
Prepend BR after Replace patterns BR with B
[ { "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 'RBRB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RBRB'", "expected_accepted": true, "expected_output": "RBRB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RBRBR'", "expected_accepted": true, "expected_output": "RBRBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'RBRBRB'", "expected_accepted": true, "expected_output": "RBRBRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'RBRBBBR'", "expected_accepted": true, "expected_output": "RBRBBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBR' β†’ output: 'RBRBRBR'", "expected_accepted": true, "expected_output": "RBRBRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RB' β†’ output: 'RBRBRB'", "expected_accepted": true, "expected_output": "RBRBRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RBRBB'", "expected_accepted": true, "expected_output": "RBRBB", "input": "B" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'RBRBBRB'", "expected_accepted": true, "expected_output": "RBRBBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'RBRBBR'", "expected_accepted": true, "expected_output": "RBRBBR", "input": "BR" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'R' β†’ output: 'RBRBR'", "expected_accepted": true, "expected_output": "RBRBR", "input": "RR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RBRBBB'", "expected_accepted": true, "expected_output": "RBRBBB", "input": "BB" }, { "check_output": true, "description": "Input 'RRRB' β†’ mutated: 'RRB' β†’ output: 'RBRBRRB'", "expected_accepted": true, "expected_output": "RBRBRRB", "input": "RRRB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'RBRBBBB'", "expected_accepted": true, "expected_output": "RBRBBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RR' β†’ output: 'RBRBRR'", "expected_accepted": true, "expected_output": "RBRBRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'RBRBBRBR'", "expected_accepted": true, "expected_output": "RBRBBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'RBRBRBRB'", "expected_accepted": true, "expected_output": "RBRBRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RBBRRRBB' β†’ mutated: 'RBBRRBB' β†’ output: 'RBRBRBBRRBB'", "expected_accepted": true, "expected_output": "RBRBRBBRRBB", "input": "RBBRRRBB" }, { "check_output": true, "description": "Input 'BBRRRRRRRRRR' β†’ mutated: 'BBRRRRR' β†’ output: 'RBRBBBRRRRR'", "expected_accepted": true, "expected_output": "RBRBBBRRRRR", "input": "BBRRRRRRRRRR" } ]
manufactoria
hard
3c4c103d-8633-4625-b1a3-9103432689d7
prepend_sequence
Prepend RBRB 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\nRemove patterns RR, then put 'RBRR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RBRR'", "expected_accepted": true, "expected_output": "RBRR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RBRRR'", "expected_accepted": true, "expected_output": "RBRRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'RBRRRB'", "expected_accepted": true, "expected_output": "RBRRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'RBRRBBR'", "expected_accepted": true, "expected_output": "RBRRBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBR' β†’ output: 'RBRRRBR'", "expected_accepted": true, "expected_output": "RBRRRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'B' β†’ output: 'RBRRB'", "expected_accepted": true, "expected_output": "RBRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RBRRB'", "expected_accepted": true, "expected_output": "RBRRB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: '' β†’ output: 'RBRR'", "expected_accepted": true, "expected_output": "RBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'RBRRBR'", "expected_accepted": true, "expected_output": "RBRRBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'RBRRBRB'", "expected_accepted": true, "expected_output": "RBRRBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RBRRBB'", "expected_accepted": true, "expected_output": "RBRRBB", "input": "BB" }, { "check_output": true, "description": "Input 'BBBR' β†’ mutated: 'BBBR' β†’ output: 'RBRRBBBR'", "expected_accepted": true, "expected_output": "RBRRBBBR", "input": "BBBR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'RBRRBBB'", "expected_accepted": true, "expected_output": "RBRRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'R' β†’ output: 'RBRRR'", "expected_accepted": true, "expected_output": "RBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'RBRRBRBR'", "expected_accepted": true, "expected_output": "RBRRBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'RBRRRBRB'", "expected_accepted": true, "expected_output": "RBRRRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RBBBBBRR' β†’ mutated: 'RBBBBB' β†’ output: 'RBRRRBBBBB'", "expected_accepted": true, "expected_output": "RBRRRBBBBB", "input": "RBBBBBRR" }, { "check_output": true, "description": "Input 'BBRRRRBRRBBR' β†’ mutated: 'BBBBBR' β†’ output: 'RBRRBBBBBR'", "expected_accepted": true, "expected_output": "RBRRBBBBBR", "input": "BBRRRRBRRBBR" } ]
manufactoria
hard
b1ba91f4-4f83-463b-88bf-78f4ab1172ce
prepend_sequence
Prepend RBRR after Remove patterns 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 RR with 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: 'RB' β†’ output: 'RRRB'", "expected_accepted": true, "expected_output": "RRRB", "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: 'RBR' β†’ output: 'RRRBR'", "expected_accepted": true, "expected_output": "RRRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RBB' β†’ output: 'RRRBB'", "expected_accepted": true, "expected_output": "RRRBB", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RB' β†’ output: 'RRRB'", "expected_accepted": true, "expected_output": "RRRB", "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: 'BRB' β†’ output: 'RRBRB'", "expected_accepted": true, "expected_output": "RRBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RRB'", "expected_accepted": true, "expected_output": "RRB", "input": "B" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RRBB'", "expected_accepted": true, "expected_output": "RRBB", "input": "BB" }, { "check_output": true, "description": "Input 'BRBB' β†’ mutated: 'BRBB' β†’ output: 'RRBRBB'", "expected_accepted": true, "expected_output": "RRBRBB", "input": "BRBB" }, { "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: 'RBR' β†’ output: 'RRRBR'", "expected_accepted": true, "expected_output": "RRRBR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'RRBRBR'", "expected_accepted": true, "expected_output": "RRBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'RRRBRB'", "expected_accepted": true, "expected_output": "RRRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBRBRBBR' β†’ mutated: 'BBRBRBBR' β†’ output: 'RRBBRBRBBR'", "expected_accepted": true, "expected_output": "RRBBRBRBBR", "input": "BBRBRBBR" }, { "check_output": true, "description": "Input 'BRRRRBBBRBBB' β†’ mutated: 'BRBRBBBBRBBB' β†’ output: 'RRBRBRBBBBRBBB'", "expected_accepted": true, "expected_output": "RRBRBRBBBBRBBB", "input": "BRRRRBBBRBBB" } ]
manufactoria
hard
1b260580-b8ab-4639-b471-8c1c90e3b0a7
prepend_sequence
Prepend RR after Replace patterns RR 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 B, then put 'RRBR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RRBR'", "expected_accepted": true, "expected_output": "RRBR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RRBRR'", "expected_accepted": true, "expected_output": "RRBRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'RRBRRB'", "expected_accepted": true, "expected_output": "RRBRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'RRBRBBR'", "expected_accepted": true, "expected_output": "RRBRBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBR' β†’ output: 'RRBRRBR'", "expected_accepted": true, "expected_output": "RRBRRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'BB' β†’ output: 'RRBRBB'", "expected_accepted": true, "expected_output": "RRBRBB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RRBRB'", "expected_accepted": true, "expected_output": "RRBRB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'B' β†’ output: 'RRBRB'", "expected_accepted": true, "expected_output": "RRBRB", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'RRBRBR'", "expected_accepted": true, "expected_output": "RRBRBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'RRBRBRB'", "expected_accepted": true, "expected_output": "RRBRBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RRBRBB'", "expected_accepted": true, "expected_output": "RRBRBB", "input": "BB" }, { "check_output": true, "description": "Input 'BRRR' β†’ mutated: 'BBR' β†’ output: 'RRBRBBR'", "expected_accepted": true, "expected_output": "RRBRBBR", "input": "BRRR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'RRBRBBB'", "expected_accepted": true, "expected_output": "RRBRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'BR' β†’ output: 'RRBRBR'", "expected_accepted": true, "expected_output": "RRBRBR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'RRBRBRBR'", "expected_accepted": true, "expected_output": "RRBRBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'RRBRRBRB'", "expected_accepted": true, "expected_output": "RRBRRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RBRBRBRB' β†’ mutated: 'RBRBRBRB' β†’ output: 'RRBRRBRBRBRB'", "expected_accepted": true, "expected_output": "RRBRRBRBRBRB", "input": "RBRBRBRB" }, { "check_output": true, "description": "Input 'RBRBBRRBRRRB' β†’ mutated: 'RBRBBBBBRB' β†’ output: 'RRBRRBRBBBBBRB'", "expected_accepted": true, "expected_output": "RRBRRBRBBBBBRB", "input": "RBRBBRRBRRRB" } ]
manufactoria
hard
79b9d632-aebf-4e76-b66b-03e02807a807
prepend_sequence
Prepend RRBR after Replace patterns RR with B
[ { "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 RR, then put 'RRBR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RRBR'", "expected_accepted": true, "expected_output": "RRBR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RRBRR'", "expected_accepted": true, "expected_output": "RRBRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'RRBRRB'", "expected_accepted": true, "expected_output": "RRBRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BRR' β†’ output: 'RRBRBRR'", "expected_accepted": true, "expected_output": "RRBRBRR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RRR' β†’ output: 'RRBRRRR'", "expected_accepted": true, "expected_output": "RRBRRRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'RRBRRRB'", "expected_accepted": true, "expected_output": "RRBRRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RRBRB'", "expected_accepted": true, "expected_output": "RRBRB", "input": "B" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'RRB' β†’ output: 'RRBRRRB'", "expected_accepted": true, "expected_output": "RRBRRRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'RR' β†’ output: 'RRBRRR'", "expected_accepted": true, "expected_output": "RRBRRR", "input": "BR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RRBRBB'", "expected_accepted": true, "expected_output": "RRBRBB", "input": "BB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RRBRRR'", "expected_accepted": true, "expected_output": "RRBRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BRRR' β†’ mutated: 'RRRR' β†’ output: 'RRBRRRRR'", "expected_accepted": true, "expected_output": "RRBRRRRR", "input": "BRRR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'RRBRBBB'", "expected_accepted": true, "expected_output": "RRBRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RRBRRRR'", "expected_accepted": true, "expected_output": "RRBRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'RRRR' β†’ output: 'RRBRRRRR'", "expected_accepted": true, "expected_output": "RRBRRRRR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RRRB' β†’ output: 'RRBRRRRB'", "expected_accepted": true, "expected_output": "RRBRRRRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRRBBBRR' β†’ mutated: 'RRRBBRRR' β†’ output: 'RRBRRRRBBRRR'", "expected_accepted": true, "expected_output": "RRBRRRRBBRRR", "input": "BRRBBBRR" }, { "check_output": true, "description": "Input 'BRBRBRBRRBRB' β†’ mutated: 'RRRRRRRRRRRB' β†’ output: 'RRBRRRRRRRRRRRRB'", "expected_accepted": true, "expected_output": "RRBRRRRRRRRRRRRB", "input": "BRBRBRBRRBRB" } ]
manufactoria
hard
9e6166a2-4e04-4b63-a27b-da3a01e916d7
prepend_sequence
Prepend RRBR after Replace patterns BR 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 BR with R, then put 'RRRB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RRRB'", "expected_accepted": true, "expected_output": "RRRB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RRRBR'", "expected_accepted": true, "expected_output": "RRRBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'RRRBRB'", "expected_accepted": true, "expected_output": "RRRBRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BR' β†’ output: 'RRRBBR'", "expected_accepted": true, "expected_output": "RRRBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RR' β†’ output: 'RRRBRR'", "expected_accepted": true, "expected_output": "RRRBRR", "input": "RBR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'R' β†’ output: 'RRRBR'", "expected_accepted": true, "expected_output": "RRRBR", "input": "BR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'RRRBRRB'", "expected_accepted": true, "expected_output": "RRRBRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'RB' β†’ output: 'RRRBRB'", "expected_accepted": true, "expected_output": "RRRBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RRRBRR'", "expected_accepted": true, "expected_output": "RRRBRR", "input": "RR" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RRRBB'", "expected_accepted": true, "expected_output": "RRRBB", "input": "B" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RRRBBB'", "expected_accepted": true, "expected_output": "RRRBBB", "input": "BB" }, { "check_output": true, "description": "Input 'BRRB' β†’ mutated: 'RRB' β†’ output: 'RRRBRRB'", "expected_accepted": true, "expected_output": "RRRBRRB", "input": "BRRB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'RRRBBBB'", "expected_accepted": true, "expected_output": "RRRBBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RRRBRRR'", "expected_accepted": true, "expected_output": "RRRBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'RR' β†’ output: 'RRRBRR'", "expected_accepted": true, "expected_output": "RRRBRR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RRB' β†’ output: 'RRRBRRB'", "expected_accepted": true, "expected_output": "RRRBRRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRBBRRRB' β†’ mutated: 'RBRRRB' β†’ output: 'RRRBRBRRRB'", "expected_accepted": true, "expected_output": "RRRBRBRRRB", "input": "BRBBRRRB" }, { "check_output": true, "description": "Input 'RRRBBBRBBRBR' β†’ mutated: 'RRRBBRBRR' β†’ output: 'RRRBRRRBBRBRR'", "expected_accepted": true, "expected_output": "RRRBRRRBBRBRR", "input": "RRRBBBRBBRBR" } ]
manufactoria
hard
512a60a0-ae70-43c2-99e2-01fb841771f2
prepend_sequence
Prepend RRRB after Replace patterns BR 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 BB with BR, then put 'RRBB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RRBB'", "expected_accepted": true, "expected_output": "RRBB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RRBBR'", "expected_accepted": true, "expected_output": "RRBBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'RRBBRB'", "expected_accepted": true, "expected_output": "RRBBRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BRR' β†’ output: 'RRBBBRR'", "expected_accepted": true, "expected_output": "RRBBBRR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBR' β†’ output: 'RRBBRBR'", "expected_accepted": true, "expected_output": "RRBBRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'RRBBRRB'", "expected_accepted": true, "expected_output": "RRBBRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RRBBB'", "expected_accepted": true, "expected_output": "RRBBB", "input": "B" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'RRBBBRB'", "expected_accepted": true, "expected_output": "RRBBBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'RRBBBR'", "expected_accepted": true, "expected_output": "RRBBBR", "input": "BR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BR' β†’ output: 'RRBBBR'", "expected_accepted": true, "expected_output": "RRBBBR", "input": "BB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RRBBRR'", "expected_accepted": true, "expected_output": "RRBBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'RRBBBRBR'", "expected_accepted": true, "expected_output": "RRBBBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BRB' β†’ output: 'RRBBBRB'", "expected_accepted": true, "expected_output": "RRBBBRB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RRBBRRR'", "expected_accepted": true, "expected_output": "RRBBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'RRBBRBRB'", "expected_accepted": true, "expected_output": "RRBBRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RBBBRBBB' β†’ mutated: 'RBRBRBRB' β†’ output: 'RRBBRBRBRBRB'", "expected_accepted": true, "expected_output": "RRBBRBRBRBRB", "input": "RBBBRBBB" }, { "check_output": true, "description": "Input 'BRRBBRBRRBBB' β†’ mutated: 'BRRBRRBRRBRB' β†’ output: 'RRBBBRRBRRBRRBRB'", "expected_accepted": true, "expected_output": "RRBBBRRBRRBRRBRB", "input": "BRRBBRBRRBBB" } ]
manufactoria
hard
10732570-0384-4669-bc3a-6d7f1b21ee69
prepend_sequence
Prepend RRBB after Replace patterns BB 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\nRemove patterns RB, then put 'RBB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RBB'", "expected_accepted": true, "expected_output": "RBB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RBBR'", "expected_accepted": true, "expected_output": "RBBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: '' β†’ output: 'RBB'", "expected_accepted": true, "expected_output": "RBB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'RBBBBR'", "expected_accepted": true, "expected_output": "RBBBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'R' β†’ output: 'RBBR'", "expected_accepted": true, "expected_output": "RBBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'R' β†’ output: 'RBBR'", "expected_accepted": true, "expected_output": "RBBR", "input": "RRB" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'B' β†’ output: 'RBBB'", "expected_accepted": true, "expected_output": "RBBB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'RBBBR'", "expected_accepted": true, "expected_output": "RBBBR", "input": "BR" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RBBB'", "expected_accepted": true, "expected_output": "RBBB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RBBRR'", "expected_accepted": true, "expected_output": "RBBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RBBBB'", "expected_accepted": true, "expected_output": "RBBBB", "input": "BB" }, { "check_output": true, "description": "Input 'BRBB' β†’ mutated: 'BB' β†’ output: 'RBBBB'", "expected_accepted": true, "expected_output": "RBBBB", "input": "BRBB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'RBBBBB'", "expected_accepted": true, "expected_output": "RBBBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RBBRRR'", "expected_accepted": true, "expected_output": "RBBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BR' β†’ output: 'RBBBR'", "expected_accepted": true, "expected_output": "RBBBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: '' β†’ output: 'RBB'", "expected_accepted": true, "expected_output": "RBB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBRRBRBB' β†’ mutated: 'BBRB' β†’ output: 'RBBBBRB'", "expected_accepted": true, "expected_output": "RBBBBRB", "input": "BBRRBRBB" }, { "check_output": true, "description": "Input 'RBBBRRBBRRBR' β†’ mutated: 'BBRBRR' β†’ output: 'RBBBBRBRR'", "expected_accepted": true, "expected_output": "RBBBBRBRR", "input": "RBBBRRBBRRBR" } ]
manufactoria
hard
042aaba9-0d9d-4cf7-8d40-a73ddf135d2f
prepend_sequence
Prepend RBB 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 RB with R, then put 'BBR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BBR'", "expected_accepted": true, "expected_output": "BBR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BBRR'", "expected_accepted": true, "expected_output": "BBRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'R' β†’ output: 'BBRR'", "expected_accepted": true, "expected_output": "BBRR", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'BBRBBR'", "expected_accepted": true, "expected_output": "BBRBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RR' β†’ output: 'BBRRR'", "expected_accepted": true, "expected_output": "BBRRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RR' β†’ output: 'BBRRR'", "expected_accepted": true, "expected_output": "BBRRR", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BBRRR'", "expected_accepted": true, "expected_output": "BBRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'BBRBR'", "expected_accepted": true, "expected_output": "BBRBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BR' β†’ output: 'BBRBR'", "expected_accepted": true, "expected_output": "BBRBR", "input": "BRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BBRB'", "expected_accepted": true, "expected_output": "BBRB", "input": "B" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BBRBB'", "expected_accepted": true, "expected_output": "BBRBB", "input": "BB" }, { "check_output": true, "description": "Input 'BRRB' β†’ mutated: 'BRR' β†’ output: 'BBRBRR'", "expected_accepted": true, "expected_output": "BBRBRR", "input": "BRRB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BBRBBB'", "expected_accepted": true, "expected_output": "BBRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BBRRRR'", "expected_accepted": true, "expected_output": "BBRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRR' β†’ output: 'BBRBRR'", "expected_accepted": true, "expected_output": "BBRBRR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RR' β†’ output: 'BBRRR'", "expected_accepted": true, "expected_output": "BBRRR", "input": "RBRB" }, { "check_output": true, "description": "Input 'RBRRRBBR' β†’ mutated: 'RRRRBR' β†’ output: 'BBRRRRRBR'", "expected_accepted": true, "expected_output": "BBRRRRRBR", "input": "RBRRRBBR" }, { "check_output": true, "description": "Input 'RBBBBRRBRBRR' β†’ mutated: 'RBBBRRRRR' β†’ output: 'BBRRBBBRRRRR'", "expected_accepted": true, "expected_output": "BBRRBBBRRRRR", "input": "RBBBBRRBRBRR" } ]
manufactoria
hard
8b028064-5889-4a9e-843a-fedcca293f3b
prepend_sequence
Prepend BBR after Replace patterns RB 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 RR with BR, then put 'RRB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RRB'", "expected_accepted": true, "expected_output": "RRB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RRBR'", "expected_accepted": true, "expected_output": "RRBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'RRBRB'", "expected_accepted": true, "expected_output": "RRBRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'RRBBBR'", "expected_accepted": true, "expected_output": "RRBBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBR' β†’ output: 'RRBRBR'", "expected_accepted": true, "expected_output": "RRBRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'BRB' β†’ output: 'RRBBRB'", "expected_accepted": true, "expected_output": "RRBBRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RRBB'", "expected_accepted": true, "expected_output": "RRBB", "input": "B" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'RRBBRB'", "expected_accepted": true, "expected_output": "RRBBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'RRBBR'", "expected_accepted": true, "expected_output": "RRBBR", "input": "BR" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'BR' β†’ output: 'RRBBR'", "expected_accepted": true, "expected_output": "RRBBR", "input": "RR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RRBBB'", "expected_accepted": true, "expected_output": "RRBBB", "input": "BB" }, { "check_output": true, "description": "Input 'RBBR' β†’ mutated: 'RBBR' β†’ output: 'RRBRBBR'", "expected_accepted": true, "expected_output": "RRBRBBR", "input": "RBBR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'RRBBBB'", "expected_accepted": true, "expected_output": "RRBBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'BRR' β†’ output: 'RRBBRR'", "expected_accepted": true, "expected_output": "RRBBRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'RRBBRBR'", "expected_accepted": true, "expected_output": "RRBBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'RRBRBRB'", "expected_accepted": true, "expected_output": "RRBRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RRBRBRRR' β†’ mutated: 'BRBRBBRR' β†’ output: 'RRBBRBRBBRR'", "expected_accepted": true, "expected_output": "RRBBRBRBBRR", "input": "RRBRBRRR" }, { "check_output": true, "description": "Input 'RBBRRBRRBRBB' β†’ mutated: 'RBBBRBBRBRBB' β†’ output: 'RRBRBBBRBBRBRBB'", "expected_accepted": true, "expected_output": "RRBRBBBRBBRBRBB", "input": "RBBRRBRRBRBB" } ]
manufactoria
hard
d72557db-010f-4aa1-81aa-71d62ac61b32
prepend_sequence
Prepend RRB after Replace patterns RR 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 RR, then put 'RRRB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RRRB'", "expected_accepted": true, "expected_output": "RRRB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RRRBR'", "expected_accepted": true, "expected_output": "RRRBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'RRRBRB'", "expected_accepted": true, "expected_output": "RRRBRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'RRR' β†’ output: 'RRRBRRR'", "expected_accepted": true, "expected_output": "RRRBRRR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBR' β†’ output: 'RRRBRBR'", "expected_accepted": true, "expected_output": "RRRBRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'RRRBRRB'", "expected_accepted": true, "expected_output": "RRRBRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RRRBB'", "expected_accepted": true, "expected_output": "RRRBB", "input": "B" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'RRRBBRB'", "expected_accepted": true, "expected_output": "RRRBBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'RRRBBR'", "expected_accepted": true, "expected_output": "RRRBBR", "input": "BR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'RR' β†’ output: 'RRRBRR'", "expected_accepted": true, "expected_output": "RRRBRR", "input": "BB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RRRBRR'", "expected_accepted": true, "expected_output": "RRRBRR", "input": "RR" }, { "check_output": true, "description": "Input 'RBRR' β†’ mutated: 'RBRR' β†’ output: 'RRRBRBRR'", "expected_accepted": true, "expected_output": "RRRBRBRR", "input": "RBRR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'RRB' β†’ output: 'RRRBRRB'", "expected_accepted": true, "expected_output": "RRRBRRB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RRRBRRR'", "expected_accepted": true, "expected_output": "RRRBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'RRRBBRBR'", "expected_accepted": true, "expected_output": "RRRBBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'RRRBRBRB'", "expected_accepted": true, "expected_output": "RRRBRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRRBBRBB' β†’ mutated: 'BRRRRRRR' β†’ output: 'RRRBBRRRRRRR'", "expected_accepted": true, "expected_output": "RRRBBRRRRRRR", "input": "BRRBBRBB" }, { "check_output": true, "description": "Input 'BBBBBBRBBBBB' β†’ mutated: 'RRRRRRRRRRRB' β†’ output: 'RRRBRRRRRRRRRRRB'", "expected_accepted": true, "expected_output": "RRRBRRRRRRRRRRRB", "input": "BBBBBBRBBBBB" } ]
manufactoria
hard
d4501e2d-4217-4b57-8811-570fce2f6888
prepend_sequence
Prepend RRRB after Replace patterns BB 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 R, then put 'RRRB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RRRB'", "expected_accepted": true, "expected_output": "RRRB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RRRBR'", "expected_accepted": true, "expected_output": "RRRBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'R' β†’ output: 'RRRBR'", "expected_accepted": true, "expected_output": "RRRBR", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'RRRBBBR'", "expected_accepted": true, "expected_output": "RRRBBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RR' β†’ output: 'RRRBRR'", "expected_accepted": true, "expected_output": "RRRBRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RR' β†’ output: 'RRRBRR'", "expected_accepted": true, "expected_output": "RRRBRR", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RRRBRR'", "expected_accepted": true, "expected_output": "RRRBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'RRRBBR'", "expected_accepted": true, "expected_output": "RRRBBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BR' β†’ output: 'RRRBBR'", "expected_accepted": true, "expected_output": "RRRBBR", "input": "BRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RRRBB'", "expected_accepted": true, "expected_output": "RRRBB", "input": "B" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RRRBBB'", "expected_accepted": true, "expected_output": "RRRBBB", "input": "BB" }, { "check_output": true, "description": "Input 'BBRB' β†’ mutated: 'BBR' β†’ output: 'RRRBBBR'", "expected_accepted": true, "expected_output": "RRRBBBR", "input": "BBRB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'RRRBBBB'", "expected_accepted": true, "expected_output": "RRRBBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RRRBRRR'", "expected_accepted": true, "expected_output": "RRRBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRR' β†’ output: 'RRRBBRR'", "expected_accepted": true, "expected_output": "RRRBBRR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RR' β†’ output: 'RRRBRR'", "expected_accepted": true, "expected_output": "RRRBRR", "input": "RBRB" }, { "check_output": true, "description": "Input 'RBRRRRBR' β†’ mutated: 'RRRRRR' β†’ output: 'RRRBRRRRRR'", "expected_accepted": true, "expected_output": "RRRBRRRRRR", "input": "RBRRRRBR" }, { "check_output": true, "description": "Input 'BRRBBRRBBRRR' β†’ mutated: 'BRRBRRBRRR' β†’ output: 'RRRBBRRBRRBRRR'", "expected_accepted": true, "expected_output": "RRRBBRRBRRBRRR", "input": "BRRBBRRBBRRR" } ]
manufactoria
hard
5af1a8ef-b8bc-40ed-aca8-33274074d29d
prepend_sequence
Prepend RRRB after Replace patterns RB 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 BB with RR, then put 'BRRB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BRRB'", "expected_accepted": true, "expected_output": "BRRB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BRRBR'", "expected_accepted": true, "expected_output": "BRRBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BRRBRB'", "expected_accepted": true, "expected_output": "BRRBRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'RRR' β†’ output: 'BRRBRRR'", "expected_accepted": true, "expected_output": "BRRBRRR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBR' β†’ output: 'BRRBRBR'", "expected_accepted": true, "expected_output": "BRRBRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'BRRBRRB'", "expected_accepted": true, "expected_output": "BRRBRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BRRBB'", "expected_accepted": true, "expected_output": "BRRBB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BRRBRR'", "expected_accepted": true, "expected_output": "BRRBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'BRRBBR'", "expected_accepted": true, "expected_output": "BRRBBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'BRRBBRB'", "expected_accepted": true, "expected_output": "BRRBBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'RR' β†’ output: 'BRRBRR'", "expected_accepted": true, "expected_output": "BRRBRR", "input": "BB" }, { "check_output": true, "description": "Input 'RBRR' β†’ mutated: 'RBRR' β†’ output: 'BRRBRBRR'", "expected_accepted": true, "expected_output": "BRRBRBRR", "input": "RBRR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'RRB' β†’ output: 'BRRBRRB'", "expected_accepted": true, "expected_output": "BRRBRRB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BRRBRRR'", "expected_accepted": true, "expected_output": "BRRBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'BRRBBRBR'", "expected_accepted": true, "expected_output": "BRRBBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'BRRBRBRB'", "expected_accepted": true, "expected_output": "BRRBRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RBBBRRRB' β†’ mutated: 'RRRBRRRB' β†’ output: 'BRRBRRRBRRRB'", "expected_accepted": true, "expected_output": "BRRBRRRBRRRB", "input": "RBBBRRRB" }, { "check_output": true, "description": "Input 'BBRBRBBRBBRR' β†’ mutated: 'RRRBRRRRRRRR' β†’ output: 'BRRBRRRBRRRRRRRR'", "expected_accepted": true, "expected_output": "BRRBRRRBRRRRRRRR", "input": "BBRBRBBRBBRR" } ]
manufactoria
hard
a9235d48-83e2-4378-8361-bb9f9295bf97
prepend_sequence
Prepend BRRB after Replace patterns BB 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 BR with RR, 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: 'RB' β†’ output: 'BBBRRB'", "expected_accepted": true, "expected_output": "BBBRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BRR' β†’ output: 'BBBRBRR'", "expected_accepted": true, "expected_output": "BBBRBRR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RRR' β†’ output: 'BBBRRRR'", "expected_accepted": true, "expected_output": "BBBRRRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'BBBRRRB'", "expected_accepted": true, "expected_output": "BBBRRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'RRB' β†’ output: 'BBBRRRB'", "expected_accepted": true, "expected_output": "BBBRRRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'RR' β†’ output: 'BBBRRR'", "expected_accepted": true, "expected_output": "BBBRRR", "input": "BR" }, { "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 'BB' β†’ mutated: 'BB' β†’ output: 'BBBRBB'", "expected_accepted": true, "expected_output": "BBBRBB", "input": "BB" }, { "check_output": true, "description": "Input 'BBRB' β†’ mutated: 'BRRB' β†’ output: 'BBBRBRRB'", "expected_accepted": true, "expected_output": "BBBRBRRB", "input": "BBRB" }, { "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 'BRBR' β†’ mutated: 'RRRR' β†’ output: 'BBBRRRRR'", "expected_accepted": true, "expected_output": "BBBRRRRR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RRRB' β†’ output: 'BBBRRRRB'", "expected_accepted": true, "expected_output": "BBBRRRRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RRRBBBBB' β†’ mutated: 'RRRBBBBB' β†’ output: 'BBBRRRRBBBBB'", "expected_accepted": true, "expected_output": "BBBRRRRBBBBB", "input": "RRRBBBBB" }, { "check_output": true, "description": "Input 'BRRRRBRBRRRB' β†’ mutated: 'RRRRRRRRRRRB' β†’ output: 'BBBRRRRRRRRRRRRB'", "expected_accepted": true, "expected_output": "BBBRRRRRRRRRRRRB", "input": "BRRRRBRBRRRB" } ]
manufactoria
hard
c7b19ad4-543c-4b28-a7aa-e16229d41a50
prepend_sequence
Prepend BBBR after Replace patterns BR 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 BR with BB, then put 'RBRR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RBRR'", "expected_accepted": true, "expected_output": "RBRR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RBRRR'", "expected_accepted": true, "expected_output": "RBRRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'RBRRRB'", "expected_accepted": true, "expected_output": "RBRRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBB' β†’ output: 'RBRRBBB'", "expected_accepted": true, "expected_output": "RBRRBBB", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBB' β†’ output: 'RBRRRBB'", "expected_accepted": true, "expected_output": "RBRRRBB", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'RBRRRRB'", "expected_accepted": true, "expected_output": "RBRRRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RBRRB'", "expected_accepted": true, "expected_output": "RBRRB", "input": "B" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BBB' β†’ output: 'RBRRBBB'", "expected_accepted": true, "expected_output": "RBRRBBB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BB' β†’ output: 'RBRRBB'", "expected_accepted": true, "expected_output": "RBRRBB", "input": "BR" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RBRRRR'", "expected_accepted": true, "expected_output": "RBRRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RBRRBB'", "expected_accepted": true, "expected_output": "RBRRBB", "input": "BB" }, { "check_output": true, "description": "Input 'RRBR' β†’ mutated: 'RRBB' β†’ output: 'RBRRRRBB'", "expected_accepted": true, "expected_output": "RBRRRRBB", "input": "RRBR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'RBRRBBB'", "expected_accepted": true, "expected_output": "RBRRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RBRRRRR'", "expected_accepted": true, "expected_output": "RBRRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BBBB' β†’ output: 'RBRRBBBB'", "expected_accepted": true, "expected_output": "RBRRBBBB", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBBB' β†’ output: 'RBRRRBBB'", "expected_accepted": true, "expected_output": "RBRRRBBB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBBRBBBB' β†’ mutated: 'BBBBBBBB' β†’ output: 'RBRRBBBBBBBB'", "expected_accepted": true, "expected_output": "RBRRBBBBBBBB", "input": "BBBRBBBB" }, { "check_output": true, "description": "Input 'RRRRBRRBRRBR' β†’ mutated: 'RRRRBBRBBRBB' β†’ output: 'RBRRRRRRBBRBBRBB'", "expected_accepted": true, "expected_output": "RBRRRRRRBBRBBRBB", "input": "RRRRBRRBRRBR" } ]
manufactoria
hard
e1043286-68d1-4b8e-8e4c-d9255a17897e
prepend_sequence
Prepend RBRR after Replace patterns BR 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\nReplace patterns BR with BB, then put 'B' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'B'", "expected_accepted": true, "expected_output": "B", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BRB'", "expected_accepted": true, "expected_output": "BRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBB' β†’ output: 'BBBB'", "expected_accepted": true, "expected_output": "BBBB", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBB' β†’ output: 'BRBB'", "expected_accepted": true, "expected_output": "BRBB", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'BRRB'", "expected_accepted": true, "expected_output": "BRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "B" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BBB' β†’ output: 'BBBB'", "expected_accepted": true, "expected_output": "BBBB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BB' β†’ output: 'BBB'", "expected_accepted": true, "expected_output": "BBB", "input": "BR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BBB'", "expected_accepted": true, "expected_output": "BBB", "input": "BB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "RR" }, { "check_output": true, "description": "Input 'BBBB' β†’ mutated: 'BBBB' β†’ output: 'BBBBB'", "expected_accepted": true, "expected_output": "BBBBB", "input": "BBBB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BBBB'", "expected_accepted": true, "expected_output": "BBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BBBB' β†’ output: 'BBBBB'", "expected_accepted": true, "expected_output": "BBBBB", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBBB' β†’ output: 'BRBBB'", "expected_accepted": true, "expected_output": "BRBBB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBBBBBRR' β†’ mutated: 'BBBBBBBR' β†’ output: 'BBBBBBBBR'", "expected_accepted": true, "expected_output": "BBBBBBBBR", "input": "BBBBBBRR" }, { "check_output": true, "description": "Input 'RRBBRRBRRRRR' β†’ mutated: 'RRBBBRBBRRRR' β†’ output: 'BRRBBBRBBRRRR'", "expected_accepted": true, "expected_output": "BRRBBBRBBRRRR", "input": "RRBBRRBRRRRR" } ]
manufactoria
hard
0fc26aa8-2b58-4f9b-8f26-b14383401098
prepend_sequence
Prepend B after Replace patterns BR 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\nReplace patterns BR with BB, then put 'BBBB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BBBB'", "expected_accepted": true, "expected_output": "BBBB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BBBBR'", "expected_accepted": true, "expected_output": "BBBBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BBBBRB'", "expected_accepted": true, "expected_output": "BBBBRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBB' β†’ output: 'BBBBBBB'", "expected_accepted": true, "expected_output": "BBBBBBB", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBB' β†’ output: 'BBBBRBB'", "expected_accepted": true, "expected_output": "BBBBRBB", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'BBBBRRB'", "expected_accepted": true, "expected_output": "BBBBRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BBBBB'", "expected_accepted": true, "expected_output": "BBBBB", "input": "B" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BBB' β†’ output: 'BBBBBBB'", "expected_accepted": true, "expected_output": "BBBBBBB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BB' β†’ output: 'BBBBBB'", "expected_accepted": true, "expected_output": "BBBBBB", "input": "BR" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BBBBRR'", "expected_accepted": true, "expected_output": "BBBBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BBBBBB'", "expected_accepted": true, "expected_output": "BBBBBB", "input": "BB" }, { "check_output": true, "description": "Input 'RBRR' β†’ mutated: 'RBBR' β†’ output: 'BBBBRBBR'", "expected_accepted": true, "expected_output": "BBBBRBBR", "input": "RBRR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BBBBBBB'", "expected_accepted": true, "expected_output": "BBBBBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BBBBRRR'", "expected_accepted": true, "expected_output": "BBBBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BBBB' β†’ output: 'BBBBBBBB'", "expected_accepted": true, "expected_output": "BBBBBBBB", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBBB' β†’ output: 'BBBBRBBB'", "expected_accepted": true, "expected_output": "BBBBRBBB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBRBBBBB' β†’ mutated: 'BBBBBBBB' β†’ output: 'BBBBBBBBBBBB'", "expected_accepted": true, "expected_output": "BBBBBBBBBBBB", "input": "BBRBBBBB" }, { "check_output": true, "description": "Input 'RBRRBRRBRRBB' β†’ mutated: 'RBBRBBRBBRBB' β†’ output: 'BBBBRBBRBBRBBRBB'", "expected_accepted": true, "expected_output": "BBBBRBBRBBRBBRBB", "input": "RBRRBRRBRRBB" } ]
manufactoria
hard
a199e35b-d44a-429f-a2a1-94a74c117865
prepend_sequence
Prepend BBBB after Replace patterns BR 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\nReplace patterns RB with BR, then put 'RBB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RBB'", "expected_accepted": true, "expected_output": "RBB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RBBR'", "expected_accepted": true, "expected_output": "RBBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'BR' β†’ output: 'RBBBR'", "expected_accepted": true, "expected_output": "RBBBR", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'RBBBBR'", "expected_accepted": true, "expected_output": "RBBBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'BRR' β†’ output: 'RBBBRR'", "expected_accepted": true, "expected_output": "RBBBRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RBR' β†’ output: 'RBBRBR'", "expected_accepted": true, "expected_output": "RBBRBR", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RBBB'", "expected_accepted": true, "expected_output": "RBBB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RBBRR'", "expected_accepted": true, "expected_output": "RBBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'RBBBR'", "expected_accepted": true, "expected_output": "RBBBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BBR' β†’ output: 'RBBBBR'", "expected_accepted": true, "expected_output": "RBBBBR", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RBBBB'", "expected_accepted": true, "expected_output": "RBBBB", "input": "BB" }, { "check_output": true, "description": "Input 'BRBB' β†’ mutated: 'BBRB' β†’ output: 'RBBBBRB'", "expected_accepted": true, "expected_output": "RBBBBRB", "input": "BRBB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'RBBBBB'", "expected_accepted": true, "expected_output": "RBBBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RBBRRR'", "expected_accepted": true, "expected_output": "RBBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BBRR' β†’ output: 'RBBBBRR'", "expected_accepted": true, "expected_output": "RBBBBRR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'BRBR' β†’ output: 'RBBBRBR'", "expected_accepted": true, "expected_output": "RBBBRBR", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBBRRRRR' β†’ mutated: 'BBBRRRRR' β†’ output: 'RBBBBBRRRRR'", "expected_accepted": true, "expected_output": "RBBBBBRRRRR", "input": "BBBRRRRR" }, { "check_output": true, "description": "Input 'RRBBRRBBBRRB' β†’ mutated: 'RBRBRBRBBRBR' β†’ output: 'RBBRBRBRBRBBRBR'", "expected_accepted": true, "expected_output": "RBBRBRBRBRBBRBR", "input": "RRBBRRBBBRRB" } ]
manufactoria
hard
2acf5631-548d-4a5b-94f7-570b7e33771d
prepend_sequence
Prepend RBB 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 RB with B, then put 'RBRR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RBRR'", "expected_accepted": true, "expected_output": "RBRR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RBRRR'", "expected_accepted": true, "expected_output": "RBRRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'B' β†’ output: 'RBRRB'", "expected_accepted": true, "expected_output": "RBRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'RBRRBBR'", "expected_accepted": true, "expected_output": "RBRRBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'BR' β†’ output: 'RBRRBR'", "expected_accepted": true, "expected_output": "RBRRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RB' β†’ output: 'RBRRRB'", "expected_accepted": true, "expected_output": "RBRRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RBRRB'", "expected_accepted": true, "expected_output": "RBRRB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RBRRRR'", "expected_accepted": true, "expected_output": "RBRRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'RBRRBR'", "expected_accepted": true, "expected_output": "RBRRBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BB' β†’ output: 'RBRRBB'", "expected_accepted": true, "expected_output": "RBRRBB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RBRRBB'", "expected_accepted": true, "expected_output": "RBRRBB", "input": "BB" }, { "check_output": true, "description": "Input 'RRBR' β†’ mutated: 'RBR' β†’ output: 'RBRRRBR'", "expected_accepted": true, "expected_output": "RBRRRBR", "input": "RRBR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'RBRRBBB'", "expected_accepted": true, "expected_output": "RBRRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RBRRRRR'", "expected_accepted": true, "expected_output": "RBRRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BBR' β†’ output: 'RBRRBBR'", "expected_accepted": true, "expected_output": "RBRRBBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'BB' β†’ output: 'RBRRBB'", "expected_accepted": true, "expected_output": "RBRRBB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRBRBRRB' β†’ mutated: 'BBBRB' β†’ output: 'RBRRBBBRB'", "expected_accepted": true, "expected_output": "RBRRBBBRB", "input": "BRBRBRRB" }, { "check_output": true, "description": "Input 'RRBRRRBRBRRR' β†’ mutated: 'RBRRBBRRR' β†’ output: 'RBRRRBRRBBRRR'", "expected_accepted": true, "expected_output": "RBRRRBRRBBRRR", "input": "RRBRRRBRBRRR" } ]
manufactoria
hard
56bf363e-f2b8-4942-a6c8-48074991ef2f
prepend_sequence
Prepend RBRR after Replace patterns RB with B
[ { "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 BB, 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: 'RB' β†’ output: 'RBRRB'", "expected_accepted": true, "expected_output": "RBRRB", "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: 'RBR' β†’ output: 'RBRRBR'", "expected_accepted": true, "expected_output": "RBRRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'BBB' β†’ output: 'RBRBBB'", "expected_accepted": true, "expected_output": "RBRBBB", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'BB' β†’ output: 'RBRBB'", "expected_accepted": true, "expected_output": "RBRBB", "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: 'BRB' β†’ output: 'RBRBRB'", "expected_accepted": true, "expected_output": "RBRBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RBRB'", "expected_accepted": true, "expected_output": "RBRB", "input": "B" }, { "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: 'BBBR' β†’ output: 'RBRBBBR'", "expected_accepted": true, "expected_output": "RBRBBBR", "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: 'BBR' β†’ output: 'RBRBBR'", "expected_accepted": true, "expected_output": "RBRBBR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'RBRBRBR'", "expected_accepted": true, "expected_output": "RBRBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'RBRRBRB'", "expected_accepted": true, "expected_output": "RBRRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RBBRBBBR' β†’ mutated: 'RBBRBBBR' β†’ output: 'RBRRBBRBBBR'", "expected_accepted": true, "expected_output": "RBRRBBRBBBR", "input": "RBBRBBBR" }, { "check_output": true, "description": "Input 'RBBBBRRBRBBR' β†’ mutated: 'RBBBBBBBRBBR' β†’ output: 'RBRRBBBBBBBRBBR'", "expected_accepted": true, "expected_output": "RBRRBBBBBBBRBBR", "input": "RBBBBRRBRBBR" } ]
manufactoria
hard
38bd0c5f-791c-4a2d-9035-86f23814b3ef
prepend_sequence
Prepend RBR after Replace patterns RR 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\nReplace patterns BB with BR, 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: 'BRR' β†’ output: 'BRBBBRR'", "expected_accepted": true, "expected_output": "BRBBBRR", "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 'BRB' β†’ mutated: 'BRB' β†’ output: 'BRBBBRB'", "expected_accepted": true, "expected_output": "BRBBBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'BRBBBR'", "expected_accepted": true, "expected_output": "BRBBBR", "input": "BR" }, { "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 'BB' β†’ mutated: 'BR' β†’ output: 'BRBBBR'", "expected_accepted": true, "expected_output": "BRBBBR", "input": "BB" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'BRBBBRBR'", "expected_accepted": true, "expected_output": "BRBBBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BRB' β†’ output: 'BRBBBRB'", "expected_accepted": true, "expected_output": "BRBBBRB", "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 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'BRBBRBRB'", "expected_accepted": true, "expected_output": "BRBBRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RRBBRBBR' β†’ mutated: 'RRBRRBRR' β†’ output: 'BRBBRRBRRBRR'", "expected_accepted": true, "expected_output": "BRBBRRBRRBRR", "input": "RRBBRBBR" }, { "check_output": true, "description": "Input 'RRBBBRRRBBRR' β†’ mutated: 'RRBRBRRRBRRR' β†’ output: 'BRBBRRBRBRRRBRRR'", "expected_accepted": true, "expected_output": "BRBBRRBRBRRRBRRR", "input": "RRBBBRRRBBRR" } ]
manufactoria
hard
236506b5-3f6c-4c1a-8ea1-2d8a48a11ff0
prepend_sequence
Prepend BRBB after Replace patterns BB 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 BR with R, then put 'BRBR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BRBR'", "expected_accepted": true, "expected_output": "BRBR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BRBRR'", "expected_accepted": true, "expected_output": "BRBRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BRBRRB'", "expected_accepted": true, "expected_output": "BRBRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BR' β†’ output: 'BRBRBR'", "expected_accepted": true, "expected_output": "BRBRBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RR' β†’ output: 'BRBRRR'", "expected_accepted": true, "expected_output": "BRBRRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'BRBRRRB'", "expected_accepted": true, "expected_output": "BRBRRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BRBRRR'", "expected_accepted": true, "expected_output": "BRBRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'R' β†’ output: 'BRBRR'", "expected_accepted": true, "expected_output": "BRBRR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'RB' β†’ output: 'BRBRRB'", "expected_accepted": true, "expected_output": "BRBRRB", "input": "BRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BRBRB'", "expected_accepted": true, "expected_output": "BRBRB", "input": "B" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BRBRBB'", "expected_accepted": true, "expected_output": "BRBRBB", "input": "BB" }, { "check_output": true, "description": "Input 'RRRR' β†’ mutated: 'RRRR' β†’ output: 'BRBRRRRR'", "expected_accepted": true, "expected_output": "BRBRRRRR", "input": "RRRR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BRBRBBB'", "expected_accepted": true, "expected_output": "BRBRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BRBRRRR'", "expected_accepted": true, "expected_output": "BRBRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'RR' β†’ output: 'BRBRRR'", "expected_accepted": true, "expected_output": "BRBRRR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RRB' β†’ output: 'BRBRRRB'", "expected_accepted": true, "expected_output": "BRBRRRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBBBRRBB' β†’ mutated: 'BBBRRBB' β†’ output: 'BRBRBBBRRBB'", "expected_accepted": true, "expected_output": "BRBRBBBRRBB", "input": "BBBBRRBB" }, { "check_output": true, "description": "Input 'RBBRBRRRRBBR' β†’ mutated: 'RBRRRRRBR' β†’ output: 'BRBRRBRRRRRBR'", "expected_accepted": true, "expected_output": "BRBRRBRRRRRBR", "input": "RBBRBRRRRBBR" } ]
manufactoria
hard
0d04c07c-adf7-4371-8cd1-a610615ea960
prepend_sequence
Prepend BRBR after Replace patterns BR 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 RR, then put 'RRRR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RRRR'", "expected_accepted": true, "expected_output": "RRRR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RRRRR'", "expected_accepted": true, "expected_output": "RRRRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'RRRRRB'", "expected_accepted": true, "expected_output": "RRRRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BRR' β†’ output: 'RRRRBRR'", "expected_accepted": true, "expected_output": "RRRRBRR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RRR' β†’ output: 'RRRRRRR'", "expected_accepted": true, "expected_output": "RRRRRRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'RRRRRRB'", "expected_accepted": true, "expected_output": "RRRRRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RRRRB'", "expected_accepted": true, "expected_output": "RRRRB", "input": "B" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'RRB' β†’ output: 'RRRRRRB'", "expected_accepted": true, "expected_output": "RRRRRRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'RR' β†’ output: 'RRRRRR'", "expected_accepted": true, "expected_output": "RRRRRR", "input": "BR" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RRRRRR'", "expected_accepted": true, "expected_output": "RRRRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RRRRBB'", "expected_accepted": true, "expected_output": "RRRRBB", "input": "BB" }, { "check_output": true, "description": "Input 'BBBR' β†’ mutated: 'BBRR' β†’ output: 'RRRRBBRR'", "expected_accepted": true, "expected_output": "RRRRBBRR", "input": "BBBR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'RRRRBBB'", "expected_accepted": true, "expected_output": "RRRRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RRRRRRR'", "expected_accepted": true, "expected_output": "RRRRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'RRRR' β†’ output: 'RRRRRRRR'", "expected_accepted": true, "expected_output": "RRRRRRRR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RRRB' β†’ output: 'RRRRRRRB'", "expected_accepted": true, "expected_output": "RRRRRRRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RBBRRRBR' β†’ mutated: 'RBRRRRRR' β†’ output: 'RRRRRBRRRRRR'", "expected_accepted": true, "expected_output": "RRRRRBRRRRRR", "input": "RBBRRRBR" }, { "check_output": true, "description": "Input 'RRBBRRBRRBRB' β†’ mutated: 'RRBRRRRRRRRB' β†’ output: 'RRRRRRBRRRRRRRRB'", "expected_accepted": true, "expected_output": "RRRRRRBRRRRRRRRB", "input": "RRBBRRBRRBRB" } ]
manufactoria
hard
2a508955-a3dc-4d95-8826-98fbb902dacf
prepend_sequence
Prepend RRRR after Replace patterns BR 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 BR with BB, then put 'BBRR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BBRR'", "expected_accepted": true, "expected_output": "BBRR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BBRRR'", "expected_accepted": true, "expected_output": "BBRRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BBRRRB'", "expected_accepted": true, "expected_output": "BBRRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBB' β†’ output: 'BBRRBBB'", "expected_accepted": true, "expected_output": "BBRRBBB", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBB' β†’ output: 'BBRRRBB'", "expected_accepted": true, "expected_output": "BBRRRBB", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'BBRRRRB'", "expected_accepted": true, "expected_output": "BBRRRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BBRRRR'", "expected_accepted": true, "expected_output": "BBRRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BB' β†’ output: 'BBRRBB'", "expected_accepted": true, "expected_output": "BBRRBB", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BBB' β†’ output: 'BBRRBBB'", "expected_accepted": true, "expected_output": "BBRRBBB", "input": "BRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BBRRB'", "expected_accepted": true, "expected_output": "BBRRB", "input": "B" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BBRRBB'", "expected_accepted": true, "expected_output": "BBRRBB", "input": "BB" }, { "check_output": true, "description": "Input 'BBRR' β†’ mutated: 'BBBR' β†’ output: 'BBRRBBBR'", "expected_accepted": true, "expected_output": "BBRRBBBR", "input": "BBRR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BBRRBBB'", "expected_accepted": true, "expected_output": "BBRRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BBRRRRR'", "expected_accepted": true, "expected_output": "BBRRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BBBB' β†’ output: 'BBRRBBBB'", "expected_accepted": true, "expected_output": "BBRRBBBB", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBBB' β†’ output: 'BBRRRBBB'", "expected_accepted": true, "expected_output": "BBRRRBBB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRBRRBRR' β†’ mutated: 'BBBBRBBR' β†’ output: 'BBRRBBBBRBBR'", "expected_accepted": true, "expected_output": "BBRRBBBBRBBR", "input": "BRBRRBRR" }, { "check_output": true, "description": "Input 'BBBBBRBBRRBR' β†’ mutated: 'BBBBBBBBBRBB' β†’ output: 'BBRRBBBBBBBBBRBB'", "expected_accepted": true, "expected_output": "BBRRBBBBBBBBBRBB", "input": "BBBBBRBBRRBR" } ]
manufactoria
hard
6b6f4756-916d-482c-85b5-29d468ebdadc
prepend_sequence
Prepend BBRR after Replace patterns BR 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\nReplace patterns RB with B, then put 'BBRR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BBRR'", "expected_accepted": true, "expected_output": "BBRR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BBRRR'", "expected_accepted": true, "expected_output": "BBRRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'B' β†’ output: 'BBRRB'", "expected_accepted": true, "expected_output": "BBRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'BBRRBBR'", "expected_accepted": true, "expected_output": "BBRRBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'BR' β†’ output: 'BBRRBR'", "expected_accepted": true, "expected_output": "BBRRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RB' β†’ output: 'BBRRRB'", "expected_accepted": true, "expected_output": "BBRRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BB' β†’ output: 'BBRRBB'", "expected_accepted": true, "expected_output": "BBRRBB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'BBRRBR'", "expected_accepted": true, "expected_output": "BBRRBR", "input": "BR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BBRRBB'", "expected_accepted": true, "expected_output": "BBRRBB", "input": "BB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BBRRB'", "expected_accepted": true, "expected_output": "BBRRB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BBRRRR'", "expected_accepted": true, "expected_output": "BBRRRR", "input": "RR" }, { "check_output": true, "description": "Input 'RBBR' β†’ mutated: 'BBR' β†’ output: 'BBRRBBR'", "expected_accepted": true, "expected_output": "BBRRBBR", "input": "RBBR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BBRRBBB'", "expected_accepted": true, "expected_output": "BBRRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BBRRRRR'", "expected_accepted": true, "expected_output": "BBRRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BBR' β†’ output: 'BBRRBBR'", "expected_accepted": true, "expected_output": "BBRRBBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'BB' β†’ output: 'BBRRBB'", "expected_accepted": true, "expected_output": "BBRRBB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RRBRBBRB' β†’ mutated: 'RBBBB' β†’ output: 'BBRRRBBBB'", "expected_accepted": true, "expected_output": "BBRRRBBBB", "input": "RRBRBBRB" }, { "check_output": true, "description": "Input 'BBRRBRRBRBRR' β†’ mutated: 'BBRBRBBRR' β†’ output: 'BBRRBBRBRBBRR'", "expected_accepted": true, "expected_output": "BBRRBBRBRBBRR", "input": "BBRRBRRBRBRR" } ]
manufactoria
hard
34ca252a-1466-4a1a-9e2d-0ed06c0ccdf9
prepend_sequence
Prepend BBRR after Replace patterns RB with B
[ { "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 'BRB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BRB'", "expected_accepted": true, "expected_output": "BRB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BRBR'", "expected_accepted": true, "expected_output": "BRBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BRBRB'", "expected_accepted": true, "expected_output": "BRBRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BRB' β†’ output: 'BRBBRB'", "expected_accepted": true, "expected_output": "BRBBRB", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RRB' β†’ output: 'BRBRRB'", "expected_accepted": true, "expected_output": "BRBRRB", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'BRBRRB'", "expected_accepted": true, "expected_output": "BRBRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BRBB'", "expected_accepted": true, "expected_output": "BRBB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BRBRR'", "expected_accepted": true, "expected_output": "BRBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'RB' β†’ output: 'BRBRB'", "expected_accepted": true, "expected_output": "BRBRB", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'RBB' β†’ output: 'BRBRBB'", "expected_accepted": true, "expected_output": "BRBRBB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BRBBB'", "expected_accepted": true, "expected_output": "BRBBB", "input": "BB" }, { "check_output": true, "description": "Input 'BBBR' β†’ mutated: 'BBRB' β†’ output: 'BRBBBRB'", "expected_accepted": true, "expected_output": "BRBBBRB", "input": "BBBR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BRBBBB'", "expected_accepted": true, "expected_output": "BRBBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BRBRRR'", "expected_accepted": true, "expected_output": "BRBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'RBRB' β†’ output: 'BRBRBRB'", "expected_accepted": true, "expected_output": "BRBRBRB", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RRBB' β†’ output: 'BRBRRBB'", "expected_accepted": true, "expected_output": "BRBRRBB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RRRRRRBB' β†’ mutated: 'RRRRRRBB' β†’ output: 'BRBRRRRRRBB'", "expected_accepted": true, "expected_output": "BRBRRRRRRBB", "input": "RRRRRRBB" }, { "check_output": true, "description": "Input 'RBBRRRRBBRBR' β†’ mutated: 'RBRBRRRBRBRB' β†’ output: 'BRBRBRBRRRBRBRB'", "expected_accepted": true, "expected_output": "BRBRBRBRRRBRBRB", "input": "RBBRRRRBBRBR" } ]
manufactoria
hard
81b50a54-1602-4cb1-8748-4bc624c5ace6
prepend_sequence
Prepend BRB after Replace patterns BR 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\nRemove patterns BB, then put 'RRBB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RRBB'", "expected_accepted": true, "expected_output": "RRBB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RRBBR'", "expected_accepted": true, "expected_output": "RRBBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'RRBBRB'", "expected_accepted": true, "expected_output": "RRBBRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'R' β†’ output: 'RRBBR'", "expected_accepted": true, "expected_output": "RRBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBR' β†’ output: 'RRBBRBR'", "expected_accepted": true, "expected_output": "RRBBRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'RRBBRRB'", "expected_accepted": true, "expected_output": "RRBBRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RRBBB'", "expected_accepted": true, "expected_output": "RRBBB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RRBBRR'", "expected_accepted": true, "expected_output": "RRBBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'RRBBBR'", "expected_accepted": true, "expected_output": "RRBBBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'RRBBBRB'", "expected_accepted": true, "expected_output": "RRBBBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: '' β†’ output: 'RRBB'", "expected_accepted": true, "expected_output": "RRBB", "input": "BB" }, { "check_output": true, "description": "Input 'RRRR' β†’ mutated: 'RRRR' β†’ output: 'RRBBRRRR'", "expected_accepted": true, "expected_output": "RRBBRRRR", "input": "RRRR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'B' β†’ output: 'RRBBB'", "expected_accepted": true, "expected_output": "RRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RRBBRRR'", "expected_accepted": true, "expected_output": "RRBBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'RRBBBRBR'", "expected_accepted": true, "expected_output": "RRBBBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'RRBBRBRB'", "expected_accepted": true, "expected_output": "RRBBRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRRRRBBB' β†’ mutated: 'BRRRRB' β†’ output: 'RRBBBRRRRB'", "expected_accepted": true, "expected_output": "RRBBBRRRRB", "input": "BRRRRBBB" }, { "check_output": true, "description": "Input 'BRRBBRRRBRBR' β†’ mutated: 'BRRRRRBRBR' β†’ output: 'RRBBBRRRRRBRBR'", "expected_accepted": true, "expected_output": "RRBBBRRRRRBRBR", "input": "BRRBBRRRBRBR" } ]
manufactoria
hard
eb0e884b-573d-44c8-93fa-02e317bfd1d8
prepend_sequence
Prepend RRBB after Remove patterns 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\nReplace patterns RB with RR, then put 'RBB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RBB'", "expected_accepted": true, "expected_output": "RBB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RBBR'", "expected_accepted": true, "expected_output": "RBBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RR' β†’ output: 'RBBRR'", "expected_accepted": true, "expected_output": "RBBRR", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'RBBBBR'", "expected_accepted": true, "expected_output": "RBBBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RRR' β†’ output: 'RBBRRR'", "expected_accepted": true, "expected_output": "RBBRRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRR' β†’ output: 'RBBRRR'", "expected_accepted": true, "expected_output": "RBBRRR", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RBBB'", "expected_accepted": true, "expected_output": "RBBB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RBBRR'", "expected_accepted": true, "expected_output": "RBBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'RBBBR'", "expected_accepted": true, "expected_output": "RBBBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRR' β†’ output: 'RBBBRR'", "expected_accepted": true, "expected_output": "RBBBRR", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RBBBB'", "expected_accepted": true, "expected_output": "RBBBB", "input": "BB" }, { "check_output": true, "description": "Input 'RRBB' β†’ mutated: 'RRRB' β†’ output: 'RBBRRRB'", "expected_accepted": true, "expected_output": "RBBRRRB", "input": "RRBB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'RBBBBB'", "expected_accepted": true, "expected_output": "RBBBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RBBRRR'", "expected_accepted": true, "expected_output": "RBBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRRR' β†’ output: 'RBBBRRR'", "expected_accepted": true, "expected_output": "RBBBRRR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RRRR' β†’ output: 'RBBRRRR'", "expected_accepted": true, "expected_output": "RBBRRRR", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRRRBBRB' β†’ mutated: 'BRRRRBRR' β†’ output: 'RBBBRRRRBRR'", "expected_accepted": true, "expected_output": "RBBBRRRRBRR", "input": "BRRRBBRB" }, { "check_output": true, "description": "Input 'BRBBBBRRBBBR' β†’ mutated: 'BRRBBBRRRBBR' β†’ output: 'RBBBRRBBBRRRBBR'", "expected_accepted": true, "expected_output": "RBBBRRBBBRRRBBR", "input": "BRBBBBRRBBBR" } ]
manufactoria
hard
02027549-d471-4b8c-929f-98561e349dcd
prepend_sequence
Prepend RBB 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 BB with R, then put 'BBRB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BBRB'", "expected_accepted": true, "expected_output": "BBRB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BBRBR'", "expected_accepted": true, "expected_output": "BBRBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BBRBRB'", "expected_accepted": true, "expected_output": "BBRBRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'RR' β†’ output: 'BBRBRR'", "expected_accepted": true, "expected_output": "BBRBRR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBR' β†’ output: 'BBRBRBR'", "expected_accepted": true, "expected_output": "BBRBRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'BBRBRRB'", "expected_accepted": true, "expected_output": "BBRBRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BBRBRR'", "expected_accepted": true, "expected_output": "BBRBRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'BBRBBR'", "expected_accepted": true, "expected_output": "BBRBBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'BBRBBRB'", "expected_accepted": true, "expected_output": "BBRBBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'R' β†’ output: 'BBRBR'", "expected_accepted": true, "expected_output": "BBRBR", "input": "BB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BBRBB'", "expected_accepted": true, "expected_output": "BBRBB", "input": "B" }, { "check_output": true, "description": "Input 'BBBB' β†’ mutated: 'RR' β†’ output: 'BBRBRR'", "expected_accepted": true, "expected_output": "BBRBRR", "input": "BBBB" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'RB' β†’ output: 'BBRBRB'", "expected_accepted": true, "expected_output": "BBRBRB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BBRBRRR'", "expected_accepted": true, "expected_output": "BBRBRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'BBRBBRBR'", "expected_accepted": true, "expected_output": "BBRBBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'BBRBRBRB'", "expected_accepted": true, "expected_output": "BBRBRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRRRBBRR' β†’ mutated: 'BRRRRRR' β†’ output: 'BBRBBRRRRRR'", "expected_accepted": true, "expected_output": "BBRBBRRRRRR", "input": "BRRRBBRR" }, { "check_output": true, "description": "Input 'RBRRRBBBRBBB' β†’ mutated: 'RBRRRRBRRB' β†’ output: 'BBRBRBRRRRBRRB'", "expected_accepted": true, "expected_output": "BBRBRBRRRRBRRB", "input": "RBRRRBBBRBBB" } ]
manufactoria
hard
dc92631e-b690-4b31-bfda-0d2fe0d0cf7b
prepend_sequence
Prepend BBRB after Replace patterns BB 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\nRemove patterns RB, then put 'RBRR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RBRR'", "expected_accepted": true, "expected_output": "RBRR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RBRRR'", "expected_accepted": true, "expected_output": "RBRRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: '' β†’ output: 'RBRR'", "expected_accepted": true, "expected_output": "RBRR", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'RBRRBBR'", "expected_accepted": true, "expected_output": "RBRRBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'R' β†’ output: 'RBRRR'", "expected_accepted": true, "expected_output": "RBRRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'R' β†’ output: 'RBRRR'", "expected_accepted": true, "expected_output": "RBRRR", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RBRRB'", "expected_accepted": true, "expected_output": "RBRRB", "input": "B" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'B' β†’ output: 'RBRRB'", "expected_accepted": true, "expected_output": "RBRRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'RBRRBR'", "expected_accepted": true, "expected_output": "RBRRBR", "input": "BR" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RBRRRR'", "expected_accepted": true, "expected_output": "RBRRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RBRRBB'", "expected_accepted": true, "expected_output": "RBRRBB", "input": "BB" }, { "check_output": true, "description": "Input 'RRRR' β†’ mutated: 'RRRR' β†’ output: 'RBRRRRRR'", "expected_accepted": true, "expected_output": "RBRRRRRR", "input": "RRRR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'RBRRBBB'", "expected_accepted": true, "expected_output": "RBRRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RBRRRRR'", "expected_accepted": true, "expected_output": "RBRRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BR' β†’ output: 'RBRRBR'", "expected_accepted": true, "expected_output": "RBRRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: '' β†’ output: 'RBRR'", "expected_accepted": true, "expected_output": "RBRR", "input": "RBRB" }, { "check_output": true, "description": "Input 'RRRBRBRR' β†’ mutated: 'RRRR' β†’ output: 'RBRRRRRR'", "expected_accepted": true, "expected_output": "RBRRRRRR", "input": "RRRBRBRR" }, { "check_output": true, "description": "Input 'RRRRRBBRRRBR' β†’ mutated: 'RRRRBRRR' β†’ output: 'RBRRRRRRBRRR'", "expected_accepted": true, "expected_output": "RBRRRRRRBRRR", "input": "RRRRRBBRRRBR" } ]
manufactoria
hard
e0c5349b-048f-4d36-af14-41c65db2a294
prepend_sequence
Prepend RBRR 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\nRemove patterns RB, 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: '' β†’ output: 'BB'", "expected_accepted": true, "expected_output": "BB", "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: 'R' β†’ output: 'BBR'", "expected_accepted": true, "expected_output": "BBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'R' β†’ output: 'BBR'", "expected_accepted": true, "expected_output": "BBR", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BBRR'", "expected_accepted": true, "expected_output": "BBRR", "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: 'B' β†’ output: 'BBB'", "expected_accepted": true, "expected_output": "BBB", "input": "BRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BBB'", "expected_accepted": true, "expected_output": "BBB", "input": "B" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BBBB'", "expected_accepted": true, "expected_output": "BBBB", "input": "BB" }, { "check_output": true, "description": "Input 'BRRB' β†’ mutated: 'BR' β†’ output: 'BBBR'", "expected_accepted": true, "expected_output": "BBBR", "input": "BRRB" }, { "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: 'BR' β†’ output: 'BBBR'", "expected_accepted": true, "expected_output": "BBBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: '' β†’ output: 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RBBRRBBR' β†’ mutated: 'BRBR' β†’ output: 'BBBRBR'", "expected_accepted": true, "expected_output": "BBBRBR", "input": "RBBRRBBR" }, { "check_output": true, "description": "Input 'RRRBBRBRRRBB' β†’ mutated: 'RRBRRB' β†’ output: 'BBRRBRRB'", "expected_accepted": true, "expected_output": "BBRRBRRB", "input": "RRRBBRBRRRBB" } ]
manufactoria
hard
01368c97-3d2d-4dde-ba80-520f74587ef9
prepend_sequence
Prepend BB 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 BR with BB, then put 'RBBR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'RBBR'", "expected_accepted": true, "expected_output": "RBBR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'RBBRR'", "expected_accepted": true, "expected_output": "RBBRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'RBBRRB'", "expected_accepted": true, "expected_output": "RBBRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBB' β†’ output: 'RBBRBBB'", "expected_accepted": true, "expected_output": "RBBRBBB", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBB' β†’ output: 'RBBRRBB'", "expected_accepted": true, "expected_output": "RBBRRBB", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRB' β†’ output: 'RBBRRRB'", "expected_accepted": true, "expected_output": "RBBRRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'RBBRRR'", "expected_accepted": true, "expected_output": "RBBRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BB' β†’ output: 'RBBRBB'", "expected_accepted": true, "expected_output": "RBBRBB", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BBB' β†’ output: 'RBBRBBB'", "expected_accepted": true, "expected_output": "RBBRBBB", "input": "BRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'RBBRB'", "expected_accepted": true, "expected_output": "RBBRB", "input": "B" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'RBBRBB'", "expected_accepted": true, "expected_output": "RBBRBB", "input": "BB" }, { "check_output": true, "description": "Input 'RRRR' β†’ mutated: 'RRRR' β†’ output: 'RBBRRRRR'", "expected_accepted": true, "expected_output": "RBBRRRRR", "input": "RRRR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'RBBRBBB'", "expected_accepted": true, "expected_output": "RBBRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'RBBRRRR'", "expected_accepted": true, "expected_output": "RBBRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BBBB' β†’ output: 'RBBRBBBB'", "expected_accepted": true, "expected_output": "RBBRBBBB", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBBB' β†’ output: 'RBBRRBBB'", "expected_accepted": true, "expected_output": "RBBRRBBB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RRBBRBRB' β†’ mutated: 'RRBBBBBB' β†’ output: 'RBBRRRBBBBBB'", "expected_accepted": true, "expected_output": "RBBRRRBBBBBB", "input": "RRBBRBRB" }, { "check_output": true, "description": "Input 'RRBRBBBBRRRR' β†’ mutated: 'RRBBBBBBBRRR' β†’ output: 'RBBRRRBBBBBBBRRR'", "expected_accepted": true, "expected_output": "RBBRRRBBBBBBBRRR", "input": "RRBRBBBBRRRR" } ]
manufactoria
hard
0d8c0e14-58c6-4a7f-9970-0bc9f6b34be1
prepend_sequence
Prepend RBBR after Replace patterns BR 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\nReplace patterns RB with BB, then put 'BRBR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BRBR'", "expected_accepted": true, "expected_output": "BRBR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BRBRR'", "expected_accepted": true, "expected_output": "BRBRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'BB' β†’ output: 'BRBRBB'", "expected_accepted": true, "expected_output": "BRBRBB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'BRBRBBR'", "expected_accepted": true, "expected_output": "BRBRBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'BBR' β†’ output: 'BRBRBBR'", "expected_accepted": true, "expected_output": "BRBRBBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RBB' β†’ output: 'BRBRRBB'", "expected_accepted": true, "expected_output": "BRBRRBB", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BRBRRR'", "expected_accepted": true, "expected_output": "BRBRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'BRBRBR'", "expected_accepted": true, "expected_output": "BRBRBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BBB' β†’ output: 'BRBRBBB'", "expected_accepted": true, "expected_output": "BRBRBBB", "input": "BRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BRBRB'", "expected_accepted": true, "expected_output": "BRBRB", "input": "B" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BRBRBB'", "expected_accepted": true, "expected_output": "BRBRBB", "input": "BB" }, { "check_output": true, "description": "Input 'RRRR' β†’ mutated: 'RRRR' β†’ output: 'BRBRRRRR'", "expected_accepted": true, "expected_output": "BRBRRRRR", "input": "RRRR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BRBRBBB'", "expected_accepted": true, "expected_output": "BRBRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BRBRRRR'", "expected_accepted": true, "expected_output": "BRBRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BBBR' β†’ output: 'BRBRBBBR'", "expected_accepted": true, "expected_output": "BRBRBBBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'BBBB' β†’ output: 'BRBRBBBB'", "expected_accepted": true, "expected_output": "BRBRBBBB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBRBBBRB' β†’ mutated: 'BBBBBBBB' β†’ output: 'BRBRBBBBBBBB'", "expected_accepted": true, "expected_output": "BRBRBBBBBBBB", "input": "BBRBBBRB" }, { "check_output": true, "description": "Input 'BBBBRBRRRRBB' β†’ mutated: 'BBBBBBRRRBBB' β†’ output: 'BRBRBBBBBBRRRBBB'", "expected_accepted": true, "expected_output": "BRBRBBBBBBRRRBBB", "input": "BBBBRBRRRRBB" } ]
manufactoria
hard
f3c0e219-5db0-4622-bbf8-e2f04ee2f97b
prepend_sequence
Prepend BRBR 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 RR, then put 'BBRB' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BBRB'", "expected_accepted": true, "expected_output": "BBRB", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BBRBR'", "expected_accepted": true, "expected_output": "BBRBR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RB' β†’ output: 'BBRBRB'", "expected_accepted": true, "expected_output": "BBRBRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'BBRBBBR'", "expected_accepted": true, "expected_output": "BBRBBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RBR' β†’ output: 'BBRBRBR'", "expected_accepted": true, "expected_output": "BBRBRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'B' β†’ output: 'BBRBB'", "expected_accepted": true, "expected_output": "BBRBB", "input": "RRB" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRB' β†’ output: 'BBRBBRB'", "expected_accepted": true, "expected_output": "BBRBBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'BBRBBR'", "expected_accepted": true, "expected_output": "BBRBBR", "input": "BR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BBRBBB'", "expected_accepted": true, "expected_output": "BBRBBB", "input": "BB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BBRBB'", "expected_accepted": true, "expected_output": "BBRBB", "input": "B" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: '' β†’ output: 'BBRB'", "expected_accepted": true, "expected_output": "BBRB", "input": "RR" }, { "check_output": true, "description": "Input 'RRRR' β†’ mutated: '' β†’ output: 'BBRB'", "expected_accepted": true, "expected_output": "BBRB", "input": "RRRR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BBRBBBB'", "expected_accepted": true, "expected_output": "BBRBBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'R' β†’ output: 'BBRBR'", "expected_accepted": true, "expected_output": "BBRBR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRBR' β†’ output: 'BBRBBRBR'", "expected_accepted": true, "expected_output": "BBRBBRBR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RBRB' β†’ output: 'BBRBRBRB'", "expected_accepted": true, "expected_output": "BBRBRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'RBBRRBRR' β†’ mutated: 'RBBB' β†’ output: 'BBRBRBBB'", "expected_accepted": true, "expected_output": "BBRBRBBB", "input": "RBBRRBRR" }, { "check_output": true, "description": "Input 'BBBRBBRRRRRR' β†’ mutated: 'BBBRBB' β†’ output: 'BBRBBBBRBB'", "expected_accepted": true, "expected_output": "BBRBBBBRBB", "input": "BBBRBBRRRRRR" } ]
manufactoria
hard
00ee2a96-e083-4579-9345-bb129de2c44a
prepend_sequence
Prepend BBRB after Remove patterns 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 RR, then put 'BR' at the beginning of the tape. The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' β†’ mutated: '' β†’ output: 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "" }, { "check_output": true, "description": "Input 'R' β†’ mutated: 'R' β†’ output: 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' β†’ mutated: 'RR' β†’ output: 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' β†’ mutated: 'BBR' β†’ output: 'BRBBR'", "expected_accepted": true, "expected_output": "BRBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' β†’ mutated: 'RRR' β†’ output: 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' β†’ mutated: 'RRR' β†’ output: 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "RRB" }, { "check_output": true, "description": "Input 'B' β†’ mutated: 'B' β†’ output: 'BRB'", "expected_accepted": true, "expected_output": "BRB", "input": "B" }, { "check_output": true, "description": "Input 'BRB' β†’ mutated: 'BRR' β†’ output: 'BRBRR'", "expected_accepted": true, "expected_output": "BRBRR", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' β†’ mutated: 'BR' β†’ output: 'BRBR'", "expected_accepted": true, "expected_output": "BRBR", "input": "BR" }, { "check_output": true, "description": "Input 'BB' β†’ mutated: 'BB' β†’ output: 'BRBB'", "expected_accepted": true, "expected_output": "BRBB", "input": "BB" }, { "check_output": true, "description": "Input 'RR' β†’ mutated: 'RR' β†’ output: 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "RR" }, { "check_output": true, "description": "Input 'RRRR' β†’ mutated: 'RRRR' β†’ output: 'BRRRRR'", "expected_accepted": true, "expected_output": "BRRRRR", "input": "RRRR" }, { "check_output": true, "description": "Input 'BBB' β†’ mutated: 'BBB' β†’ output: 'BRBBB'", "expected_accepted": true, "expected_output": "BRBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'RRR' β†’ mutated: 'RRR' β†’ output: 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "RRR" }, { "check_output": true, "description": "Input 'BRBR' β†’ mutated: 'BRRR' β†’ output: 'BRBRRR'", "expected_accepted": true, "expected_output": "BRBRRR", "input": "BRBR" }, { "check_output": true, "description": "Input 'RBRB' β†’ mutated: 'RRRR' β†’ output: 'BRRRRR'", "expected_accepted": true, "expected_output": "BRRRRR", "input": "RBRB" }, { "check_output": true, "description": "Input 'RBRBRRBR' β†’ mutated: 'RRRRRRRR' β†’ output: 'BRRRRRRRRR'", "expected_accepted": true, "expected_output": "BRRRRRRRRR", "input": "RBRBRRBR" }, { "check_output": true, "description": "Input 'RRRBBBBRBBBR' β†’ mutated: 'RRRRBBBRRBBR' β†’ output: 'BRRRRRBBBRRBBR'", "expected_accepted": true, "expected_output": "BRRRRRBBBRRBBR", "input": "RRRBBBBRBBBR" } ]
manufactoria
hard
ac76b69c-2619-4816-8f7a-d6192c51e2d0
prepend_sequence
Prepend BR after Replace patterns RB with RR