messages
listlengths
1
1
ground_truth
listlengths
12
24
dataset
stringclasses
1 value
difficulty
stringclasses
2 values
id
stringlengths
36
36
problem_family
stringclasses
1 value
name
stringlengths
19
27
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(BGG)?(BRG)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "G" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGGBRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRGBGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGGRBRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRBBGGRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYBBRGYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRGGRGRY" } ]
manufactoria
medium
93849a69-dff5-4ce5-b09e-38e30cb0fac5
regex_pattern
Regex Pattern: (BGG)?(BRG)?
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(BBB)*(RB)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "Y" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBBRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBBBBBRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBBBBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBBBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBBGRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYYBBYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBGRRBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYYYG" } ]
manufactoria
medium
f43a2a36-b694-4ac0-bb66-3915461b7905
regex_pattern
Regex Pattern: (BBB)*(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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(YYR)*(BR)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "Y" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "B" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "G" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYRBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYRYYRBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYRYYRBRBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYRYYR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRYYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYRRBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRRYYGRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYBBRYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBRYRBB" } ]
manufactoria
medium
f846505f-a1b9-4a83-8704-704add828090
regex_pattern
Regex Pattern: (YYR)*(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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(YR)?(RBR)+' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRRBRRBRRBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBRYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRYRBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRBYRRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRBRBGRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYRYBRGY" } ]
manufactoria
medium
e70d7143-2f59-4852-ba4b-fb104a97361c
regex_pattern
Regex Pattern: (YR)?(RBR)+
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(GGR)?(YBY)+' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "B" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "G" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGRYBYYBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGRYBYYBYYBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBYGGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGRYYBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRGGGBRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGGYBYGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBBBGYRG" } ]
manufactoria
medium
4696a482-1b0a-4a9c-a257-0c262c004d4f
regex_pattern
Regex Pattern: (GGR)?(YBY)+
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(GGG)*(YBB)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "Y" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGGGGGYBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGGGGGGGGYBBYBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGGGGGGGGGGGYBBYBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGGGGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBBYBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBBGGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGGBYBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGYGGYGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRGYBGRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGRYRRY" } ]
manufactoria
medium
57493208-b6a0-4b57-9a7d-66e9d8a89fbc
regex_pattern
Regex Pattern: (GGG)*(YBB)*
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(YYY)+(GYB)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "B" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYYYYYYYYGYB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYYYYYYYYYYYGYB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYYGYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYBYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYYYGYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRGYYGRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYBGYYYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYBBB" } ]
manufactoria
medium
e23e8cc1-12f0-47fa-89e0-2d2198641f01
regex_pattern
Regex Pattern: (YYY)+(GYB)?
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(BB)+' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "Y" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBBBBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGRBYGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBGGB" } ]
manufactoria
easy
7ba03eae-1730-49b1-93c9-ff53f44f3b74
regex_pattern
Regex Pattern: (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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(GRY)?(BGG)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRYBGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGGGRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRYBBGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGYGRGGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGRBGRGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBBRG" } ]
manufactoria
medium
4469411f-141c-44de-814f-5ae7dc51d9b5
regex_pattern
Regex Pattern: (GRY)?(BGG)?
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(BBR)*(BBR)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBRBBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBRBBRBBRBBRBBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBRYBBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBGBBBBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRGBBBRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRBGGYR" } ]
manufactoria
medium
8e41e629-5369-49a8-b09a-a0db7835eaac
regex_pattern
Regex Pattern: (BBR)*(BBR)?
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(RG)+(BYB)+' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "B" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGBYB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGRGBYBBYB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGRGRGRGBYBBYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYBRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGGBYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBYRYBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGGBYBGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGYBB" } ]
manufactoria
medium
1eb40e3b-2c98-4e4e-a5aa-8f0ffd19b9ef
regex_pattern
Regex Pattern: (RG)+(BYB)+
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(RYY)?(GRY)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "B" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYYGRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYYGRYGRYGRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRYGRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRYRYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYYGGRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYYRYYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRGGRGRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRGGGY" } ]
manufactoria
medium
9fb15073-44ec-45e2-8374-78b408a8f3f4
regex_pattern
Regex Pattern: (RYY)?(GRY)*
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(GBB)*(YYY)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBBGBBYYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBBGBBGBBYYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBBGBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYYGBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBBBYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYGGBGYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBRYYYBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBRGYBB" } ]
manufactoria
medium
a38cc17b-785f-4147-972c-3562a4364c7f
regex_pattern
Regex Pattern: (GBB)*(YYY)?
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(RYR)*(YGG)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "Y" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYRRYRYGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYRRYRRYRYGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYRRYR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGGRYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYRGYGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRBRYRRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBGYGBBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRYBGGYG" } ]
manufactoria
medium
225d1e49-fe14-4e64-8f5b-365c06577468
regex_pattern
Regex Pattern: (RYR)*(YGG)?
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(R)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGYRRRR" } ]
manufactoria
easy
ebcd757c-f4ce-416f-8d44-aec12b4c1cf8
regex_pattern
Regex Pattern: (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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(GRR)?(RRY)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "Y" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "B" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRRRRYRRYRRYRRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRYRRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRYGRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRRYRRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYBGRGYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBRRRRBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGRBR" } ]
manufactoria
medium
3acaaf22-1ea1-474b-82a3-3b7ff5a0f277
regex_pattern
Regex Pattern: (GRR)?(RRY)*
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(BRR)*(GYG)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRRGYGGYG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRRBRRGYG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRRBRRBRRBRRGYGGYGGYG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRRBRR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GYGGYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYGBRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRRRGYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYYBRGYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRYGYGRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBYRB" } ]
manufactoria
medium
509d26c9-5a18-482a-b2c2-681cb7293a8b
regex_pattern
Regex Pattern: (BRR)*(GYG)*
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(BGB)?(BGY)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGBBGYBGY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGBBGYBGYBGY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGYBGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGYBGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGBYBGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRYBGBRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRRBGYRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGRYYBRY" } ]
manufactoria
medium
41b947ff-5e58-4ba2-9694-bdc72f54aaf1
regex_pattern
Regex Pattern: (BGB)?(BGY)*
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(YRR)*(RY)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRRYRR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRRYRRRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYYRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRRGRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYGYRGYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRBRGRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBGGRB" } ]
manufactoria
medium
42cacafd-0d3e-404f-aa89-a8c32b9fbda2
regex_pattern
Regex Pattern: (YRR)*(RY)?
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(GR)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "Y" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "B" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "G" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRGR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRGRGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBGGYBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYBGRBBG" } ]
manufactoria
easy
dc79e656-fd7c-46f4-86f6-d77d347fcdc9
regex_pattern
Regex Pattern: (GR)*
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(RRG)?(GBY)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBYGBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRGGBYGBYGBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBYRRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRGYGBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBRRRBBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYRGBBYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGYYGRRY" } ]
manufactoria
medium
63acd90b-d911-4b26-9751-5aa115251423
regex_pattern
Regex Pattern: (RRG)?(GBY)*
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(GGB)*(YGB)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGBGGBGGBYGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGBGGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGBGGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGBGYGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYYGGYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBGYGRBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGRRYGB" } ]
manufactoria
medium
f1884102-acc0-41d4-8ba0-90615db1d751
regex_pattern
Regex Pattern: (GGB)*(YGB)?
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(BYB)+(YRY)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYBBYBYRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYBYRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRYBYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYBRYRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBGBYYBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYYYRGYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRGGBR" } ]
manufactoria
medium
1fc86052-4fda-43e4-bf4c-80ac01ac1813
regex_pattern
Regex Pattern: (BYB)+(YRY)?
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(YG)*(RYR)+' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGYGRYRRYRRYR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGYGYGYGRYRRYRRYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYRYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGBRYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYRYBYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBGRYRBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYRBY" } ]
manufactoria
medium
6cf89dc1-838b-4548-9b7e-3d680ca93103
regex_pattern
Regex Pattern: (YG)*(RYR)+
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(YY)?(YG)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYYYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRYYYRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBYYRBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGGGGGYG" } ]
manufactoria
medium
74164134-c16a-430e-8166-1150d1b74a1c
regex_pattern
Regex Pattern: (YY)?(YG)?
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(BGY)+(GRB)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "B" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGYGRBGRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGYGRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGYBGYBGYBGYGRBGRBGRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRBBGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGYYGRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBGBGYBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYRGRGYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRRYYR" } ]
manufactoria
medium
e6270908-7bdb-4ce5-acb5-f154887cb840
regex_pattern
Regex Pattern: (BGY)+(GRB)*
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(YGR)+(YGG)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "Y" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "B" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGRYGGYGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGRYGRYGGYGGYGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGRYGRYGRYGGYGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGGYGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGRRYGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYGYGBYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYGYGRYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBRBYR" } ]
manufactoria
medium
1c90d697-c460-4052-8a53-8284431c01d6
regex_pattern
Regex Pattern: (YGR)+(YGG)*
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(RB)*(YBG)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "B" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RBRBRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RBRBRBYBG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RBRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBGRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBRYBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYGRGYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYBYBRYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBRYRGBB" } ]
manufactoria
medium
c0439b8b-0218-4575-914e-556e19e16171
regex_pattern
Regex Pattern: (RB)*(YBG)?
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(BYY)*(BYY)+' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYYBYYBYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYYBYYBYYBYYBYYBYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYYBYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYYYBYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYBBYBYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYYBYYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGBBGR" } ]
manufactoria
medium
ac6499e0-9d34-4d35-be5f-878ff32597c8
regex_pattern
Regex Pattern: (BYY)*(BYY)+
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(RY)*(GGR)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "G" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYRYGGR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYRYRYGGR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGRRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYBGGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBRRGBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGGGGRGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGRRGB" } ]
manufactoria
medium
6257e533-a7b9-4cb3-a529-bf1cd2493c51
regex_pattern
Regex Pattern: (RY)*(GGR)?
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(BGG)+(BYY)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "G" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGGBYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGGBGGBGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGGBGGBGGBYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYYBGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGGBBYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGYBGRGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRBBYBRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYYBY" } ]
manufactoria
medium
a15a37eb-5459-438f-bb98-104e48c6f7eb
regex_pattern
Regex Pattern: (BGG)+(BYY)?
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(BBB)?(GGG)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGGGGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBBGGGGGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGGBBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBBGGGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRBBBGRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGYGGYGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYGGBBY" } ]
manufactoria
medium
c3bda702-a54e-4b92-8fc8-5bda98743b36
regex_pattern
Regex Pattern: (BBB)?(GGG)*
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(RGB)*(RRG)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "B" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGBRRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGBRGBRGBRRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGBRGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRGRGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGBYRRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGYRGBGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYRRRYYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBGYYGGB" } ]
manufactoria
medium
4c2bbe7d-cddd-4ace-94ff-22027c48bca7
regex_pattern
Regex Pattern: (RGB)*(RRG)?
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(YGR)?(YGY)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGRYGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGYYGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGRYYGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGYYGRGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBBYGBBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGBYBRBY" } ]
manufactoria
medium
f2282c69-7697-46ec-9bce-da2c9e913715
regex_pattern
Regex Pattern: (YGR)?(YGY)?
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(YGR)*(GRB)+' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "Y" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "B" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGRYGRGRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGRYGRYGRYGRGRBGRBGRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGRYGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRBYGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGRYGRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYBYGYYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBBGRBBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGYRRGBY" } ]
manufactoria
medium
d9e38b73-d0c5-4920-b034-a829387c72f7
regex_pattern
Regex Pattern: (YGR)*(GRB)+
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(RYG)+(YGY)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "G" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYGRYGRYGYGY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYGRYGYGY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYGYGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGYRYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYGRYGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYYRYRYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYGYGRYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRYBGR" } ]
manufactoria
medium
5a45bb97-52c4-4408-9826-269e5f793bcc
regex_pattern
Regex Pattern: (RYG)+(YGY)?
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(GYB)?(YRR)+' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GYBYRRYRRYRR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GYBYRRYRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRRGYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYBRYRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBRGYYBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGRYRGGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYYYYR" } ]
manufactoria
medium
6f37c6e9-6110-41af-9daa-7baf28baacef
regex_pattern
Regex Pattern: (GYB)?(YRR)+
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(YYY)*(GGB)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "B" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYYGGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYYYYYGGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYYYYYGGBGGBGGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYYYYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGBGGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGBYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYYRGGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBBYYGBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBYGGGBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBRYRBBB" } ]
manufactoria
medium
8d02d56b-68ce-4904-8f34-91657dce2cfb
regex_pattern
Regex Pattern: (YYY)*(GGB)*
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(YGB)?(RGB)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "B" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGBRGBRGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGBRGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGBRGBRGBRGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGBYGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGBYRGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYYYGBYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYBRGRYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGRYGBY" } ]
manufactoria
medium
c52dccba-398e-4821-b745-382d7901bf99
regex_pattern
Regex Pattern: (YGB)?(RGB)*
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(GGY)?(YBR)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "Y" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "G" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBRYBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGYYBRYBRYBRYBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBRGGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGYBYBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGYGGBGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBBYBRBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBRRGRR" } ]
manufactoria
medium
dec703d9-1c10-42ea-ab67-16819f752918
regex_pattern
Regex Pattern: (GGY)?(YBR)*
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(BGR)+(RY)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "G" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGRRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGRRYRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGRBGRBGRRYRYRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYBGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGRGRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBGBGBBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYBRGYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRBRRYYB" } ]
manufactoria
medium
3384aa86-f27a-4894-a01a-46d11bcbeb1d
regex_pattern
Regex Pattern: (BGR)+(RY)*
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(GYY)+(GGG)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GYYGGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GYYGYYGYYGYYGGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGGGYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYYBGGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRYGYBRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYGGGBYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRGRBYYR" } ]
manufactoria
medium
48094b52-a2a8-4026-907e-3ff441941ba0
regex_pattern
Regex Pattern: (GYY)+(GGG)?
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(BBR)+(BRR)+' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "B" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBRBRR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBRBBRBBRBRRBRRBRR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBRBBRBBRBBRBRRBRRBRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRRBBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBRRBRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYYBBRYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYBBRRYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGRGB" } ]
manufactoria
medium
45bb3eb6-2641-4884-8073-2b4b651f61b0
regex_pattern
Regex Pattern: (BBR)+(BRR)+
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(YGR)*(BYY)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "Y" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGRYGRBYYBYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGRYGRYGRBYYBYYBYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGRYGRYGRBYYBYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGRYGR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYYBYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYYYGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGRRBYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBBYGYBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGBBYBGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBBYR" } ]
manufactoria
medium
38dca6c9-2d85-44ee-a730-0a42bf5f25a5
regex_pattern
Regex Pattern: (YGR)*(BYY)*
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(GGB)?(BGB)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "Y" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "B" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGBBGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGBGGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGBBBGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBRGGGBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBBBGRBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYYGBG" } ]
manufactoria
medium
c1e53afb-cc47-4ea2-a034-04540c04cb58
regex_pattern
Regex Pattern: (GGB)?(BGB)?
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(YGR)?(YGG)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGGYGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGRYGGYGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGGYGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGRRYGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBYYGBBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRGYGYRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGYRBGB" } ]
manufactoria
medium
7f7cc947-be9c-48db-8870-a057fa812a91
regex_pattern
Regex Pattern: (YGR)?(YGG)*
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(YY)+' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "B" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "G" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYYYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBRYYBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGYBB" } ]
manufactoria
easy
9dd7da5f-48e3-4df4-8871-084d4e291b9a
regex_pattern
Regex Pattern: (YY)+
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(BBB)?(BYG)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBBBYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYGBBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBBRBYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYRBBRYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBYBYGBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGBGBBYR" } ]
manufactoria
medium
7828e3f6-9ce4-45cc-9b99-a1f0b22de8c4
regex_pattern
Regex Pattern: (BBB)?(BYG)?
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(BGG)?(RG)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "Y" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "B" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGGRGRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGBGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGGGRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGYBGRGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBYRRBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGBGY" } ]
manufactoria
medium
7e11ad4b-f6d7-47d9-bb36-b81badf80979
regex_pattern
Regex Pattern: (BGG)?(RG)*
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(BYG)+(BY)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "Y" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYGBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYGBYGBYG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYGBYGBYGBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYBYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYGYBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBBBYRBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYYBYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBBGR" } ]
manufactoria
medium
0a52666f-da62-477a-9fc3-a438f0dcc3a7
regex_pattern
Regex Pattern: (BYG)+(BY)?
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(BRR)+(GGG)+' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "Y" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "G" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRRGGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRRBRRBRRGGGGGGGGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRRBRRBRRGGGGGGGGGGGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGGBRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRRYGGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBRBRGBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBGGGRBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBYRBGBR" } ]
manufactoria
medium
7ed54910-aa13-4873-900e-587f92f82bcd
regex_pattern
Regex Pattern: (BRR)+(GGG)+
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(GBB)+(RBR)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBBGBBRBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBBGBBRBRRBRRBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBBRBRRBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBRGBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBBGRBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRGGBRRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRBRBRRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGRBYBRB" } ]
manufactoria
medium
3a747513-9e04-4ae4-b956-fa4c8e410f25
regex_pattern
Regex Pattern: (GBB)+(RBR)*
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(RGG)*(BRB)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGGRGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGGBRBBRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGGRGGRGGRGGBRBBRBBRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRBBRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRBRGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGGYBRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRRRGYRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRYBRBRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGBRGRYY" } ]
manufactoria
medium
b5c1be3d-6952-4b41-a9a9-7f3726bb1e2d
regex_pattern
Regex Pattern: (RGG)*(BRB)*
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(RGG)?(BGB)+' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGBBGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGGBGBBGBBGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGBRGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGGBBGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYYRGYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGRBGYGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBGYY" } ]
manufactoria
medium
c0c7816b-7318-4f7e-b820-f36719044af6
regex_pattern
Regex Pattern: (RGG)?(BGB)+
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(G)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "Y" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "B" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "G" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGRGRR" } ]
manufactoria
easy
9d444621-3f63-4891-92b6-39495fd66ab2
regex_pattern
Regex Pattern: (G)?
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(YBB)+(GYB)+' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "Y" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBBGYB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBBYBBGYB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBBYBBYBBYBBGYBGYBGYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYBYBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBBRGYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGBYBGGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYGGYGYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGYGB" } ]
manufactoria
medium
edf08f67-f071-4fe7-a05d-2452bde12bfb
regex_pattern
Regex Pattern: (YBB)+(GYB)+
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(RBR)+(BGY)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RBRBGYBGY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RBRBGYBGYBGY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RBRRBRRBRRBRBGYBGYBGYBGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGYRBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBRBBGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGBRBYGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRGBGGRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBBBYRG" } ]
manufactoria
medium
459423e9-c6b9-4389-b449-a3754435221b
regex_pattern
Regex Pattern: (RBR)+(BGY)*
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(BGG)*(YYY)+' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGGYYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGGBGGYYYYYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGGBGGYYYYYYYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGGBGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYYBGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGGBYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBRBGGBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBGYYRBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGYGRRBY" } ]
manufactoria
medium
55d51d27-ce34-4425-9a8e-67072293564e
regex_pattern
Regex Pattern: (BGG)*(YYY)+
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(BBB)?(BYY)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "Y" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBBBYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYYBBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBBBBYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBYBBGBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGBBYYGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBRGGGGG" } ]
manufactoria
medium
01a99d09-a7f7-4725-9c83-c1997736a758
regex_pattern
Regex Pattern: (BBB)?(BYY)?
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(YRY)*(YYB)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "Y" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRYYRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRYYRYYYBYYBYYB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRYYRYYRYYYBYYB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYBYYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYBYRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRYBYYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRYYRGRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRYYYYRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGRBY" } ]
manufactoria
medium
e32aa3cd-6267-44aa-9c45-cae65f174970
regex_pattern
Regex Pattern: (YRY)*(YYB)*
[ { "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\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \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\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\nAccept if the tape matches the regex pattern '(BYB)*(GY)+' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYBGY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYBGYGYGY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYBBYBBYBBYBGYGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYBBYB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYBYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYBGGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBRBYGBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGGGRGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGYRRRB" } ]
manufactoria
medium
2ea9587d-f245-48ae-8d76-9ea05e2c5eb8
regex_pattern
Regex Pattern: (BYB)*(GY)+