messages
listlengths
1
1
ground_truth
listlengths
12
23
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 '(YR)*' 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": "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": "BB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRYR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRYRYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGBYRGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBRRYRRY" } ]
manufactoria
easy
043931b9-c6b5-44a4-ac0d-55de9660a472
regex_pattern
Regex Pattern: (YR)*
[ { "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 '(GG)+(YRB)*' 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": "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": "GG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGGGGGYRBYRBYRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGGGYRBYRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGYRBYRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRBGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGYYRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRYGYRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRYYRYRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBYRBR" } ]
manufactoria
medium
6fa01b17-88ee-4832-a94e-f535c2054604
regex_pattern
Regex Pattern: (GG)+(YRB)*
[ { "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)?(GRG)+' 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": "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": false, "expected_output": "", "input": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRGGRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRRGRGGRGGRGGRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRGYRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRRRGRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRRYRBRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGBGRYGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYRBYYBB" } ]
manufactoria
medium
e2efe231-4f76-41d6-bb3a-b7681f5e6dd9
regex_pattern
Regex Pattern: (YRR)?(GRG)+
[ { "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)+(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": 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": "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": true, "expected_output": "", "input": "YGRGGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGRYGR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGRYGRYGRYGRGGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGBYGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGRYGGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGBYGBGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRBGGRRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRBGGBGB" } ]
manufactoria
medium
0e258680-9765-4389-b588-595765f597d0
regex_pattern
Regex Pattern: (YGR)+(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 '(BG)?(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": "GR" }, { "check_output": false, "description": "", "expected_accepted": true, "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": "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": "BGGGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGGGGGGGGGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGGGGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGGBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGBGGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYBBGYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRBGGYRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBYGGG" } ]
manufactoria
medium
d7a3dce9-296a-4fc7-bd6b-85b69630d7a1
regex_pattern
Regex Pattern: (BG)?(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 '(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": 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": "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": "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": false, "expected_output": "", "input": "BB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYYBYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRRYY" } ]
manufactoria
easy
3f616741-8dec-415c-8e7e-ceb559c72125
regex_pattern
Regex Pattern: (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 '(Y)?' 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": "Y" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRGYRRYB" } ]
manufactoria
easy
4d50ce3c-d650-4e69-889f-a1f14784a32b
regex_pattern
Regex Pattern: (Y)?
[ { "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 '(RRY)?(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": 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": "BG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BY" }, { "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": true, "expected_output": "", "input": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRYRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRYRGRGRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGRRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRYRRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYRRRGYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYBRRYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBYGRYRG" } ]
manufactoria
medium
f7d0ddbd-d709-45bb-a1cc-9e09511a5109
regex_pattern
Regex Pattern: (RRY)?(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 '(YBB)+(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": "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": "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": "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": "YBBYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBBYYYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBBYBBYBBYBBYYYYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYYBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBBRYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRGYBYRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBGYYBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBBBYGRB" } ]
manufactoria
medium
7c5c0e7d-598d-4904-bb43-ad98103e0a83
regex_pattern
Regex Pattern: (YBB)+(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 '(YGR)?(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": 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": "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": "YGRYRR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGRYRRYRRYRR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRRYRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRRYGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGRBYRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGYYGGGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRBYRYRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYYRBR" } ]
manufactoria
medium
aa0e65f2-0284-4756-9043-97aa059b0be3
regex_pattern
Regex Pattern: (YGR)?(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 '(BG)?' 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": "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": "BG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRBBRRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGBYY" } ]
manufactoria
easy
ea330d9f-1578-4de5-81d1-c8e15f5304b3
regex_pattern
Regex Pattern: (BG)?
[ { "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 '(GRG)?(RGG)+' 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": "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": "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": "GRGRGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGGRGGRGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRGRGGRGGRGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGGGRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRGYRGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBBGRBBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRGRGGRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYGRY" } ]
manufactoria
medium
8bbc28df-fafa-4649-9cb1-a3088908ccf8
regex_pattern
Regex Pattern: (GRG)?(RGG)+
[ { "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)+(YRG)+' 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": "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": "YGBYRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGBYGBYRGYRGYRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGBYGBYGBYGBYRGYRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRGYGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGBRYRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBRYGBBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBRYRYBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRBGGGBR" } ]
manufactoria
medium
208f754c-933b-4924-bd18-72d4fff673f3
regex_pattern
Regex Pattern: (YGB)+(YRG)+
[ { "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 '(GBR)*(GBG)+' 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": "YB" }, { "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": "BB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBRGBRGBG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBRGBRGBRGBRGBGGBGGBGGBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBRGBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBGGBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBRGGBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRGGBBRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBRGBRBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYBGRR" } ]
manufactoria
medium
5444500c-8c20-4b73-91fb-79dd3ca76c84
regex_pattern
Regex Pattern: (GBR)*(GBG)+
[ { "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)?(BBG)*' 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": "BG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BY" }, { "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": "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": true, "expected_output": "", "input": "BBG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGYBBGBBGBBG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGYBBGBBG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBGBBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBGBGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGYRBBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRRBGYRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRRBBBRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGYRG" } ]
manufactoria
medium
608ef7f7-b380-40aa-a561-172ecc0aaf31
regex_pattern
Regex Pattern: (BGY)?(BBG)*
[ { "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)+(YYG)+' 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": "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": "BBRYYG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBRBBRBBRYYGYYG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBRBBRBBRBBRYYGYYGYYGYYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYGBBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBRBYYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRRBBRRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBRYYRBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBRGGRY" } ]
manufactoria
medium
f8347611-9481-4359-9330-6cba9752dee2
regex_pattern
Regex Pattern: (BBR)+(YYG)+
[ { "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)+(BBB)+' 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": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRGBBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRGRRGBBBBBBBBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBBRRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRGRBBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRGRRRRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYBBBRYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGYRBYB" } ]
manufactoria
medium
81f967bd-37fa-44d5-a969-c0f224d3d833
regex_pattern
Regex Pattern: (RRG)+(BBB)+
[ { "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)?(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": "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": "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": "YGY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRGYGY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRGYGYYGYYGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGYRRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRGYYGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBGRRGBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBRYGGBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYYGRGYY" } ]
manufactoria
medium
699788b2-1b21-4dd3-a300-4b705183b97d
regex_pattern
Regex Pattern: (RRG)?(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 '(RRB)*(RGG)+' 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": "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": "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": false, "expected_output": "", "input": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRBRGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRBRRBRGGRGGRGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRBRRBRRBRRBRGGRGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRBRRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGGRRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRBBRGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYGRRRYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYYRGRYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYYRGBYY" } ]
manufactoria
medium
d1bac678-fb71-4fdc-8eba-497b4584deea
regex_pattern
Regex Pattern: (RRB)*(RGG)+
[ { "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)*(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": "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": "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": "GRRGRRYBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRRGRRGRRYBYYBYYBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRRGRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBYGRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRRYYBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRBGRRRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYBYBBYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYBYYGGG" } ]
manufactoria
medium
39f64f78-be34-4c91-b6ce-6bad99ce1d20
regex_pattern
Regex Pattern: (GRR)*(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 '(BR)+(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": 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": "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": "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": false, "expected_output": "", "input": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRYGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRBRBRBRYGBYGBYGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGBBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRYYGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBRBBBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRRYGRRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBBYRYRB" } ]
manufactoria
medium
09537cf8-77a1-4205-b829-673e5f65b28d
regex_pattern
Regex Pattern: (BR)+(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 '(GGY)*(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": 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": "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": "B" }, { "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": "GGYGGYBRBRBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGYGGYGGYGGYBRBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGYGGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRGGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGYGBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGRGGYGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYYBYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGYRR" } ]
manufactoria
medium
a429e0e4-ede1-4813-8961-58b6dc61f8ed
regex_pattern
Regex Pattern: (GGY)*(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 '(YRB)+(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": "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": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRBYGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRBYGGYGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRBYRBYRBYGGYGGYGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGGYRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRBBYGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYRYRGYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYYYGRYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRGGYRB" } ]
manufactoria
medium
551d4a41-56d8-44c1-a7bb-f08c032d87c0
regex_pattern
Regex Pattern: (YRB)+(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 '(YGB)?(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": "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": "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": false, "expected_output": "", "input": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGBYBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGBYBYYBYYBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBYYGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGBYYBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYBYGGYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGGYBGGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGYRBYBG" } ]
manufactoria
medium
1cb73f2e-5b7a-4e13-9840-65697979bfef
regex_pattern
Regex Pattern: (YGB)?(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 '(RRB)+(RBY)*' 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": "RBR" }, { "check_output": false, "description": "", "expected_accepted": true, "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": "RRBRBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRBRBYRBYRBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRBRRBRRBRBYRBYRBYRBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRBRBYRBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBYRRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRBRRBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYBRRRYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYYRBBYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBBRRYY" } ]
manufactoria
medium
5a39d8c1-61e0-40d0-9151-f18d348fa6b0
regex_pattern
Regex Pattern: (RRB)+(RBY)*
[ { "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 '(BRY)?(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": "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": "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": true, "expected_output": "", "input": "BRYYG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGBRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRYRYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRGBRBRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRBYRRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYGGYR" } ]
manufactoria
medium
853e3e30-7bd3-4895-a913-bf30ffe5bd71
regex_pattern
Regex Pattern: (BRY)?(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 '(YBY)+(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": "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": "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": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBYBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBYYBYBYBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBYYBYYBYBYBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBYBYBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYYBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBYRBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGGYBRGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRRBRRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYYGY" } ]
manufactoria
medium
187cb2d2-3981-46a8-bc7a-786019ccaacb
regex_pattern
Regex Pattern: (YBY)+(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 '(GG)*(YRG)?' 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": "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": "GGYRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGGGYRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRGGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGBYRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGYGYGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGBYRGGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYBBYRYB" } ]
manufactoria
medium
e18163f5-eddb-4de4-8221-ef043b934ecb
regex_pattern
Regex Pattern: (GG)*(YRG)?
[ { "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)?(RGG)+' 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": "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": "RGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGBRGGRGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGBRGGRGGRGGRGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGGGGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGBBRGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBYGGGBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBRRGGBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBYBGB" } ]
manufactoria
medium
2fc3c433-ccf3-4431-923c-1fbd5300f5f7
regex_pattern
Regex Pattern: (GGB)?(RGG)+
[ { "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)*(BBB)+' 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": "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": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBRBBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBRBBRBBBBBBBBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBRBBRBBRBBBBBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBRBBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBBBBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBRRBBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRRBBYRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGGBBBGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRBBRGYR" } ]
manufactoria
medium
9f6d72d3-966a-4930-b4bc-9c740c80750b
regex_pattern
Regex Pattern: (BBR)*(BBB)+
[ { "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 '(BBG)+(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": 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": "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": "BBGBRGBRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBGBBGBRGBRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBGBBGBBGBRGBRGBRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRGBBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBGYBRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYRBBBYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBBBRRBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYBGB" } ]
manufactoria
medium
633bb3fc-b7b3-4b11-b243-3074d2f38db2
regex_pattern
Regex Pattern: (BBG)+(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 '(RRR)+(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": "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": "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": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRRRYRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRRRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRRRRRRRRRYRYRYRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYRRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRRYRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYYRRYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRBRYRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYYBRGRG" } ]
manufactoria
medium
ae9ad67e-5395-49dd-862c-94675d7cada9
regex_pattern
Regex Pattern: (RRR)+(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 '(RYY)?(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": "RY" }, { "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": "YG" }, { "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": "RYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYYBYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYYRYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYYGBYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGGRYBGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGYBYBGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYYYBR" } ]
manufactoria
medium
3f3ff4a5-4ffb-418e-a1ba-5ccc688191a9
regex_pattern
Regex Pattern: (RYY)?(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 '(GBR)+(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": "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": true, "expected_output": "", "input": "GBRGGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBRGBRGBRGGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBRGBRGGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGGGBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBRGGGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBGGBYBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRRGGBRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBRRYBG" } ]
manufactoria
medium
185fad18-9512-4cde-9228-840c3ed5780c
regex_pattern
Regex Pattern: (GBR)+(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 '(BB)+(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": "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": "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": "BB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBBBGYGYGY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBBBGYGY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBGYGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBRGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGBBYGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGGGBGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRRYYYYR" } ]
manufactoria
medium
ea98e76f-fe02-4a58-b408-8e53488504fe
regex_pattern
Regex Pattern: (BB)+(GY)*
[ { "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 '(BG)*(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": "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": "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": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGBGYGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGBGBGYGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGBBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGRYGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBBBYBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGGYGGGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYBYRB" } ]
manufactoria
medium
5dc6977c-40de-483b-a7c5-a2425095d5e7
regex_pattern
Regex Pattern: (BG)*(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 '(BRB)?(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": 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": "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": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRBYGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGBYGBYGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRBYGBYGBYGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGBBRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRBBYGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYRBRGYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGBYGYGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGYYGRB" } ]
manufactoria
medium
af548144-919b-4abb-a06e-1df5994ecb92
regex_pattern
Regex Pattern: (BRB)?(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 '(GG)?(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": 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": true, "expected_output": "", "input": "GG" }, { "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": "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": "YBYYBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGYBYYBYYBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGYBYYBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBYGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGBYBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBYGGBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRRYBGRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRGYG" } ]
manufactoria
medium
2074203d-7c89-4cea-a4b9-95788ff4e487
regex_pattern
Regex Pattern: (GG)?(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 '(BGY)+(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": 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": "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": "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": "BGYRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGYBGYRBRBRBRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBBGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGYBRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYYBGRYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGRRYGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYRGRRR" } ]
manufactoria
medium
aa5c91de-2520-4cb9-a4ba-3933aeac40a9
regex_pattern
Regex Pattern: (BGY)+(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 '(BBY)*(BGR)*' 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": "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": "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": "BBYBBYBGRBGR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBYBBYBBYBBYBGRBGR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBYBBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGRBGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGRBBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBYRBGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBYBBRBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGGBGGGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBYGB" } ]
manufactoria
medium
5c197f44-333d-49fc-8414-a635917bdc36
regex_pattern
Regex Pattern: (BBY)*(BGR)*
[ { "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)?(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": true, "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": "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": "BBRYGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGBBBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBRYYGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBBBBYBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBGYGBBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGBYYGRG" } ]
manufactoria
medium
030265e7-045d-42bc-8b16-aaad2a20624c
regex_pattern
Regex Pattern: (BBR)?(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 '(YBB)*(RGG)?' 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": "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": "RGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBBYBBYBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBBYBBRGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBBYBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGGYBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBBRRGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGBYBGGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBYRGBBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRRGY" } ]
manufactoria
medium
7af010aa-01af-4cfc-a2d5-678a54392d35
regex_pattern
Regex Pattern: (YBB)*(RGG)?
[ { "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)*(YB)*' 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": "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": "BB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGBYBYB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGBBGBYBYBYB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGBBGBBGBYBYBYBYB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGBBGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBBGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGBGYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBRBGRBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYBYGYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBRYY" } ]
manufactoria
medium
6a539586-0026-41bb-8590-dfa15c425cf7
regex_pattern
Regex Pattern: (BGB)*(YB)*
[ { "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)?(GBR)+' 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": "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": "YBBGBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBRGBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBBGBRGBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBRYBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBBBGBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYGYBBYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBGGBRBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRBYYGY" } ]
manufactoria
medium
f77a117c-5bec-4012-b37b-1d556eb0944c
regex_pattern
Regex Pattern: (YBB)?(GBR)+
[ { "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 '(GRB)*(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": 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": "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": "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": "YBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRBGRBGRBYBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRBGRBGRBGRBYBRYBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRBGRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBRGRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRBBYBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGRGRRGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBGYBYBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRBBBRRB" } ]
manufactoria
medium
b0f8f846-b26f-4ddb-ac33-6b0f31fec9ea
regex_pattern
Regex Pattern: (GRB)*(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 '(GRY)+(GYR)?' 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": "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": "GRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRYGRYGYR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRYGRYGRYGRYGYR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRYGYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYRGRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRYBGYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYYGRGYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYYGYGYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYRBRB" } ]
manufactoria
medium
138bad00-8f01-4762-b9f6-5532b14a99e0
regex_pattern
Regex Pattern: (GRY)+(GYR)?
[ { "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)+(GRG)?' 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": "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": true, "expected_output": "", "input": "RYR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYRGRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYRRYRRYRGRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRGRYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYRBGRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRYRYGRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRYGRBRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYYBGBR" } ]
manufactoria
medium
b0d50609-9682-4a77-bd9a-144fb22e0051
regex_pattern
Regex Pattern: (RYR)+(GRG)?
[ { "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)*(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": "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": "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": "BB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGGRGGRGGYBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGGRGGYBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGGRGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBBRGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGGYYBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBRRGYBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBRYBRBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYYBGBGY" } ]
manufactoria
medium
afb9e441-1caf-4556-9361-0e26472dc762
regex_pattern
Regex Pattern: (RGG)*(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 '(BGG)+(GB)?' 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": "YB" }, { "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": "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": false, "expected_output": "", "input": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGGBGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGGBGGBGGBGGGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGGGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBBGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGGGGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGGBGRGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBYGBBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYGGGGYB" } ]
manufactoria
medium
7fd14604-401a-4ac5-a33a-508ba7d9b5e3
regex_pattern
Regex Pattern: (BGG)+(GB)?
[ { "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 '(RRR)+(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": 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": "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": "RRR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRRRRRRRRBRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRRRRRBRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRRBRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRGRRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRRBBRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYRRRBYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGBBRGGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRYYG" } ]
manufactoria
medium
84d14174-3814-40bc-b306-9999bc6c2565
regex_pattern
Regex Pattern: (RRR)+(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 '(YBR)*(RBG)?' 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": "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": "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": "YBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBRRBG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBRYBRRBG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBRYBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBGYBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBRBRBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGGYBBGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGYRBRGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYBRG" } ]
manufactoria
medium
6044f3ee-f96d-4c36-b53a-27d8e906263b
regex_pattern
Regex Pattern: (YBR)*(RBG)?
[ { "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 '(BG)+' 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": "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": true, "expected_output": "", "input": "BG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBYBGBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBRGY" } ]
manufactoria
easy
f86013ad-56bf-4dd5-b77a-d08b6e6ad171
regex_pattern
Regex Pattern: (BG)+
[ { "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)+(BBG)+' 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": "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": false, "expected_output": "", "input": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGBBG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGBBGBBG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGYGYGYGBBGBBGBBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBGYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGYBBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYYYYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBYBBGBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGYBRBYR" } ]
manufactoria
medium
78104b6e-e4b4-426a-9930-73f155c2d655
regex_pattern
Regex Pattern: (YG)+(BBG)+
[ { "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)?(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": "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": "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": "YYRYBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBBYYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYRBYBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGGYYRGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRBYBBRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRYGGYGR" } ]
manufactoria
medium
ae1d725f-95de-4060-b92f-338b5a5eeaea
regex_pattern
Regex Pattern: (YYR)?(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 '(RGY)+(RYG)*' 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": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "G" }, { "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": "RGYRYG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGYRGYRYGRYGRYG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGYRGYRYGRYG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGYRYGRYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYGRGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGYRRYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRYRGGRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBRRYRBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGRYR" } ]
manufactoria
medium
79ab6ac3-a437-4a8c-9da1-6529ab71f4ad
regex_pattern
Regex Pattern: (RGY)+(RYG)*
[ { "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)+(GB)*' 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": "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": "GGR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGRGGRGBGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGRGGRGGRGGRGBGBGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGRGBGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBGGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGRBGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGGGGYGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRBGGRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBGRBYBR" } ]
manufactoria
medium
71b23f8a-1e93-4c60-a5d9-b2b9bf5975a8
regex_pattern
Regex Pattern: (GGR)+(GB)*
[ { "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)?(YYG)+' 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": "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": "YB" }, { "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": "YYG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGBYYGYYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYGGGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGBGYYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRBGGYRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBYYYGBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYRBGRBB" } ]
manufactoria
medium
f5ae11ca-d596-4906-b690-89647e9484bc
regex_pattern
Regex Pattern: (GGB)?(YYG)+
[ { "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)*(GB)+' 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": "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": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYYBYYBYYGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYYBYYBYYGBGBGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYYBYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBBYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYYYGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRRBYYRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGBGRGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGGBYG" } ]
manufactoria
medium
e2bfac75-0fd8-4c8b-af5e-d6435f13b5db
regex_pattern
Regex Pattern: (BYY)*(GB)+
[ { "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)*(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": "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": "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": false, "expected_output": "", "input": "BB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBBGBBGRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBBGBBGRBGRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBBGBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRBGBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBBRGRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRBGBBRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYBGRRYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRBYYBR" } ]
manufactoria
medium
a88ed84f-41ab-48b2-9153-a2056c81fd98
regex_pattern
Regex Pattern: (GBB)*(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 '(YYB)?(BRY)*' 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": "YG" }, { "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": true, "expected_output": "", "input": "BRYBRYBRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYBBRYBRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRYBRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRYYYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYBBBRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYGYYBYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYGBRGYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRGBBBRG" } ]
manufactoria
medium
5b0bd60c-2695-49ab-aeaf-1d468e70b495
regex_pattern
Regex Pattern: (YYB)?(BRY)*
[ { "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 '(RRB)*(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": 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": "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": "RRBGYG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRBRRBRRBGYGGYGGYG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRBRRBRRBRRBGYGGYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRBRRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYGRRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRBGGYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGGRRGGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBYGYRBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYYBBGG" } ]
manufactoria
medium
c7825943-c04b-4e88-a032-f0b167f65609
regex_pattern
Regex Pattern: (RRB)*(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 '(BBY)?(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": 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": "BG" }, { "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": "BB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBYGGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGBGGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBYGGBGGBGGBGGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGBBBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBYYGGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGGBBBGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYBGGBYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBGGRBYY" } ]
manufactoria
medium
4ad8f121-fbb7-4da3-b20e-1ef5189092e1
regex_pattern
Regex Pattern: (BBY)?(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 '(GY)+(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": "GG" }, { "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": "GYYBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GYYBYYBYYBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GYGYGYGYYBYYBYYBYYBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBYGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYGYBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYRGGYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRYYBRRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYRRRRG" } ]
manufactoria
medium
5b828742-7e5e-4e62-a16f-74f54d90f8db
regex_pattern
Regex Pattern: (GY)+(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 '(GG)?' 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": "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": "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": "GG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRBGRRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGRBB" } ]
manufactoria
easy
8ed4b9b7-8610-4308-994d-6ab801b32c28
regex_pattern
Regex Pattern: (GG)?
[ { "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 '(BR)+(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": "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": "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": "RR" }, { "check_output": false, "description": "", "expected_accepted": true, "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": "BRYBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRBRYBYYBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRBRBRBRYBYYBYYBYYBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRYBYYBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBYBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRGYBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBYBBBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRYYBRRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGGGRGY" } ]
manufactoria
medium
0bdcead5-ec46-4ad9-86c4-2aa902016198
regex_pattern
Regex Pattern: (BR)+(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 '(RRY)?(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": 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": "GB" }, { "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": "RRYGRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRYGRYGRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRYGRYGRYGRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRYRRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRYYGRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGGRRGGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBRGRRBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGYRBBR" } ]
manufactoria
medium
73b669b6-6c1c-4279-826e-c78121aab6dd
regex_pattern
Regex Pattern: (RRY)?(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 '(YRR)+(GB)?' 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": "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": "YRRGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRRYRRYRRYRRGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBYRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRRRGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRYYRYRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBYGGBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRBBY" } ]
manufactoria
medium
9eadd1d8-d54e-4d82-9c4e-d53645b1e39a
regex_pattern
Regex Pattern: (YRR)+(GB)?
[ { "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)?(GYR)*' 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": "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": "GYRGYR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYBGYRGYRGYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYRBYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYBGGYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBYBYGBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGYGYYGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYRRRGY" } ]
manufactoria
medium
8c375e75-9524-402c-acf7-ad0dc9a8596b
regex_pattern
Regex Pattern: (BYB)?(GYR)*
[ { "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)*(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": 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": "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": "RBRRBRYGY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RBRYGYYGYYGY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RBRRBRYGYYGYYGYYGY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RBRRBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGYYGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGYRBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBRBYGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBRRBBBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGGYGYGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGGYBBR" } ]
manufactoria
medium
77106303-cc50-4148-9eb4-8b1c04e60a96
regex_pattern
Regex Pattern: (RBR)*(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 '(RGG)+(RGG)*' 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": "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": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGGRGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGGRGGRGGRGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGGRGGRGGRGGRGGRGGRGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGGRGGRGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGGBRGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRRRGBRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYRRGRYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRRRG" } ]
manufactoria
medium
2cefc509-e467-4d8b-8213-c55818bb2b9c
regex_pattern
Regex Pattern: (RGG)+(RGG)*
[ { "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)?(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": 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": "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": "GRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYGRBGRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYGRBGRBGRBGRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRBGRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRBYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYBGRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYBYYYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRGGRGRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBRBYG" } ]
manufactoria
medium
c281eee9-0962-46cc-ace0-f874fe7d1bb2
regex_pattern
Regex Pattern: (YY)?(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 '(BRY)*(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": "GR" }, { "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": "YG" }, { "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": "BRYBBRBBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRYBRYBRYBRYBBRBBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRYBRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBRBBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBRBRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRYGBBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBGBRBBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYYBBBYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYBBG" } ]
manufactoria
medium
7fc29480-089a-47af-abb3-2a597b21a748
regex_pattern
Regex Pattern: (BRY)*(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 '(YGB)*(RGG)*' 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": "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": "YGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGBYGBRGGRGGRGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGBYGBYGBYGBRGGRGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGBYGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGGRGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGGYGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGBYRGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYBYGYYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGRRGRGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGYRRR" } ]
manufactoria
medium
e267ba4f-69c7-4944-8818-38765de8d3d9
regex_pattern
Regex Pattern: (YGB)*(RGG)*
[ { "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 '(RBB)*(RBB)?' 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": "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": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RBBRBBRBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RBBRBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBBGRBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBBRBRBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYYRBBYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBRBRRRB" } ]
manufactoria
medium
f640135b-c02b-4258-bab8-f21787cf4c7e
regex_pattern
Regex Pattern: (RBB)*(RBB)?
[ { "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 '(YGY)?(YGR)+' 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": "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": "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": "YGYYGR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGRYGRYGR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGYYGRYGRYGR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGRYGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGYYYGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRYYGBRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYYYGRYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRBYYBGY" } ]
manufactoria
medium
bb70b470-2b3e-4425-92f1-18422d9e77f5
regex_pattern
Regex Pattern: (YGY)?(YGR)+
[ { "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)?(YR)*' 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": "BB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGYYR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGYYRYRYR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRBGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGYGYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYGBGBYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBBYRBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGBBR" } ]
manufactoria
medium
6f86d9c8-4e53-4d1f-bf26-e3dc2e01c431
regex_pattern
Regex Pattern: (BGY)?(YR)*
[ { "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 '(B)+' 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": "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": true, "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": "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": false, "expected_output": "", "input": "GRRBGRY" } ]
manufactoria
easy
66b782b3-f417-4343-8b3d-578380d019aa
regex_pattern
Regex Pattern: (B)+
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective\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)*(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": 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": "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": "BB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYYGY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYYYYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYYYYYYYYYYYGY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYYYGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYBYYGYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBYGBBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGYGBGGB" } ]
manufactoria
medium
4f868496-7001-44be-889d-fe5ab20623ff
regex_pattern
Regex Pattern: (YYY)*(GY)?
[ { "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)*(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": 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": "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": "BRRBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRRBRRBBBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRRBRRBRRBRRBBBBBBBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRRBRR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBBRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRRBBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBRBRBBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBRBRBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRBRGB" } ]
manufactoria
medium
330a62b8-714f-4d26-8695-96c8dbdeecba
regex_pattern
Regex Pattern: (BRR)*(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 '(BRG)+(GRR)*' 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": "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": "BRGGRR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRGBRGBRGGRR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRGBRGBRGBRGGRRGRRGRR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRGGRRGRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRRBRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRGYGRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGGBRGGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYRGRRYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGBGRBBG" } ]
manufactoria
medium
99acc435-da21-4999-a429-d706a25954fa
regex_pattern
Regex Pattern: (BRG)+(GRR)*
[ { "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)?(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": 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": "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": true, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGYBRBBRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRBBGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGYRBRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBYBGBBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGBBRGGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGYBRRRY" } ]
manufactoria
medium
f66a8b71-7248-4b79-b346-f1d12cb8d457
regex_pattern
Regex Pattern: (BGY)?(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 '(GYB)+(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": 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": "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": "GYBGRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GYBGYBGYBGRYGRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GYBGYBGRYGRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRYGYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYBBGRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBBGYRBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYBGRGYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRBYYBR" } ]
manufactoria
medium
6c086c12-ec97-4298-81ab-f4bd67dd7692
regex_pattern
Regex Pattern: (GYB)+(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 '(RRB)*(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": "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": true, "expected_output": "", "input": "YBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRBRRBYBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRBRRBRRBRRBYBYYBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRBRRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBYRRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRBBYBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGRRRYGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGRYBGGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRYYY" } ]
manufactoria
medium
d1b8e0b6-f38b-4614-ba94-139d0f658772
regex_pattern
Regex Pattern: (RRB)*(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 '(GGR)+(GBR)?' 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": "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": "BB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGRGBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGRGGRGGRGGRGBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBRGGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGRYGBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGGGGBGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYYGBYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRRBYBY" } ]
manufactoria
medium
a1f46cec-a92a-4e97-a9c6-a51bcd2e2153
regex_pattern
Regex Pattern: (GGR)+(GBR)?
[ { "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)+(RGY)*' 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": "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": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRRGYRGY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRGRGRRGY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRGRGRGRRGYRGY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGYGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRGRGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBYGBBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGYRGRGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYGYRRRY" } ]
manufactoria
medium
a895ca48-bd6e-4f8d-a4be-8b8f61865753
regex_pattern
Regex Pattern: (GR)+(RGY)*
[ { "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 '(GYR)*(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": "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": "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": "BRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GYRBRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GYRGYRGYRBRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GYRGYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRGGYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYRBBRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBYGYRBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGGBRBGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYRGRBB" } ]
manufactoria
medium
96912701-c3ed-4ba9-bcef-45eca52aa864
regex_pattern
Regex Pattern: (GYR)*(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 '(GRB)*(BBB)*' 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": "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": false, "expected_output": "", "input": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRBGRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRBGRBGRBBBBBBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRBGRBGRBBBBBBBBBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBBBBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBBGRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRBYBBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBGGRBBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBRBBYBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGRBGY" } ]
manufactoria
medium
930d15cc-c64e-4014-bce9-006f6265774c
regex_pattern
Regex Pattern: (GRB)*(BBB)*
[ { "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)+(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": "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": false, "expected_output": "", "input": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYGRBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYGRBRRBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYGRYGRYGRYGRBRRBRRBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBRRYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYGYRBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYBRYGYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGRRBBGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRYGYG" } ]
manufactoria
medium
65ee0285-01b7-4217-85ac-eab57daca98e
regex_pattern
Regex Pattern: (RYG)+(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 '(GG)*(RGG)+' 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": "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": "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": "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": "GGGGRGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGGGRGGRGGRGGRGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGGGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGGRGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGBGRGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYBRGYYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGBGYBG" } ]
manufactoria
medium
d1711af8-01d0-4c50-aed8-924475e47f51
regex_pattern
Regex Pattern: (GG)*(RGG)+
[ { "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 '(BRG)*(RRR)*' 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": "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": "RRR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRGBRGBRGRRRRRR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRGBRGRRRRRRRRR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRGBRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRRRRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRRBRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRGGRRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRBBRGRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYGRRRYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBRGYBYB" } ]
manufactoria
medium
ccda2480-cbbc-4f39-a596-9999bf901b07
regex_pattern
Regex Pattern: (BRG)*(RRR)*
[ { "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 '(YYB)+(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": "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": false, "expected_output": "", "input": "YB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYBYYBYYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYBYYBYYBYYBYYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYBYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYYYYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYBYYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRBYYYRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRGYYYRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBYRBRYB" } ]
manufactoria
medium
73db64f5-674a-4329-a55e-fd3b4046a909
regex_pattern
Regex Pattern: (YYB)+(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 '(YBG)*(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": "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": "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": "YBG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBGBGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBGYBGYBGYBGBGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBGYBG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGBYBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBGYBGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGGYBRGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBRBGBBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBYGYYG" } ]
manufactoria
medium
67280bb7-a1fd-42c9-a429-cad4fb43e386
regex_pattern
Regex Pattern: (YBG)*(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 '(YGG)*(RBY)?' 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": true, "expected_output": "", "input": "YGGYGGRBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGGYGGYGGRBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGGYGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBYYGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGGYRBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBYYGBBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRYRBBRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRRGY" } ]
manufactoria
medium
6005607c-0c18-481f-996b-49f6f7826e0a
regex_pattern
Regex Pattern: (YGG)*(RBY)?
[ { "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)+(GRG)+' 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": "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": "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": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRRGRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRRYRRGRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRRYRRYRRYRRGRGGRGGRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRGYRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRRRGRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBYYRGBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRBGRRRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRRRG" } ]
manufactoria
medium
58793904-4a3d-45cd-8c96-334edbd6f405
regex_pattern
Regex Pattern: (YRR)+(GRG)+
[ { "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)+(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": 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": "BG" }, { "check_output": false, "description": "", "expected_accepted": true, "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": "YB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYGRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYYYGRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYYYGRYGRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYGRYGRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYGGRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGYYBGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBRGRBBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYGYRYGB" } ]
manufactoria
medium
7300f9ec-b650-481b-a430-ba6857718e73
regex_pattern
Regex Pattern: (YY)+(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 '(RRB)+(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": "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": "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": "RRBGRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRBRRBGRBGRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRBRRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRBBGRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBBRRRBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGYGRRGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRGGY" } ]
manufactoria
medium
73c9dc3d-a914-434a-973f-dacaab8a8946
regex_pattern
Regex Pattern: (RRB)+(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 '(GGY)+(RBB)?' 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": "BG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "Y" }, { "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": "BBR" }, { "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": true, "expected_output": "", "input": "GGYRBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGYGGY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGYGGYGGYRBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBBGGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGYBRBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYRGGBYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRYRBRRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGGGGRYR" } ]
manufactoria
medium
ecf86107-d400-4bc5-a2e4-c05909152f10
regex_pattern
Regex Pattern: (GGY)+(RBB)?
[ { "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 '(YGG)?(GYY)+' 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": "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": "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": "BB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGGGYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGGGYYGYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYYYGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGGYGYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBYYGGBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBYGYRBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRBYGGB" } ]
manufactoria
medium
9a0d3a09-e6b6-47e8-930e-c8741908e915
regex_pattern
Regex Pattern: (YGG)?(GYY)+
[ { "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)+(YGR)+' 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": "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": "BBRYGR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBRBBRBBRYGRYGRYGR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBRBBRYGRYGRYGRYGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGRBBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBRYYGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRGBBBRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYGYGGYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBYGGG" } ]
manufactoria
medium
e3e912a3-838b-4d03-85cb-02431b0bcfb2
regex_pattern
Regex Pattern: (BBR)+(YGR)+