messages
listlengths
1
1
ground_truth
listlengths
12
24
dataset
stringclasses
1 value
difficulty
stringclasses
2 values
id
stringlengths
36
36
problem_family
stringclasses
1 value
name
stringlengths
19
27
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nAccept if the tape matches the regex pattern '(GGG)+(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": 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": "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": "GGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGGGGGGGGGGGYR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGGYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRGGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGGYYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBGGGBBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYGYGYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRRGY" } ]
manufactoria
medium
95d63e5e-1805-4f67-82e5-21e1058a1231
regex_pattern
Regex Pattern: (GGG)+(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 '(YGB)?(BGY)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "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": false, "expected_output": "", "input": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGBBGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGYYGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGBBBGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYRYGRYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGGBGGGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBBBBR" } ]
manufactoria
medium
48ebaff8-f2b8-434b-9064-048f883f3956
regex_pattern
Regex Pattern: (YGB)?(BGY)?
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nAccept if the tape matches the regex pattern '(GYY)?(BBY)?' 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": "YB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GYYBBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBYGYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYYGBBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBYGYYBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBYBBGBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYGRG" } ]
manufactoria
medium
5c6377a6-4982-4e05-8d3a-64ddd52c5853
regex_pattern
Regex Pattern: (GYY)?(BBY)?
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape 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)+(RYB)*' 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": true, "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": false, "expected_output": "", "input": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRBRRBRYBRYB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRBRRBRRBRYBRYBRYB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRBRYBRYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYBRRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRBYRYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRBRRYRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRBRYYRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRYGG" } ]
manufactoria
medium
78297f14-a116-40b7-b800-1592726138ca
regex_pattern
Regex Pattern: (RRB)+(RYB)*
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape 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)?(GGY)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "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": true, "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": "BRGGY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGYBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRRGGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBBBYBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRBGGRRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRRBY" } ]
manufactoria
medium
8d0d3c1e-dfd1-4b51-b2f2-5f22fba8da42
regex_pattern
Regex Pattern: (BR)?(GGY)?
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nAccept if the tape matches the regex pattern '(RGB)+(RYY)+' 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": "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": "RGBRYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGBRYYRYYRYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGBRGBRYYRYYRYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYYRGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGBBRYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGBRGYGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRYRYRRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGBYRY" } ]
manufactoria
medium
625a2d36-a276-4d45-af33-c490a6e19275
regex_pattern
Regex Pattern: (RGB)+(RYY)+
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nAccept if the tape matches the regex pattern '(RB)+' 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": true, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GY" }, { "check_output": false, "description": "", "expected_accepted": 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": "RBRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBRRYBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYBGBBYB" } ]
manufactoria
easy
ede4aaaf-0cb8-4722-ad5e-87a384dc3b5a
regex_pattern
Regex Pattern: (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 '(GYB)*(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": "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": "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": "GYBGYBRYG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GYBGYBGYBRYGRYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYBGYB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYGGYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYBGRYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYYGYRYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRRRYBRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRGBBB" } ]
manufactoria
medium
0262a736-6673-4aec-9ff7-8329c2c234e1
regex_pattern
Regex Pattern: (GYB)*(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 '(RYG)?(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": 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": 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": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYGBBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYGBBRBBRBBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYGBBRBBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBRRYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYGGBBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYYRYBYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBGBBGBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGBGBRYG" } ]
manufactoria
medium
3175848e-e6f2-4b68-8bfc-871481504938
regex_pattern
Regex Pattern: (RYG)?(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 '(GGR)+(GGR)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGRGGRGGRGGR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGRGGRGGRGGRGGRGGRGGRGGR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGRGGRGGR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGRGGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGRRGGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRYGGRRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBRGGRBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBGYR" } ]
manufactoria
medium
f145c74f-a81f-465e-b3b5-88ce63b561e2
regex_pattern
Regex Pattern: (GGR)+(GGR)*
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nAccept if the tape matches the regex pattern '(RY)?(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": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "B" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYBRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYBRBBRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYBRBBRBBRBBRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRBRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYGBRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBGRBBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYGBRRYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGBBYRB" } ]
manufactoria
medium
74883e33-17ff-4646-8762-724060dce845
regex_pattern
Regex Pattern: (RY)?(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 '(BBB)*(GGR)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBBBBBGGRGGR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBBBBBBBBGGRGGR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBBBBBBBBBBBGGRGGRGGR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBBBBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGRGGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGRBBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBBBGGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBBBBRBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGBGGGGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRBBRY" } ]
manufactoria
medium
03150b73-c7af-4cbc-9a16-7b84a2c7c28e
regex_pattern
Regex Pattern: (BBB)*(GGR)*
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nAccept if the tape matches the regex pattern '(YYB)?(BGG)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "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": "YYBBGGBGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGGBGGBGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYBBGGBGGBGGBGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGGBGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGGYYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYBRBGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBRYYRBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRRBGRRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGBRYBBR" } ]
manufactoria
medium
de1b7192-c501-4c9d-835f-0348ba216f7e
regex_pattern
Regex Pattern: (YYB)?(BGG)*
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nAccept if the tape matches the regex pattern '(YBY)*(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": "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": "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": "YBYRBGRBG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBYRBG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBYYBYRBGRBGRBGRBG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBYYBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RBGRBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBGYBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBYRRBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYBYBBYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYGRBRYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYYYBB" } ]
manufactoria
medium
0b981d46-9c25-4d0d-af3a-5d7049e15792
regex_pattern
Regex Pattern: (YBY)*(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 '(GBG)*(BYR)?' 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": "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": "GBGGBG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBGGBGBYR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBGGBGGBGBYR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYRGBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBGYBYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYGGBRYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRGBYGRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYGGYB" } ]
manufactoria
medium
461f34df-c663-4eac-9d84-12baa7e715b7
regex_pattern
Regex Pattern: (GBG)*(BYR)?
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape 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)*(BBY)+' 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": "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": "YB" }, { "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": "BBBBBBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBBBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBBBBBBBYBBYBBYBBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBYBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBGBBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGYBRGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYRBBGYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBRRYYBB" } ]
manufactoria
medium
b69a0512-7218-4c9f-b4eb-f7e44616788c
regex_pattern
Regex Pattern: (BB)*(BBY)+
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape 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 '(RR)*(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": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "Y" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "G" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRRRYYG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRRR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYGRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRBYYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYGRYYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRBYYBRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGYBYGGR" } ]
manufactoria
medium
2cabb1d9-5b1a-4fd4-979a-e70259eeda2f
regex_pattern
Regex Pattern: (RR)*(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 '(BYB)?(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": 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": false, "expected_output": "", "input": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYBGRGGRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYBGRGGRGGRGGRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRGGRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRGBYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYBRGRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGGBYYGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYYGRYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGBYBG" } ]
manufactoria
medium
a6a22240-dd18-4b4d-b8ba-6c75bf287535
regex_pattern
Regex Pattern: (BYB)?(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 '(GBR)*(RR)*' 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": "YB" }, { "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": "GBRGBRRR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBRGBRGBRGBRRRRRRR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBRGBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRGBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBRRRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBYGBRBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYBRYYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBYRRR" } ]
manufactoria
medium
bc219d65-28a4-4f39-ab41-e9d30aae1897
regex_pattern
Regex Pattern: (GBR)*(RR)*
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective\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)?(BYR)+' 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": "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": "BYR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBRBYRBYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYRBBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBRGBYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRYBBYRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYYBYGYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYGBYG" } ]
manufactoria
medium
f5736010-ee21-456c-bf91-4cb32ba44113
regex_pattern
Regex Pattern: (BBR)?(BYR)+
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape 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)+(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": "RY" }, { "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": "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": "GRRGRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRRGRRGRYGRYGRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRYGRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRRBGRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYGGRBYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRYGRRRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYRYGB" } ]
manufactoria
medium
27db9a0b-0e72-416e-9f3c-19c690aabd2d
regex_pattern
Regex Pattern: (GRR)+(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 '(BGG)+(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": 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": "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": "BGGBRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGGBGGBGGBRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRYBGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGGYBRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYYBGBYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGBBRBGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGGGBBG" } ]
manufactoria
medium
a4a285ae-7bc1-41f8-af16-71feef33071f
regex_pattern
Regex Pattern: (BGG)+(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 '(YR)+(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": "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": "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": "YRYGY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRYRYRYGYYGY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRYGYYGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGYYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRGYGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBBYYBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRYYGGRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYGBB" } ]
manufactoria
medium
f752ac80-893d-4284-9a2a-b559d29a84bd
regex_pattern
Regex Pattern: (YR)+(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 '(RY)*(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": 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": "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": "RYRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYRYRYRYYGR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGRRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYYYGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGRRBGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGYYGYGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGRRG" } ]
manufactoria
medium
80bcd120-afbd-46ee-a31b-f44c76c0abd5
regex_pattern
Regex Pattern: (RY)*(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 '(BYY)*(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": "RY" }, { "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": "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": "BYYYRGYRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYYBYYYRGYRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYYBYYBYYYRGYRGYRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYYBYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRGYRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRGBYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYYGYRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGGBYRGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBGYRBBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGRGR" } ]
manufactoria
medium
ba57d3cf-5841-4c66-a412-b10e7b110cb3
regex_pattern
Regex Pattern: (BYY)*(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 '(BGG)?(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": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "B" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGGYBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGGYBRYBRYBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBRBGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGGRYBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRBBGYRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRRYBRRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBRRBYY" } ]
manufactoria
medium
f7f5d024-3fd1-4646-a8ec-075e8b6ee2f9
regex_pattern
Regex Pattern: (BGG)?(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 '(RRB)?(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": "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": true, "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": "RRBGGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGGRRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRBGGGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRBRRGRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGRGGGGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYRYY" } ]
manufactoria
medium
a6e4129b-2465-4c79-80c5-0e9d04f3a6ab
regex_pattern
Regex Pattern: (RRB)?(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 '(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": "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": true, "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": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBGBGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRBGYRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRRYRR" } ]
manufactoria
easy
45e20a53-5619-449d-8ce0-9f0ad5951db1
regex_pattern
Regex Pattern: (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 '(YBG)*(YBG)+' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": 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": "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": "YBGYBGYBG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBGYBGYBGYBGYBG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBGYBGYBGYBGYBGYBG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBGYBG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBGYYBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBYYBYBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYRYBBYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGRRRBBR" } ]
manufactoria
medium
880dd41a-566a-4348-931b-1e9dde0805c2
regex_pattern
Regex Pattern: (YBG)*(YBG)+
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nAccept if the tape matches the regex pattern '(RRG)+(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": "YY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "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": "RRGGYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRGRRGGYYGYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRGRRGGYYGYYGYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYYRRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRGRGYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBBRRBBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGYGYRGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRYGGY" } ]
manufactoria
medium
e9ea2983-f01f-486e-80e8-c789d1c85261
regex_pattern
Regex Pattern: (RRG)+(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 '(RBR)?(RY)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "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": 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": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RBRRYRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RBRRYRYRYRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYRBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBRYRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBYRBYBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGRRBGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRRYBBRB" } ]
manufactoria
medium
b24869cd-d28d-4f3e-a602-1088e7c10b7d
regex_pattern
Regex Pattern: (RBR)?(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 '(YY)*(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": "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": true, "expected_output": "", "input": "YYYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYYYYRYRYR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYYYYYYRYRYR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYBYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYRYBYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBGYBBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRRRRGRG" } ]
manufactoria
medium
bc27b553-0333-4a4a-85db-96e92d778319
regex_pattern
Regex Pattern: (YY)*(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 '(YYR)?(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": "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": false, "expected_output": "", "input": "YB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYRYRR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRRYYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYRRYRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBRYYBBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRYYRBRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYGBGBB" } ]
manufactoria
medium
1771bc1d-fd22-4fb4-8a18-7f54d9213d7c
regex_pattern
Regex Pattern: (YYR)?(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 '(BR)+(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": 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": "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": true, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRBRYGYG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRBRYGYGYG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRYGYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRBYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBYBGBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRRYYRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBYRRBRR" } ]
manufactoria
medium
46f74d14-73b1-4ec6-b465-4570aea85cb0
regex_pattern
Regex Pattern: (BR)+(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 '(RYG)+(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": "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": "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": "RYGRGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYGRYGRYG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYGRYGRYGRGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGGRYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYGBRGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGBRYRGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBRRGRBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGBYBYGR" } ]
manufactoria
medium
b6bb9274-37ac-4675-a0a4-1a3f90c2e7fc
regex_pattern
Regex Pattern: (RYG)+(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 '(YGG)*(GBB)*' 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": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "B" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGGYGGGBBGBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGGYGGGBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGGYGGYGGGBBGBBGBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGGYGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBBGBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBBYGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGGRGBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGBYGGGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBYGBRBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGYGG" } ]
manufactoria
medium
6f255982-6951-425b-85f2-569501e26c4b
regex_pattern
Regex Pattern: (YGG)*(GBB)*
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape 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 '(RR)*' 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": "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": "RRRRRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRGRGRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRYRY" } ]
manufactoria
easy
656000e1-f311-46d3-8f3e-c7d1f9d8feff
regex_pattern
Regex Pattern: (RR)*
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective\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)?(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": "RY" }, { "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": "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": "RBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYRBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBBBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYRRBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRYBBRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBYRBRBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYBGY" } ]
manufactoria
medium
b619741c-525f-4fcc-bdd2-b889c2f7042b
regex_pattern
Regex Pattern: (BY)?(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 '(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": "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": "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": "YB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGRYBGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBRRRG" } ]
manufactoria
easy
6ef53c9c-d5c3-413c-9bcd-40978320fecd
regex_pattern
Regex Pattern: (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 '(GGY)*(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": 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": "YB" }, { "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": "BB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGYGGYBBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGYGGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBRGGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGYGBBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBRGGBBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYYBBRYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBRBYR" } ]
manufactoria
medium
1cf0d5d6-9fa4-4fbb-918a-df0a06be4305
regex_pattern
Regex Pattern: (GGY)*(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)+(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": "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": "YGBYYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGBYGBYGBYYYYYYYYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGBYGBYGBYYYYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYYYGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGBRYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBBYGRBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGYYYRGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGRGG" } ]
manufactoria
medium
af40fd1b-192e-4dbf-be5a-d4c6dba6530e
regex_pattern
Regex Pattern: (YGB)+(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 '(RYY)*(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": "Y" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYYBBBBBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYYRYYBBBBBBBBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYYRYYRYYBBBBBBBBBBBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYYRYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBBBBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBBRYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYYYBBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGYRYGGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRBBBGRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYYYG" } ]
manufactoria
medium
6d144a95-6307-4ebd-9552-fa91b8950f56
regex_pattern
Regex Pattern: (RYY)*(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 '(BGY)?(RGB)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "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": "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": "BGY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGYRGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGBBGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGYRRGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGYBGGGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBYRGYBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYBRY" } ]
manufactoria
medium
4914d330-6f02-48e9-8c4e-b8d26000b501
regex_pattern
Regex Pattern: (BGY)?(RGB)?
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nAccept if the tape matches the regex pattern '(RY)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "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": "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": "RY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYRRGYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRGRBYG" } ]
manufactoria
easy
70db6236-06e1-46f0-949d-8d251e391c9f
regex_pattern
Regex Pattern: (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 '(YG)*(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": "GG" }, { "check_output": false, "description": "", "expected_accepted": true, "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": "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": "YGBYBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGYGYGBYBYBYBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGYG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGYBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGGYYGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGBBYGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYBGYGRY" } ]
manufactoria
medium
8f57a56e-e06f-408d-ac81-b88f52d62b7d
regex_pattern
Regex Pattern: (YG)*(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 '(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": "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": true, "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": "GYGY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GYGYGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRBGGRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGGBRB" } ]
manufactoria
easy
39c20dc9-6711-4c29-a1d7-ddf56c133054
regex_pattern
Regex Pattern: (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 '(RY)?(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": "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": "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": "YY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYYYYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYYYYYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYRYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBRRYBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYBYBYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBYBY" } ]
manufactoria
medium
0ce37668-2612-4512-b5b3-7bf9999fc754
regex_pattern
Regex Pattern: (RY)?(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 '(RBB)+(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": "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": false, "expected_output": "", "input": "BB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RBBBRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RBBRBBRBBRBBBRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRBRBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBBBBRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRBRBRRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBRBRGBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGYYBBR" } ]
manufactoria
medium
9e6cfcc7-1968-4c0c-997f-e9c3564fc9d0
regex_pattern
Regex Pattern: (RBB)+(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 '(YBG)*(YYR)*' 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": "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": "YB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBGYBGYYRYYR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBGYBGYBGYYRYYRYYR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBGYBGYBGYYRYYRYYRYYR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBGYBG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYRYYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYRYBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBGBYYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBGYBYBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRBYYYRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRRYYYY" } ]
manufactoria
medium
c3cd618b-3831-494a-a838-e1d3d5a1544e
regex_pattern
Regex Pattern: (YBG)*(YYR)*
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape 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 '(RYB)*(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": 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": "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": "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": "RYBGBGGBG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYBRYBRYBGBGGBG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYBRYBRYBGBGGBGGBGGBG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYBRYB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBGGBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBGRYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYBBGBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRRRYYRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRYGBYRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYBGGRGB" } ]
manufactoria
medium
5830f3cb-fde3-4fad-93ef-edef1d4d5162
regex_pattern
Regex Pattern: (RYB)*(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 '(GGR)?(BYY)+' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "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": false, "expected_output": "", "input": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGRBYYBYYBYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGRBYYBYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYYGGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGRBBYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYGGGBYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRBBYYRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYBBRBB" } ]
manufactoria
medium
63607352-e1df-4d08-9392-91fa63063f89
regex_pattern
Regex Pattern: (GGR)?(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 '(BYG)?(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": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "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": "BYGGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYGGBGBGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYGGBGBGBGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBBYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYGBGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBRBYRBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBBGGBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRGBRBBY" } ]
manufactoria
medium
209371c1-7a90-4020-98a4-cffbe0a4a5db
regex_pattern
Regex Pattern: (BYG)?(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 '(RG)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "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": "GB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGRGRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRGRBRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRGYG" } ]
manufactoria
easy
22a8f5dd-6251-49b1-b954-fa0e12f5e022
regex_pattern
Regex Pattern: (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 '(BGG)*(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": "Y" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGGBGGYGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGGYGGYGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGGBGGBGGYGGYGGYGGYGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGGBGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGGBGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGGRYGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYYBGYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYGYGRYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBGRYRG" } ]
manufactoria
medium
0d1d15ef-c24c-432a-8512-2666991547d2
regex_pattern
Regex Pattern: (BGG)*(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 '(RYR)?(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": "RY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "B" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGBYGBYGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYRYGBYGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGBYGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGBRYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYRYYGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYRRYYYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBBYGYBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGYGG" } ]
manufactoria
medium
3cf5a83b-880e-4970-a9b7-04de1fdac77f
regex_pattern
Regex Pattern: (RYR)?(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 '(GBB)?(RY)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GB" }, { "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": "GBBRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYGBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBBBRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYGGBGYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBGRRBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYBRRGR" } ]
manufactoria
medium
d6155c34-e19c-44e4-a5df-f981cf1351b7
regex_pattern
Regex Pattern: (GBB)?(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 '(YGB)+(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": 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": "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": "YGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGBYGBYGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGBYGBYB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGBYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBYGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGBRYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGRYGYGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYYYBYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYBGYRG" } ]
manufactoria
medium
83fe90a3-d143-401a-acc7-efe91b89e2e8
regex_pattern
Regex Pattern: (YGB)+(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 '(BRB)+(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": "YY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "G" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "B" }, { "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": "BRBBRBRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRBRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGBRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRBBRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGRBRBGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBBRBBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYRRYGG" } ]
manufactoria
medium
1768b552-ea7f-4a72-9601-d937f765c1de
regex_pattern
Regex Pattern: (BRB)+(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 '(BRG)?(RY)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "Y" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRGRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYBRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRGYRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRYBRYRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRRRYRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGYGRGR" } ]
manufactoria
medium
2c9dd59d-2fee-430d-a2d0-bc284d93f161
regex_pattern
Regex Pattern: (BRG)?(RY)?
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nAccept if the tape matches the regex pattern '(GYY)+(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": "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": "B" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "G" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GYYRGRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GYYRGRGRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GYYGYYGYYGYYRGRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGGYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYYGRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBBGYGBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGGRYGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBGYY" } ]
manufactoria
medium
c682ca6a-0e49-4b6b-902f-1d7eb75707e8
regex_pattern
Regex Pattern: (GYY)+(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 '(YYR)+(BYR)*' 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": "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": false, "expected_output": "", "input": "YB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYRBYR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYRYYRYYRYYRBYRBYRBYR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYRBYRBYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYRYYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYRBBYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBRYYBBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRBBYRRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYBRRRRB" } ]
manufactoria
medium
a9982213-6448-4f61-b6ad-2ab28c21bd00
regex_pattern
Regex Pattern: (YYR)+(BYR)*
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape 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 '(GBY)?(RRY)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GR" }, { "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": "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": "GBYRRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBYRRYRRYRRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRYRRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRYGBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBYRRRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBRGBRBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYBRRRYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGGYYRBY" } ]
manufactoria
medium
a4a85a28-13ff-4ca7-8a8e-bf407b6c59f8
regex_pattern
Regex Pattern: (GBY)?(RRY)*
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nAccept if the tape matches the regex pattern '(BYG)+(YRY)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GB" }, { "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": false, "expected_output": "", "input": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYGYRYYRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYGYRYYRYYRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYGBYGBYGBYGYRYYRYYRYYRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRYBYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYGBYRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYBBYRYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGGYRRGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYRBG" } ]
manufactoria
medium
462b096d-ae8b-432d-9b2e-30e9600e7344
regex_pattern
Regex Pattern: (BYG)+(YRY)*
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nAccept if the tape matches the regex pattern '(BG)?(BRR)+' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "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": "BGBRR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGBRRBRR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRRBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGBBRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYYBBYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBRBRGBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRRYY" } ]
manufactoria
medium
27652655-6eb5-4bec-9a82-e51fd4e87a3f
regex_pattern
Regex Pattern: (BG)?(BRR)+
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nAccept if the tape matches the regex pattern '(GRY)*(GGB)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "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": "GRYGRYGGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRYGRYGRYGGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRYGRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGBGRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRYBGGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRGGRBRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRRGGRRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGYGB" } ]
manufactoria
medium
dd5b5c4e-277a-426e-b02e-c3a9469c9861
regex_pattern
Regex Pattern: (GRY)*(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 '(YR)?(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": 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": "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": "YRGBRGBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRGBRGBRGBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBRGBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBRYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRYGBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYYYRYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRGGBYRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYBYBYG" } ]
manufactoria
medium
6c46d4bd-92c9-4a85-bc2f-8bebd168f4ff
regex_pattern
Regex Pattern: (YR)?(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 '(BRY)*(YYB)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "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": "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": "BRYBRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRYBRYYYB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRYBRYBRYYYBYYBYYBYYB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYBYYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYBBRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRYBYYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBRBRYBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYRYYRYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYBGRGR" } ]
manufactoria
medium
6bd42217-0b5d-4912-85f0-34797a4c6904
regex_pattern
Regex Pattern: (BRY)*(YYB)*
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nAccept if the tape matches the regex pattern '(YRB)*(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": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRBYRBYRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRBYRBYRBYRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRBYRBYRBYRBYRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRBYRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRBYYRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGGYRBGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBYYRYBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYYRGG" } ]
manufactoria
medium
13256524-395c-4bd4-84e8-e77f6e783073
regex_pattern
Regex Pattern: (YRB)*(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 '(RR)+' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "B" }, { "check_output": false, "description": "", "expected_accepted": true, "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": "RRRRRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBRRGBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBBYBB" } ]
manufactoria
easy
74959405-0bff-4365-97e7-28c1fc9748ad
regex_pattern
Regex Pattern: (RR)+
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nAccept if the tape matches the regex pattern '(RY)*(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": "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": "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": "YRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYRYYRBYRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYRYRYYRBYRBYRBYRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRBRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYGYRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRBRBRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRRYRRRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYRRB" } ]
manufactoria
medium
8de8b07f-8243-4603-bfeb-1e0c33fd97fc
regex_pattern
Regex Pattern: (RY)*(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 '(BGG)*(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": "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": "BGGBGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGGBGGYGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGGBGGBGGBGGYGBYGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGBYGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGBBGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGGBYGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRRBGRRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBRYGBBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGYRY" } ]
manufactoria
medium
ee4da4d1-fdf4-44b1-a7ff-ddd06d72f104
regex_pattern
Regex Pattern: (BGG)*(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 '(RBG)?(GBY)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "G" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "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": "GBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RBGGBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBYRBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBGRGBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRYRBYRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRRGBYRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBYYRY" } ]
manufactoria
medium
2c84e4e2-0dd7-4687-a255-28115c4f6da5
regex_pattern
Regex Pattern: (RBG)?(GBY)?
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nAccept if the tape matches the regex pattern '(RYB)?(RG)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "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": "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": "RYBRGRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYBRGRGRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGRYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYBGRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRRRYBRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYBRGYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRRYGBYB" } ]
manufactoria
medium
aa42544e-f204-4896-acb2-bccf85ace000
regex_pattern
Regex Pattern: (RYB)?(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 '(RG)+(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": "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": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGRGRGBRBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGRGRGBRBRBR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGBRBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGYBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGBRBGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYRBGYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYYYRYB" } ]
manufactoria
medium
a32ff57c-3a18-4d09-97cb-abbe22f63173
regex_pattern
Regex Pattern: (RG)+(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 '(RG)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "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": "RG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGYRRGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBGBRRR" } ]
manufactoria
easy
70842aba-78bb-4547-bfb4-9880484eb4a8
regex_pattern
Regex Pattern: (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 '(BGG)?(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": "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": "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": "YRR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGGYRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRRBGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGGGYRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYYBGYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRBYRYRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYYRGRGB" } ]
manufactoria
medium
6f50a4e3-85f1-45cb-9f13-d8b8e53b37be
regex_pattern
Regex Pattern: (BGG)?(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 '(GYR)*(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": 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": "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": true, "expected_output": "", "input": "GYRGYRGYRGRGGRGGRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GYRGYR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRGGRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRGGYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYRGGRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYYGYRYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYBGRGYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRRYRYG" } ]
manufactoria
medium
966df487-ab19-4774-a7f3-74d85bf7042f
regex_pattern
Regex Pattern: (GYR)*(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 '(YBY)?(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": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "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": "YBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBYRGY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGYYBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBYBRGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGRYBGGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBBRGRBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGRRB" } ]
manufactoria
medium
a9f77080-2fd0-461c-b271-bb630680eef7
regex_pattern
Regex Pattern: (YBY)?(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 '(GRB)+(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": "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": "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": "GRBRBRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRBGRBGRBRBRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRBGRBGRBGRBRBRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBGRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRBRRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYBGRGYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBGRYBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBYRYYY" } ]
manufactoria
medium
5f4f286c-7ad1-484c-ab2b-1fa2c05dd668
regex_pattern
Regex Pattern: (GRB)+(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 '(YRG)?(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": 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": "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": "BB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRGBRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRGBRYBRYBRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRYYRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRGGBRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRBYRGRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGRBRGGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGGBRRRG" } ]
manufactoria
medium
08b9a4c4-24e0-4287-8fe7-b457b97d0ce2
regex_pattern
Regex Pattern: (YRG)?(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 '(YG)*(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": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGBG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGYGYGBG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGYGYGYGBG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGYG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGYBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRRYGRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYYBYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBYRBG" } ]
manufactoria
medium
0dbeb18d-864e-4080-a38a-0b30e10a3285
regex_pattern
Regex Pattern: (YG)*(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 '(RY)?(GBY)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": true, "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": "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": "GBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYGBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBYRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYGGBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGYRGGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYBGBBYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRGYRBGR" } ]
manufactoria
medium
7bd26ffb-804c-4989-a970-5b67801d38bc
regex_pattern
Regex Pattern: (RY)?(GBY)?
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nAccept if the tape matches the regex pattern '(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": 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": "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": "Y" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRBYG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YY" } ]
manufactoria
easy
3ea3ef3d-c680-43e8-9743-32df5f95746b
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 '(RGY)+(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": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGYYYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGYRGYRGYYYYYYYYYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGYRGYYYYYYYYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYYRGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGYBYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYYRGBYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRBYYBRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRBGYBR" } ]
manufactoria
medium
184dfc83-5be2-471b-984c-b96c3b528a62
regex_pattern
Regex Pattern: (RGY)+(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 '(RY)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "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": "RY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYGRYYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBRBRBGG" } ]
manufactoria
easy
13236272-6048-46aa-b70c-0cbcc0fb72e5
regex_pattern
Regex Pattern: (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 '(BGB)?(BGB)+' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "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": "BGBBGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGBBGBBGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGBBGBBGBBGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGBGBGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYYBGBYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYBBGBYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGRBG" } ]
manufactoria
medium
5c67b2f3-c665-4809-b3c2-0c7bfb9f7c52
regex_pattern
Regex Pattern: (BGB)?(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 '(YRR)?(YGG)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "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": "BB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRRYGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGGYRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRRGYGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYBYRYYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRBYGYRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGGYRBY" } ]
manufactoria
medium
c394e189-fc8e-4610-8c09-581aff6e2aee
regex_pattern
Regex Pattern: (YRR)?(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 '(BRY)+(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": 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": "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": "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": "BRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRYBRYBRYBGR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRYBRYBRYBRYBGRBGRBGRBGR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BRYBGRBGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGRBRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRYYBGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGYBRBGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYGBGGYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRGRBB" } ]
manufactoria
medium
dce13990-3154-463b-9c22-914c5c59a871
regex_pattern
Regex Pattern: (BRY)+(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 '(BBG)?(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": 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": true, "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": "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": "YB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBGGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BBGGGGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGBBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBGRGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRYBBYRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYYGRYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYBYRBGR" } ]
manufactoria
medium
98529010-ce97-484b-bc76-e23c9db49ad1
regex_pattern
Regex Pattern: (BBG)?(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 '(YBB)*(YYB)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "Y" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBBYBBYBBYYBYYB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBBYBBYBBYYBYYBYYB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YBBYBB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYBYYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYBYBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBBYYYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YGGYBYGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRYYYBRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBGYGRBG" } ]
manufactoria
medium
c425a278-d736-4f3c-bd84-feeb83af46d6
regex_pattern
Regex Pattern: (YBB)*(YYB)*
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nAccept if the tape matches the regex pattern '(RGG)+(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": "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": "BB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGGYYG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGGRGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGGRGGRGGYYG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYGRGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGGBYYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYRRGYYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGRYYBGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGRYBY" } ]
manufactoria
medium
58da8816-a71f-461c-a553-88fced3c89ca
regex_pattern
Regex Pattern: (RGG)+(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 '(BGY)+(GBY)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": 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": "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": "BGYGBYGBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGYBGYGBYGBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGYBGYGBYGBYGBYGBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "BGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBYBGY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGYBGBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBGBGGBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBGGBBBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGBBGBY" } ]
manufactoria
medium
2b99444d-40ca-48d1-a5eb-14947545f55c
regex_pattern
Regex Pattern: (BGY)+(GBY)*
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nAccept if the tape matches the regex pattern '(GG)?(RG)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RY" }, { "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": "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": "GGRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGRGRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GGRGRGRGRG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGRRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRBGYRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGRRRGR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYYBRBBY" } ]
manufactoria
medium
f4015e26-592c-4bd1-82a7-260d24b3455f
regex_pattern
Regex Pattern: (GG)?(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 '(GBY)*(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": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "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": "YB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBYGBG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBYGBYGBYGBG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBYGBYGBG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBYGBY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBGGBY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBYYGBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GBGGBGBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRYGBYRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGGGB" } ]
manufactoria
medium
1d96f641-bfb3-48e4-aa83-41e27ba54264
regex_pattern
Regex Pattern: (GBY)*(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 '(YRB)+(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": 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": "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": "YRBGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRBGGGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRBYRBYRBGGGG" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GGYRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YRBGGG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRGYRBRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYBGBYB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYGGBGBG" } ]
manufactoria
medium
1bf68db4-9015-46bc-a3fe-fec03e6ed282
regex_pattern
Regex Pattern: (YRB)+(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 '(GRY)+(BGB)?' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "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": "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": "GRY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRYBGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRYGRYBGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGBGRY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRYBBGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBBGRYBB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYGBGRYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRBBGB" } ]
manufactoria
medium
d9586164-cd51-46e2-9793-add118578bdd
regex_pattern
Regex Pattern: (GRY)+(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 '(GRB)+(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": "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": "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": "GRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRBGRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRBGRBBRB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "GRBBRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRBGRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRBGBRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGBGRRGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYYBRRYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYBGB" } ]
manufactoria
medium
676a1501-c7ab-47ae-a0ea-dbb2cf753c76
regex_pattern
Regex Pattern: (GRB)+(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 '(RYR)+(BRR)+' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "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": "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": "RYRBRR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYRBRRBRR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RYRRYRBRRBRRBRRBRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRRRYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RYRGBRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GYRRYGYR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGBBRRGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRGGY" } ]
manufactoria
medium
3a0c97aa-ba79-47bb-919d-f207162d2d28
regex_pattern
Regex Pattern: (RYR)+(BRR)+
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node\n- **Rejected**: Robot is not routed to the END node or caught in an infinite loop. \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nAccept if the tape matches the regex pattern '(RRR)+(BGB)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "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": "GB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "G" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRRBGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRRRRRRRRBGBBGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRRRRRBGBBGBBGBBGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRR" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RRRBGBBGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BGBRRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RRRGBGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BRGRRBRG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "GRRBGGRR" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RBBBGB" } ]
manufactoria
medium
55560684-d06d-4189-82b4-ca0b84da1560
regex_pattern
Regex Pattern: (RRR)+(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 '(YYY)*(RGB)*' exactly; reject otherwise. '+' means one or more repetitions, '?' means zero or one occurrence, '*' means zero or more repetitions.", "role": "user" } ]
[ { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "R" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "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": true, "expected_output": "", "input": "YYYRGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYYYYYRGBRGBRGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYYYYYYYYYYYRGBRGBRGBRGB" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "YYYYYY" }, { "check_output": false, "description": "", "expected_accepted": true, "expected_output": "", "input": "RGBRGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGBYYY" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YYYYRGB" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "BYGYYBYG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "YBGRGYBG" }, { "check_output": false, "description": "", "expected_accepted": false, "expected_output": "", "input": "RGRRRGG" } ]
manufactoria
medium
0b633f13-73ff-4f15-9cfe-facddd594797
regex_pattern
Regex Pattern: (YYY)*(RGB)*