Dataset Viewer
Auto-converted to Parquet
messages
listlengths
1
1
ground_truth
listlengths
26
32
dataset
stringclasses
1 value
difficulty
stringclasses
1 value
id
stringlengths
36
36
problem_family
stringclasses
1 value
name
stringlengths
15
21
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective (output check)\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node and meets the puzzle's acceptance criteria\n- **Rejected**: Robot is routed to the NONE node, or caught in an infinite loop, or robot reaches the END node but fails to meet the puzzle's acceptance criteria \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted if they meet the puzzle criteria, otherwise rejected\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nTreat Blue as 1 and Red as 0. Apply add 1 to the binary number and output the result. If the result is zero or negative, output an empty tape. If the result is positive, output the binary representation (which will start with B). The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "" }, { "check_output": true, "description": "Input 'R' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "R" }, { "check_output": true, "description": "Input 'RB' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' should output 'BBB'", "expected_accepted": true, "expected_output": "BBB", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' should output 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "RRB" }, { "check_output": true, "description": "Input 'B' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "B" }, { "check_output": true, "description": "Input 'RR' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "RR" }, { "check_output": true, "description": "Input 'BR' should output 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' should output 'BBR'", "expected_accepted": true, "expected_output": "BBR", "input": "BRB" }, { "check_output": true, "description": "Input 'RBRB' should output 'BBR'", "expected_accepted": true, "expected_output": "BBR", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRR' should output 'BRB'", "expected_accepted": true, "expected_output": "BRB", "input": "BRR" }, { "check_output": true, "description": "Input 'BRRRRRR' should output 'BRRRRRB'", "expected_accepted": true, "expected_output": "BRRRRRB", "input": "BRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRR' should output 'BRRRRRRB'", "expected_accepted": true, "expected_output": "BRRRRRRB", "input": "BRRRRRRR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BRRRRRRRR'", "expected_accepted": true, "expected_output": "BRRRRRRRR", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'BRRRRRRR'", "expected_accepted": true, "expected_output": "BRRRRRRR", "input": "BBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBB' should output 'BRRRRRR'", "expected_accepted": true, "expected_output": "BRRRRRR", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BBBBB' should output 'BRRRRR'", "expected_accepted": true, "expected_output": "BRRRRR", "input": "BBBBB" }, { "check_output": true, "description": "Input 'BBBB' should output 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "BBBB" }, { "check_output": true, "description": "Input 'BRRRRRRRR' should output 'BRRRRRRRB'", "expected_accepted": true, "expected_output": "BRRRRRRRB", "input": "BRRRRRRRR" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BRBRBRBB'", "expected_accepted": true, "expected_output": "BRBRBRBB", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'RBBRBRRBR' should output 'BBRBRRBB'", "expected_accepted": true, "expected_output": "BBRBRRBB", "input": "RBBRBRRBR" }, { "check_output": true, "description": "Input 'BRBBBBBB' should output 'BBRRRRRR'", "expected_accepted": true, "expected_output": "BBRRRRRR", "input": "BRBBBBBB" }, { "check_output": true, "description": "Input 'RBRBRBRR' should output 'BRBRBRB'", "expected_accepted": true, "expected_output": "BRBRBRB", "input": "RBRBRBRR" }, { "check_output": true, "description": "Input 'BRBRBR' should output 'BRBRBB'", "expected_accepted": true, "expected_output": "BRBRBB", "input": "BRBRBR" }, { "check_output": true, "description": "Input 'BBRBBRBR' should output 'BBRBBRBB'", "expected_accepted": true, "expected_output": "BBRBBRBB", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBRRBBR' should output 'BBRRBBB'", "expected_accepted": true, "expected_output": "BBRRBBB", "input": "RBBRRBBR" } ]
manufactoria
hard
2c80cb62-4a7b-4e15-8ae8-e2110624eadf
numerical_operations
Numerical Add 1
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective (output check)\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node and meets the puzzle's acceptance criteria\n- **Rejected**: Robot is routed to the NONE node, or caught in an infinite loop, or robot reaches the END node but fails to meet the puzzle's acceptance criteria \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted if they meet the puzzle criteria, otherwise rejected\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nTreat Blue as 1 and Red as 0. Apply subtract 32 to the binary number and output the result. If the result is zero or negative, output an empty tape. If the result is positive, output the binary representation (which will start with B). The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' should output ''", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": true, "description": "Input 'R' should output ''", "expected_accepted": true, "expected_output": "", "input": "R" }, { "check_output": true, "description": "Input 'RB' should output ''", "expected_accepted": true, "expected_output": "", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' should output ''", "expected_accepted": true, "expected_output": "", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' should output ''", "expected_accepted": true, "expected_output": "", "input": "RRB" }, { "check_output": true, "description": "Input 'B' should output ''", "expected_accepted": true, "expected_output": "", "input": "B" }, { "check_output": true, "description": "Input 'BRB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BR" }, { "check_output": true, "description": "Input 'BB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BB" }, { "check_output": true, "description": "Input 'RBRB' should output ''", "expected_accepted": true, "expected_output": "", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBBBB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BBBBB" }, { "check_output": true, "description": "Input 'BRRRRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRRRRR" }, { "check_output": true, "description": "Input 'BRRRRB' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BRRRRB" }, { "check_output": true, "description": "Input 'BRRRRRR' should output 'BRRRRR'", "expected_accepted": true, "expected_output": "BRRRRR", "input": "BRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRR' should output 'BBRRRRR'", "expected_accepted": true, "expected_output": "BBRRRRR", "input": "BRRRRRRR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BBRBBBBB'", "expected_accepted": true, "expected_output": "BBRBBBBB", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'BRBBBBB'", "expected_accepted": true, "expected_output": "BRBBBBB", "input": "BBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBB' should output 'BBBBB'", "expected_accepted": true, "expected_output": "BBBBB", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BBBB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BBBB" }, { "check_output": true, "description": "Input 'BRRRRRRRR' should output 'BBBRRRRR'", "expected_accepted": true, "expected_output": "BBBRRRRR", "input": "BRRRRRRRR" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BRRRBRBR'", "expected_accepted": true, "expected_output": "BRRRBRBR", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'RBBRBRRBR' should output 'BRBBRRBR'", "expected_accepted": true, "expected_output": "BRBBRRBR", "input": "RBBRBRRBR" }, { "check_output": true, "description": "Input 'BRBBBBBB' should output 'BRRBBBBB'", "expected_accepted": true, "expected_output": "BRRBBBBB", "input": "BRBBBBBB" }, { "check_output": true, "description": "Input 'RBRBRBRR' should output 'BBRBRR'", "expected_accepted": true, "expected_output": "BBRBRR", "input": "RBRBRBRR" }, { "check_output": true, "description": "Input 'BRBRBR' should output 'BRBR'", "expected_accepted": true, "expected_output": "BRBR", "input": "BRBRBR" }, { "check_output": true, "description": "Input 'BBRBBRBR' should output 'BRBBBRBR'", "expected_accepted": true, "expected_output": "BRBBBRBR", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBRRBBR' should output 'BRRRBBR'", "expected_accepted": true, "expected_output": "BRRRBBR", "input": "RBBRRBBR" } ]
manufactoria
hard
4d55425b-5479-4c6d-8027-6f6022aa0bd2
numerical_operations
Numerical Subtract 32
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective (output check)\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node and meets the puzzle's acceptance criteria\n- **Rejected**: Robot is routed to the NONE node, or caught in an infinite loop, or robot reaches the END node but fails to meet the puzzle's acceptance criteria \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted if they meet the puzzle criteria, otherwise rejected\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nTreat Blue as 1 and Red as 0. Apply subtract 64 to the binary number and output the result. If the result is zero or negative, output an empty tape. If the result is positive, output the binary representation (which will start with B). The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' should output ''", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": true, "description": "Input 'R' should output ''", "expected_accepted": true, "expected_output": "", "input": "R" }, { "check_output": true, "description": "Input 'RB' should output ''", "expected_accepted": true, "expected_output": "", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' should output ''", "expected_accepted": true, "expected_output": "", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' should output ''", "expected_accepted": true, "expected_output": "", "input": "RRB" }, { "check_output": true, "description": "Input 'B' should output ''", "expected_accepted": true, "expected_output": "", "input": "B" }, { "check_output": true, "description": "Input 'BRB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BR" }, { "check_output": true, "description": "Input 'RBRB' should output ''", "expected_accepted": true, "expected_output": "", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBBBBB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BRRRRRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRB' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BRRRRRB" }, { "check_output": true, "description": "Input 'BRRRRRRR' should output 'BRRRRRR'", "expected_accepted": true, "expected_output": "BRRRRRR", "input": "BRRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRRR' should output 'BBRRRRRR'", "expected_accepted": true, "expected_output": "BBRRRRRR", "input": "BRRRRRRRR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BRBBBBBB'", "expected_accepted": true, "expected_output": "BRBBBBBB", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'BBBBBB'", "expected_accepted": true, "expected_output": "BBBBBB", "input": "BBBBBBB" }, { "check_output": true, "description": "Input 'BBBBB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BBBBB" }, { "check_output": true, "description": "Input 'BBBB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BBBB" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BBRBRBR'", "expected_accepted": true, "expected_output": "BBRBRBR", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'RBBRBRRBR' should output 'BRRBRRBR'", "expected_accepted": true, "expected_output": "BRRBRRBR", "input": "RBBRBRRBR" }, { "check_output": true, "description": "Input 'BRBBBBBB' should output 'BBBBBBB'", "expected_accepted": true, "expected_output": "BBBBBBB", "input": "BRBBBBBB" }, { "check_output": true, "description": "Input 'RBRBRBRR' should output 'BRBRR'", "expected_accepted": true, "expected_output": "BRBRR", "input": "RBRBRBRR" }, { "check_output": true, "description": "Input 'BRBRBR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRBRBR" }, { "check_output": true, "description": "Input 'BBRBBRBR' should output 'BRRBBRBR'", "expected_accepted": true, "expected_output": "BRRBBRBR", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBRRBBR' should output 'BRRBBR'", "expected_accepted": true, "expected_output": "BRRBBR", "input": "RBBRRBBR" } ]
manufactoria
hard
5529b846-c997-498e-ab28-f9665d533ff3
numerical_operations
Numerical Subtract 64
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective (output check)\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node and meets the puzzle's acceptance criteria\n- **Rejected**: Robot is routed to the NONE node, or caught in an infinite loop, or robot reaches the END node but fails to meet the puzzle's acceptance criteria \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted if they meet the puzzle criteria, otherwise rejected\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nTreat Blue as 1 and Red as 0. Apply add 32 to the binary number and output the result. If the result is zero or negative, output an empty tape. If the result is positive, output the binary representation (which will start with B). The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' should output 'BRRRRR'", "expected_accepted": true, "expected_output": "BRRRRR", "input": "" }, { "check_output": true, "description": "Input 'R' should output 'BRRRRR'", "expected_accepted": true, "expected_output": "BRRRRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' should output 'BRRRRB'", "expected_accepted": true, "expected_output": "BRRRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' should output 'BRRBBR'", "expected_accepted": true, "expected_output": "BRRBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' should output 'BRRRBR'", "expected_accepted": true, "expected_output": "BRRRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' should output 'BRRRRB'", "expected_accepted": true, "expected_output": "BRRRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' should output 'BRRRRR'", "expected_accepted": true, "expected_output": "BRRRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' should output 'BRRRBR'", "expected_accepted": true, "expected_output": "BRRRBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' should output 'BRRBRB'", "expected_accepted": true, "expected_output": "BRRBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' should output 'BRRRBB'", "expected_accepted": true, "expected_output": "BRRRBB", "input": "BB" }, { "check_output": true, "description": "Input 'B' should output 'BRRRRB'", "expected_accepted": true, "expected_output": "BRRRRB", "input": "B" }, { "check_output": true, "description": "Input 'RBRB' should output 'BRRBRB'", "expected_accepted": true, "expected_output": "BRRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBBBB' should output 'BBBBBB'", "expected_accepted": true, "expected_output": "BBBBBB", "input": "BBBBB" }, { "check_output": true, "description": "Input 'BRRRRR' should output 'BRRRRRR'", "expected_accepted": true, "expected_output": "BRRRRRR", "input": "BRRRRR" }, { "check_output": true, "description": "Input 'BRRRRB' should output 'BRRRRRB'", "expected_accepted": true, "expected_output": "BRRRRRB", "input": "BRRRRB" }, { "check_output": true, "description": "Input 'BRRRRRR' should output 'BBRRRRR'", "expected_accepted": true, "expected_output": "BBRRRRR", "input": "BRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRR' should output 'BRBRRRRR'", "expected_accepted": true, "expected_output": "BRBRRRRR", "input": "BRRRRRRR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BRRRBBBBB'", "expected_accepted": true, "expected_output": "BRRRBBBBB", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'BRRBBBBB'", "expected_accepted": true, "expected_output": "BRRBBBBB", "input": "BBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBB' should output 'BRBBBBB'", "expected_accepted": true, "expected_output": "BRBBBBB", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BBBB' should output 'BRBBBB'", "expected_accepted": true, "expected_output": "BRBBBB", "input": "BBBB" }, { "check_output": true, "description": "Input 'BRRRRRRRR' should output 'BRRBRRRRR'", "expected_accepted": true, "expected_output": "BRRBRRRRR", "input": "BRRRRRRRR" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BBRRBRBR'", "expected_accepted": true, "expected_output": "BBRRBRBR", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'RBBRBRRBR' should output 'BBBBRRBR'", "expected_accepted": true, "expected_output": "BBBBRRBR", "input": "RBBRBRRBR" }, { "check_output": true, "description": "Input 'BRBBBBBB' should output 'BBRBBBBB'", "expected_accepted": true, "expected_output": "BBRBBBBB", "input": "BRBBBBBB" }, { "check_output": true, "description": "Input 'RBRBRBRR' should output 'BBBRBRR'", "expected_accepted": true, "expected_output": "BBBRBRR", "input": "RBRBRBRR" }, { "check_output": true, "description": "Input 'BRBRBR' should output 'BRRBRBR'", "expected_accepted": true, "expected_output": "BRRBRBR", "input": "BRBRBR" }, { "check_output": true, "description": "Input 'BBRBBRBR' should output 'BBBBBRBR'", "expected_accepted": true, "expected_output": "BBBBBRBR", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBRRBBR' should output 'BRRRRBBR'", "expected_accepted": true, "expected_output": "BRRRRBBR", "input": "RBBRRBBR" } ]
manufactoria
hard
dc0e3401-08cb-4253-8407-e5b4a364fa11
numerical_operations
Numerical Add 32
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective (output check)\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node and meets the puzzle's acceptance criteria\n- **Rejected**: Robot is routed to the NONE node, or caught in an infinite loop, or robot reaches the END node but fails to meet the puzzle's acceptance criteria \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted if they meet the puzzle criteria, otherwise rejected\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nTreat Blue as 1 and Red as 0. Apply add 8 to the binary number and output the result. If the result is zero or negative, output an empty tape. If the result is positive, output the binary representation (which will start with B). The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' should output 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "" }, { "check_output": true, "description": "Input 'R' should output 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' should output 'BRRB'", "expected_accepted": true, "expected_output": "BRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' should output 'BBBR'", "expected_accepted": true, "expected_output": "BBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' should output 'BRBR'", "expected_accepted": true, "expected_output": "BRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' should output 'BRRB'", "expected_accepted": true, "expected_output": "BRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' should output 'BRRB'", "expected_accepted": true, "expected_output": "BRRB", "input": "B" }, { "check_output": true, "description": "Input 'RR' should output 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' should output 'BRBR'", "expected_accepted": true, "expected_output": "BRBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' should output 'BBRB'", "expected_accepted": true, "expected_output": "BBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' should output 'BRBB'", "expected_accepted": true, "expected_output": "BRBB", "input": "BB" }, { "check_output": true, "description": "Input 'RBRB' should output 'BBRB'", "expected_accepted": true, "expected_output": "BBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBB' should output 'BBBB'", "expected_accepted": true, "expected_output": "BBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'BRRR' should output 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "BRRR" }, { "check_output": true, "description": "Input 'BRRB' should output 'BRRRB'", "expected_accepted": true, "expected_output": "BRRRB", "input": "BRRB" }, { "check_output": true, "description": "Input 'BRRRR' should output 'BBRRR'", "expected_accepted": true, "expected_output": "BBRRR", "input": "BRRRR" }, { "check_output": true, "description": "Input 'BRRRRR' should output 'BRBRRR'", "expected_accepted": true, "expected_output": "BRBRRR", "input": "BRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRR' should output 'BRRBRRR'", "expected_accepted": true, "expected_output": "BRRBRRR", "input": "BRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRR' should output 'BRRRBRRR'", "expected_accepted": true, "expected_output": "BRRRBRRR", "input": "BRRRRRRR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BRRRRRBBB'", "expected_accepted": true, "expected_output": "BRRRRRBBB", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'BRRRRBBB'", "expected_accepted": true, "expected_output": "BRRRRBBB", "input": "BBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBB' should output 'BRRRBBB'", "expected_accepted": true, "expected_output": "BRRRBBB", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BBBBB' should output 'BRRBBB'", "expected_accepted": true, "expected_output": "BRRBBB", "input": "BBBBB" }, { "check_output": true, "description": "Input 'BBBB' should output 'BRBBB'", "expected_accepted": true, "expected_output": "BRBBB", "input": "BBBB" }, { "check_output": true, "description": "Input 'BRRRRRRRR' should output 'BRRRRBRRR'", "expected_accepted": true, "expected_output": "BRRRRBRRR", "input": "BRRRRRRRR" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BRBBRRBR'", "expected_accepted": true, "expected_output": "BRBBRRBR", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'RBBRBRRBR' should output 'BBRBBRBR'", "expected_accepted": true, "expected_output": "BBRBBRBR", "input": "RBBRBRRBR" }, { "check_output": true, "description": "Input 'BRBBBBBB' should output 'BBRRRBBB'", "expected_accepted": true, "expected_output": "BBRRRBBB", "input": "BRBBBBBB" }, { "check_output": true, "description": "Input 'RBRBRBRR' should output 'BRBBBRR'", "expected_accepted": true, "expected_output": "BRBBBRR", "input": "RBRBRBRR" }, { "check_output": true, "description": "Input 'BRBRBR' should output 'BBRRBR'", "expected_accepted": true, "expected_output": "BBRRBR", "input": "BRBRBR" }, { "check_output": true, "description": "Input 'BBRBBRBR' should output 'BBBRRRBR'", "expected_accepted": true, "expected_output": "BBBRRRBR", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBRRBBR' should output 'BBRBBBR'", "expected_accepted": true, "expected_output": "BBRBBBR", "input": "RBBRRBBR" } ]
manufactoria
hard
95af64b4-954e-4c73-b3d8-bdf7dc56eaf2
numerical_operations
Numerical Add 8
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective (output check)\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node and meets the puzzle's acceptance criteria\n- **Rejected**: Robot is routed to the NONE node, or caught in an infinite loop, or robot reaches the END node but fails to meet the puzzle's acceptance criteria \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted if they meet the puzzle criteria, otherwise rejected\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nTreat Blue as 1 and Red as 0. Apply add 4 to the binary number and output the result. If the result is zero or negative, output an empty tape. If the result is positive, output the binary representation (which will start with B). The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' should output 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "" }, { "check_output": true, "description": "Input 'R' should output 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' should output 'BRB'", "expected_accepted": true, "expected_output": "BRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' should output 'BRBR'", "expected_accepted": true, "expected_output": "BRBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' should output 'BBR'", "expected_accepted": true, "expected_output": "BBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' should output 'BRB'", "expected_accepted": true, "expected_output": "BRB", "input": "RRB" }, { "check_output": true, "description": "Input 'BRB' should output 'BRRB'", "expected_accepted": true, "expected_output": "BRRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' should output 'BBR'", "expected_accepted": true, "expected_output": "BBR", "input": "BR" }, { "check_output": true, "description": "Input 'BB' should output 'BBB'", "expected_accepted": true, "expected_output": "BBB", "input": "BB" }, { "check_output": true, "description": "Input 'B' should output 'BRB'", "expected_accepted": true, "expected_output": "BRB", "input": "B" }, { "check_output": true, "description": "Input 'RBRB' should output 'BRRB'", "expected_accepted": true, "expected_output": "BRRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRR' should output 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "BRR" }, { "check_output": true, "description": "Input 'BRRR' should output 'BBRR'", "expected_accepted": true, "expected_output": "BBRR", "input": "BRRR" }, { "check_output": true, "description": "Input 'BRRRR' should output 'BRBRR'", "expected_accepted": true, "expected_output": "BRBRR", "input": "BRRRR" }, { "check_output": true, "description": "Input 'BRRRRRR' should output 'BRRRBRR'", "expected_accepted": true, "expected_output": "BRRRBRR", "input": "BRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRR' should output 'BRRRRBRR'", "expected_accepted": true, "expected_output": "BRRRRBRR", "input": "BRRRRRRR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BRRRRRRBB'", "expected_accepted": true, "expected_output": "BRRRRRRBB", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'BRRRRRBB'", "expected_accepted": true, "expected_output": "BRRRRRBB", "input": "BBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBB' should output 'BRRRRBB'", "expected_accepted": true, "expected_output": "BRRRRBB", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BBBBB' should output 'BRRRBB'", "expected_accepted": true, "expected_output": "BRRRBB", "input": "BBBBB" }, { "check_output": true, "description": "Input 'BBBB' should output 'BRRBB'", "expected_accepted": true, "expected_output": "BRRBB", "input": "BBBB" }, { "check_output": true, "description": "Input 'BRRRRRRRR' should output 'BRRRRRBRR'", "expected_accepted": true, "expected_output": "BRRRRRBRR", "input": "BRRRRRRRR" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BRBRBBBR'", "expected_accepted": true, "expected_output": "BRBRBBBR", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'RBBRBRRBR' should output 'BBRBRBBR'", "expected_accepted": true, "expected_output": "BBRBRBBR", "input": "RBBRBRRBR" }, { "check_output": true, "description": "Input 'BRBBBBBB' should output 'BBRRRRBB'", "expected_accepted": true, "expected_output": "BBRRRRBB", "input": "BRBBBBBB" }, { "check_output": true, "description": "Input 'RBRBRBRR' should output 'BRBBRRR'", "expected_accepted": true, "expected_output": "BRBBRRR", "input": "RBRBRBRR" }, { "check_output": true, "description": "Input 'BRBRBR' should output 'BRBBBR'", "expected_accepted": true, "expected_output": "BRBBBR", "input": "BRBRBR" }, { "check_output": true, "description": "Input 'BBRBBRBR' should output 'BBRBBBBR'", "expected_accepted": true, "expected_output": "BBRBBBBR", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBRRBBR' should output 'BBRBRBR'", "expected_accepted": true, "expected_output": "BBRBRBR", "input": "RBBRRBBR" } ]
manufactoria
hard
c9646a54-a4ff-4b4e-98bf-37158166351e
numerical_operations
Numerical Add 4
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective (output check)\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node and meets the puzzle's acceptance criteria\n- **Rejected**: Robot is routed to the NONE node, or caught in an infinite loop, or robot reaches the END node but fails to meet the puzzle's acceptance criteria \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted if they meet the puzzle criteria, otherwise rejected\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nTreat Blue as 1 and Red as 0. Apply subtract 4 to the binary number and output the result. If the result is zero or negative, output an empty tape. If the result is positive, output the binary representation (which will start with B). The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' should output ''", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": true, "description": "Input 'R' should output ''", "expected_accepted": true, "expected_output": "", "input": "R" }, { "check_output": true, "description": "Input 'RB' should output ''", "expected_accepted": true, "expected_output": "", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' should output ''", "expected_accepted": true, "expected_output": "", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' should output ''", "expected_accepted": true, "expected_output": "", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' should output ''", "expected_accepted": true, "expected_output": "", "input": "RR" }, { "check_output": true, "description": "Input 'BR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BRB" }, { "check_output": true, "description": "Input 'B' should output ''", "expected_accepted": true, "expected_output": "", "input": "B" }, { "check_output": true, "description": "Input 'RBRB' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "RBRB" }, { "check_output": true, "description": "Input 'BB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BB" }, { "check_output": true, "description": "Input 'BRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRR" }, { "check_output": true, "description": "Input 'BRRR' should output 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "BRRR" }, { "check_output": true, "description": "Input 'BRRRR' should output 'BBRR'", "expected_accepted": true, "expected_output": "BBRR", "input": "BRRRR" }, { "check_output": true, "description": "Input 'BRRRRRR' should output 'BBBBRR'", "expected_accepted": true, "expected_output": "BBBBRR", "input": "BRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRR' should output 'BBBBBRR'", "expected_accepted": true, "expected_output": "BBBBBRR", "input": "BRRRRRRR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BBBBBRBB'", "expected_accepted": true, "expected_output": "BBBBBRBB", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'BBBBRBB'", "expected_accepted": true, "expected_output": "BBBBRBB", "input": "BBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBB' should output 'BBBRBB'", "expected_accepted": true, "expected_output": "BBBRBB", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BBBBB' should output 'BBRBB'", "expected_accepted": true, "expected_output": "BBRBB", "input": "BBBBB" }, { "check_output": true, "description": "Input 'BBBB' should output 'BRBB'", "expected_accepted": true, "expected_output": "BRBB", "input": "BBBB" }, { "check_output": true, "description": "Input 'BRRRRRRRR' should output 'BBBBBBRR'", "expected_accepted": true, "expected_output": "BBBBBBRR", "input": "BRRRRRRRR" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BRBRRBBR'", "expected_accepted": true, "expected_output": "BRBRRBBR", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'RBBRBRRBR' should output 'BBRRBBBR'", "expected_accepted": true, "expected_output": "BBRRBBBR", "input": "RBBRBRRBR" }, { "check_output": true, "description": "Input 'BRBBBBBB' should output 'BRBBBRBB'", "expected_accepted": true, "expected_output": "BRBBBRBB", "input": "BRBBBBBB" }, { "check_output": true, "description": "Input 'RBRBRBRR' should output 'BRBRRRR'", "expected_accepted": true, "expected_output": "BRBRRRR", "input": "RBRBRBRR" }, { "check_output": true, "description": "Input 'BRBRBR' should output 'BRRBBR'", "expected_accepted": true, "expected_output": "BRRBBR", "input": "BRBRBR" }, { "check_output": true, "description": "Input 'BBRBBRBR' should output 'BBRBRBBR'", "expected_accepted": true, "expected_output": "BBRBRBBR", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBRRBBR' should output 'BBRRRBR'", "expected_accepted": true, "expected_output": "BBRRRBR", "input": "RBBRRBBR" } ]
manufactoria
hard
13f67959-0951-451d-b249-75e0bd479428
numerical_operations
Numerical Subtract 4
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective (output check)\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node and meets the puzzle's acceptance criteria\n- **Rejected**: Robot is routed to the NONE node, or caught in an infinite loop, or robot reaches the END node but fails to meet the puzzle's acceptance criteria \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted if they meet the puzzle criteria, otherwise rejected\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nTreat Blue as 1 and Red as 0. Apply add 64 to the binary number and output the result. If the result is zero or negative, output an empty tape. If the result is positive, output the binary representation (which will start with B). The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' should output 'BRRRRRR'", "expected_accepted": true, "expected_output": "BRRRRRR", "input": "" }, { "check_output": true, "description": "Input 'R' should output 'BRRRRRR'", "expected_accepted": true, "expected_output": "BRRRRRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' should output 'BRRRRRB'", "expected_accepted": true, "expected_output": "BRRRRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' should output 'BRRRBBR'", "expected_accepted": true, "expected_output": "BRRRBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' should output 'BRRRRBR'", "expected_accepted": true, "expected_output": "BRRRRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' should output 'BRRRRRB'", "expected_accepted": true, "expected_output": "BRRRRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' should output 'BRRRRRB'", "expected_accepted": true, "expected_output": "BRRRRRB", "input": "B" }, { "check_output": true, "description": "Input 'BRB' should output 'BRRRBRB'", "expected_accepted": true, "expected_output": "BRRRBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' should output 'BRRRRBR'", "expected_accepted": true, "expected_output": "BRRRRBR", "input": "BR" }, { "check_output": true, "description": "Input 'BB' should output 'BRRRRBB'", "expected_accepted": true, "expected_output": "BRRRRBB", "input": "BB" }, { "check_output": true, "description": "Input 'RBRB' should output 'BRRRBRB'", "expected_accepted": true, "expected_output": "BRRRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBBBBB' should output 'BBBBBBB'", "expected_accepted": true, "expected_output": "BBBBBBB", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BRRRRRR' should output 'BRRRRRRR'", "expected_accepted": true, "expected_output": "BRRRRRRR", "input": "BRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRB' should output 'BRRRRRRB'", "expected_accepted": true, "expected_output": "BRRRRRRB", "input": "BRRRRRB" }, { "check_output": true, "description": "Input 'BRRRRRRR' should output 'BBRRRRRR'", "expected_accepted": true, "expected_output": "BBRRRRRR", "input": "BRRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRRR' should output 'BRBRRRRRR'", "expected_accepted": true, "expected_output": "BRBRRRRRR", "input": "BRRRRRRRR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BRRBBBBBB'", "expected_accepted": true, "expected_output": "BRRBBBBBB", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'BRBBBBBB'", "expected_accepted": true, "expected_output": "BRBBBBBB", "input": "BBBBBBB" }, { "check_output": true, "description": "Input 'BBBBB' should output 'BRBBBBB'", "expected_accepted": true, "expected_output": "BRBBBBB", "input": "BBBBB" }, { "check_output": true, "description": "Input 'BBBB' should output 'BRRBBBB'", "expected_accepted": true, "expected_output": "BRRBBBB", "input": "BBBB" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BBBRBRBR'", "expected_accepted": true, "expected_output": "BBBRBRBR", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'RBBRBRRBR' should output 'BRRRBRRBR'", "expected_accepted": true, "expected_output": "BRRRBRRBR", "input": "RBBRBRRBR" }, { "check_output": true, "description": "Input 'BRBBBBBB' should output 'BBBBBBBB'", "expected_accepted": true, "expected_output": "BBBBBBBB", "input": "BRBBBBBB" }, { "check_output": true, "description": "Input 'RBRBRBRR' should output 'BRRBRBRR'", "expected_accepted": true, "expected_output": "BRRBRBRR", "input": "RBRBRBRR" }, { "check_output": true, "description": "Input 'BRBRBR' should output 'BBRBRBR'", "expected_accepted": true, "expected_output": "BBRBRBR", "input": "BRBRBR" }, { "check_output": true, "description": "Input 'BBRBBRBR' should output 'BRRRBBRBR'", "expected_accepted": true, "expected_output": "BRRRBBRBR", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBRRBBR' should output 'BRBRRBBR'", "expected_accepted": true, "expected_output": "BRBRRBBR", "input": "RBBRRBBR" } ]
manufactoria
hard
7f6fd506-6dfd-482d-a688-29270e00cbf3
numerical_operations
Numerical Add 64
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective (output check)\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node and meets the puzzle's acceptance criteria\n- **Rejected**: Robot is routed to the NONE node, or caught in an infinite loop, or robot reaches the END node but fails to meet the puzzle's acceptance criteria \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted if they meet the puzzle criteria, otherwise rejected\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nTreat Blue as 1 and Red as 0. Apply subtract 2 to the binary number and output the result. If the result is zero or negative, output an empty tape. If the result is positive, output the binary representation (which will start with B). The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' should output ''", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": true, "description": "Input 'R' should output ''", "expected_accepted": true, "expected_output": "", "input": "R" }, { "check_output": true, "description": "Input 'RB' should output ''", "expected_accepted": true, "expected_output": "", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' should output 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' should output ''", "expected_accepted": true, "expected_output": "", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' should output ''", "expected_accepted": true, "expected_output": "", "input": "RRB" }, { "check_output": true, "description": "Input 'B' should output ''", "expected_accepted": true, "expected_output": "", "input": "B" }, { "check_output": true, "description": "Input 'BRB' should output 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BR" }, { "check_output": true, "description": "Input 'RBRB' should output 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BB' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BB" }, { "check_output": true, "description": "Input 'BRR' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "BRR" }, { "check_output": true, "description": "Input 'BRRR' should output 'BBR'", "expected_accepted": true, "expected_output": "BBR", "input": "BRRR" }, { "check_output": true, "description": "Input 'BRRRRRR' should output 'BBBBBR'", "expected_accepted": true, "expected_output": "BBBBBR", "input": "BRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRR' should output 'BBBBBBR'", "expected_accepted": true, "expected_output": "BBBBBBR", "input": "BRRRRRRR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BBBBBBRB'", "expected_accepted": true, "expected_output": "BBBBBBRB", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'BBBBBRB'", "expected_accepted": true, "expected_output": "BBBBBRB", "input": "BBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBB' should output 'BBBBRB'", "expected_accepted": true, "expected_output": "BBBBRB", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BBBBB' should output 'BBBRB'", "expected_accepted": true, "expected_output": "BBBRB", "input": "BBBBB" }, { "check_output": true, "description": "Input 'BBBB' should output 'BBRB'", "expected_accepted": true, "expected_output": "BBRB", "input": "BBBB" }, { "check_output": true, "description": "Input 'BRRRRRRRR' should output 'BBBBBBBR'", "expected_accepted": true, "expected_output": "BBBBBBBR", "input": "BRRRRRRRR" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BRBRBRRR'", "expected_accepted": true, "expected_output": "BRBRBRRR", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'RBBRBRRBR' should output 'BBRBRRRR'", "expected_accepted": true, "expected_output": "BBRBRRRR", "input": "RBBRBRRBR" }, { "check_output": true, "description": "Input 'BRBBBBBB' should output 'BRBBBBRB'", "expected_accepted": true, "expected_output": "BRBBBBRB", "input": "BRBBBBBB" }, { "check_output": true, "description": "Input 'RBRBRBRR' should output 'BRBRRBR'", "expected_accepted": true, "expected_output": "BRBRRBR", "input": "RBRBRBRR" }, { "check_output": true, "description": "Input 'BRBRBR' should output 'BRBRRR'", "expected_accepted": true, "expected_output": "BRBRRR", "input": "BRBRBR" }, { "check_output": true, "description": "Input 'BBRBBRBR' should output 'BBRBBRRR'", "expected_accepted": true, "expected_output": "BBRBBRRR", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBRRBBR' should output 'BBRRBRR'", "expected_accepted": true, "expected_output": "BBRRBRR", "input": "RBBRRBBR" } ]
manufactoria
hard
8334abfe-b62d-4ed5-b07d-1b15539410cc
numerical_operations
Numerical Subtract 2
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective (output check)\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node and meets the puzzle's acceptance criteria\n- **Rejected**: Robot is routed to the NONE node, or caught in an infinite loop, or robot reaches the END node but fails to meet the puzzle's acceptance criteria \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted if they meet the puzzle criteria, otherwise rejected\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nTreat Blue as 1 and Red as 0. Apply subtract 16 to the binary number and output the result. If the result is zero or negative, output an empty tape. If the result is positive, output the binary representation (which will start with B). The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' should output ''", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": true, "description": "Input 'R' should output ''", "expected_accepted": true, "expected_output": "", "input": "R" }, { "check_output": true, "description": "Input 'RB' should output ''", "expected_accepted": true, "expected_output": "", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' should output ''", "expected_accepted": true, "expected_output": "", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' should output ''", "expected_accepted": true, "expected_output": "", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' should output ''", "expected_accepted": true, "expected_output": "", "input": "RR" }, { "check_output": true, "description": "Input 'BR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRB" }, { "check_output": true, "description": "Input 'B' should output ''", "expected_accepted": true, "expected_output": "", "input": "B" }, { "check_output": true, "description": "Input 'RBRB' should output ''", "expected_accepted": true, "expected_output": "", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBBB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BBBB" }, { "check_output": true, "description": "Input 'BRRRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRRRR" }, { "check_output": true, "description": "Input 'BRRRB' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BRRRB" }, { "check_output": true, "description": "Input 'BRRRRR' should output 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "BRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRR' should output 'BBRRRR'", "expected_accepted": true, "expected_output": "BBRRRR", "input": "BRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRR' should output 'BBBRRRR'", "expected_accepted": true, "expected_output": "BBBRRRR", "input": "BRRRRRRR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BBBRBBBB'", "expected_accepted": true, "expected_output": "BBBRBBBB", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'BBRBBBB'", "expected_accepted": true, "expected_output": "BBRBBBB", "input": "BBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBB' should output 'BRBBBB'", "expected_accepted": true, "expected_output": "BRBBBB", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BBBBB' should output 'BBBB'", "expected_accepted": true, "expected_output": "BBBB", "input": "BBBBB" }, { "check_output": true, "description": "Input 'BRRRRRRRR' should output 'BBBBRRRR'", "expected_accepted": true, "expected_output": "BBBBRRRR", "input": "BRRRRRRRR" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BRRBBRBR'", "expected_accepted": true, "expected_output": "BRRBBRBR", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'RBBRBRRBR' should output 'BBRRRRBR'", "expected_accepted": true, "expected_output": "BBRRRRBR", "input": "RBBRBRRBR" }, { "check_output": true, "description": "Input 'BRBBBBBB' should output 'BRBRBBBB'", "expected_accepted": true, "expected_output": "BRBRBBBB", "input": "BRBBBBBB" }, { "check_output": true, "description": "Input 'RBRBRBRR' should output 'BRRRBRR'", "expected_accepted": true, "expected_output": "BRRRBRR", "input": "RBRBRBRR" }, { "check_output": true, "description": "Input 'BRBRBR' should output 'BBRBR'", "expected_accepted": true, "expected_output": "BBRBR", "input": "BRBRBR" }, { "check_output": true, "description": "Input 'BBRBBRBR' should output 'BBRRBRBR'", "expected_accepted": true, "expected_output": "BBRRBRBR", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBRRBBR' should output 'BRBRBBR'", "expected_accepted": true, "expected_output": "BRBRBBR", "input": "RBBRRBBR" } ]
manufactoria
hard
038c8122-f58b-44e4-a6a9-fac214d2f744
numerical_operations
Numerical Subtract 16
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective (output check)\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node and meets the puzzle's acceptance criteria\n- **Rejected**: Robot is routed to the NONE node, or caught in an infinite loop, or robot reaches the END node but fails to meet the puzzle's acceptance criteria \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted if they meet the puzzle criteria, otherwise rejected\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nTreat Blue as 1 and Red as 0. Apply subtract 1 to the binary number and output the result. If the result is zero or negative, output an empty tape. If the result is positive, output the binary representation (which will start with B). The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' should output ''", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": true, "description": "Input 'R' should output ''", "expected_accepted": true, "expected_output": "", "input": "R" }, { "check_output": true, "description": "Input 'RB' should output ''", "expected_accepted": true, "expected_output": "", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' should output 'BRB'", "expected_accepted": true, "expected_output": "BRB", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' should output ''", "expected_accepted": true, "expected_output": "", "input": "RRB" }, { "check_output": true, "description": "Input 'B' should output ''", "expected_accepted": true, "expected_output": "", "input": "B" }, { "check_output": true, "description": "Input 'BRB' should output 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BR" }, { "check_output": true, "description": "Input 'BB' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "BB" }, { "check_output": true, "description": "Input 'RBRB' should output 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRR' should output 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "BRR" }, { "check_output": true, "description": "Input 'BRRRRRR' should output 'BBBBBB'", "expected_accepted": true, "expected_output": "BBBBBB", "input": "BRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRR' should output 'BBBBBBB'", "expected_accepted": true, "expected_output": "BBBBBBB", "input": "BRRRRRRR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BBBBBBBR'", "expected_accepted": true, "expected_output": "BBBBBBBR", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'BBBBBBR'", "expected_accepted": true, "expected_output": "BBBBBBR", "input": "BBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBB' should output 'BBBBBR'", "expected_accepted": true, "expected_output": "BBBBBR", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BBBBB' should output 'BBBBR'", "expected_accepted": true, "expected_output": "BBBBR", "input": "BBBBB" }, { "check_output": true, "description": "Input 'BBBB' should output 'BBBR'", "expected_accepted": true, "expected_output": "BBBR", "input": "BBBB" }, { "check_output": true, "description": "Input 'BRRRRRRRR' should output 'BBBBBBBB'", "expected_accepted": true, "expected_output": "BBBBBBBB", "input": "BRRRRRRRR" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BRBRBRRB'", "expected_accepted": true, "expected_output": "BRBRBRRB", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'RBBRBRRBR' should output 'BBRBRRRB'", "expected_accepted": true, "expected_output": "BBRBRRRB", "input": "RBBRBRRBR" }, { "check_output": true, "description": "Input 'BRBBBBBB' should output 'BRBBBBBR'", "expected_accepted": true, "expected_output": "BRBBBBBR", "input": "BRBBBBBB" }, { "check_output": true, "description": "Input 'RBRBRBRR' should output 'BRBRRBB'", "expected_accepted": true, "expected_output": "BRBRRBB", "input": "RBRBRBRR" }, { "check_output": true, "description": "Input 'BRBRBR' should output 'BRBRRB'", "expected_accepted": true, "expected_output": "BRBRRB", "input": "BRBRBR" }, { "check_output": true, "description": "Input 'BBRBBRBR' should output 'BBRBBRRB'", "expected_accepted": true, "expected_output": "BBRBBRRB", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBRRBBR' should output 'BBRRBRB'", "expected_accepted": true, "expected_output": "BBRRBRB", "input": "RBBRRBBR" } ]
manufactoria
hard
26bd2ab7-335f-4d94-b74d-8a8b8c4ff9e0
numerical_operations
Numerical Subtract 1
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective (output check)\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node and meets the puzzle's acceptance criteria\n- **Rejected**: Robot is routed to the NONE node, or caught in an infinite loop, or robot reaches the END node but fails to meet the puzzle's acceptance criteria \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted if they meet the puzzle criteria, otherwise rejected\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nTreat Blue as 1 and Red as 0. Apply add 16 to the binary number and output the result. If the result is zero or negative, output an empty tape. If the result is positive, output the binary representation (which will start with B). The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' should output 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "" }, { "check_output": true, "description": "Input 'R' should output 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "R" }, { "check_output": true, "description": "Input 'RB' should output 'BRRRB'", "expected_accepted": true, "expected_output": "BRRRB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' should output 'BRBBR'", "expected_accepted": true, "expected_output": "BRBBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' should output 'BRRBR'", "expected_accepted": true, "expected_output": "BRRBR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' should output 'BRRRB'", "expected_accepted": true, "expected_output": "BRRRB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' should output 'BRRRB'", "expected_accepted": true, "expected_output": "BRRRB", "input": "B" }, { "check_output": true, "description": "Input 'BRB' should output 'BRBRB'", "expected_accepted": true, "expected_output": "BRBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' should output 'BRRBR'", "expected_accepted": true, "expected_output": "BRRBR", "input": "BR" }, { "check_output": true, "description": "Input 'BB' should output 'BRRBB'", "expected_accepted": true, "expected_output": "BRRBB", "input": "BB" }, { "check_output": true, "description": "Input 'RBRB' should output 'BRBRB'", "expected_accepted": true, "expected_output": "BRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBBB' should output 'BBBBB'", "expected_accepted": true, "expected_output": "BBBBB", "input": "BBBB" }, { "check_output": true, "description": "Input 'BRRRR' should output 'BRRRRR'", "expected_accepted": true, "expected_output": "BRRRRR", "input": "BRRRR" }, { "check_output": true, "description": "Input 'BRRRB' should output 'BRRRRB'", "expected_accepted": true, "expected_output": "BRRRRB", "input": "BRRRB" }, { "check_output": true, "description": "Input 'BRRRRR' should output 'BBRRRR'", "expected_accepted": true, "expected_output": "BBRRRR", "input": "BRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRR' should output 'BRBRRRR'", "expected_accepted": true, "expected_output": "BRBRRRR", "input": "BRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRR' should output 'BRRBRRRR'", "expected_accepted": true, "expected_output": "BRRBRRRR", "input": "BRRRRRRR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BRRRRBBBB'", "expected_accepted": true, "expected_output": "BRRRRBBBB", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'BRRRBBBB'", "expected_accepted": true, "expected_output": "BRRRBBBB", "input": "BBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBB' should output 'BRRBBBB'", "expected_accepted": true, "expected_output": "BRRBBBB", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BBBBB' should output 'BRBBBB'", "expected_accepted": true, "expected_output": "BRBBBB", "input": "BBBBB" }, { "check_output": true, "description": "Input 'BRRRRRRRR' should output 'BRRRBRRRR'", "expected_accepted": true, "expected_output": "BRRRBRRRR", "input": "BRRRRRRRR" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BRBBBRBR'", "expected_accepted": true, "expected_output": "BRBBBRBR", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'RBBRBRRBR' should output 'BBBRRRBR'", "expected_accepted": true, "expected_output": "BBBRRRBR", "input": "RBBRBRRBR" }, { "check_output": true, "description": "Input 'BRBBBBBB' should output 'BBRRBBBB'", "expected_accepted": true, "expected_output": "BBRRBBBB", "input": "BRBBBBBB" }, { "check_output": true, "description": "Input 'RBRBRBRR' should output 'BBRRBRR'", "expected_accepted": true, "expected_output": "BBRRBRR", "input": "RBRBRBRR" }, { "check_output": true, "description": "Input 'BRBRBR' should output 'BBBRBR'", "expected_accepted": true, "expected_output": "BBBRBR", "input": "BRBRBR" }, { "check_output": true, "description": "Input 'BBRBBRBR' should output 'BBBRBRBR'", "expected_accepted": true, "expected_output": "BBBRBRBR", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBRRBBR' should output 'BBBRBBR'", "expected_accepted": true, "expected_output": "BBBRBBR", "input": "RBBRRBBR" } ]
manufactoria
hard
21a09749-fa9e-4148-bc3f-3dd5a4a7816f
numerical_operations
Numerical Add 16
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective (output check)\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node and meets the puzzle's acceptance criteria\n- **Rejected**: Robot is routed to the NONE node, or caught in an infinite loop, or robot reaches the END node but fails to meet the puzzle's acceptance criteria \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted if they meet the puzzle criteria, otherwise rejected\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nTreat Blue as 1 and Red as 0. Apply add 2 to the binary number and output the result. If the result is zero or negative, output an empty tape. If the result is positive, output the binary representation (which will start with B). The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "" }, { "check_output": true, "description": "Input 'R' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "R" }, { "check_output": true, "description": "Input 'RB' should output 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' should output 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' should output 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' should output 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "RRB" }, { "check_output": true, "description": "Input 'B' should output 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "B" }, { "check_output": true, "description": "Input 'RR' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' should output 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' should output 'BBB'", "expected_accepted": true, "expected_output": "BBB", "input": "BRB" }, { "check_output": true, "description": "Input 'RBRB' should output 'BBB'", "expected_accepted": true, "expected_output": "BBB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BB' should output 'BRB'", "expected_accepted": true, "expected_output": "BRB", "input": "BB" }, { "check_output": true, "description": "Input 'BRR' should output 'BBR'", "expected_accepted": true, "expected_output": "BBR", "input": "BRR" }, { "check_output": true, "description": "Input 'BRRR' should output 'BRBR'", "expected_accepted": true, "expected_output": "BRBR", "input": "BRRR" }, { "check_output": true, "description": "Input 'BRRRRRR' should output 'BRRRRBR'", "expected_accepted": true, "expected_output": "BRRRRBR", "input": "BRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRR' should output 'BRRRRRBR'", "expected_accepted": true, "expected_output": "BRRRRRBR", "input": "BRRRRRRR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BRRRRRRRB'", "expected_accepted": true, "expected_output": "BRRRRRRRB", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'BRRRRRRB'", "expected_accepted": true, "expected_output": "BRRRRRRB", "input": "BBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBB' should output 'BRRRRRB'", "expected_accepted": true, "expected_output": "BRRRRRB", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BBBBB' should output 'BRRRRB'", "expected_accepted": true, "expected_output": "BRRRRB", "input": "BBBBB" }, { "check_output": true, "description": "Input 'BBBB' should output 'BRRRB'", "expected_accepted": true, "expected_output": "BRRRB", "input": "BBBB" }, { "check_output": true, "description": "Input 'BRRRRRRRR' should output 'BRRRRRRBR'", "expected_accepted": true, "expected_output": "BRRRRRRBR", "input": "BRRRRRRRR" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BRBRBBRR'", "expected_accepted": true, "expected_output": "BRBRBBRR", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'RBBRBRRBR' should output 'BBRBRBRR'", "expected_accepted": true, "expected_output": "BBRBRBRR", "input": "RBBRBRRBR" }, { "check_output": true, "description": "Input 'BRBBBBBB' should output 'BBRRRRRB'", "expected_accepted": true, "expected_output": "BBRRRRRB", "input": "BRBBBBBB" }, { "check_output": true, "description": "Input 'RBRBRBRR' should output 'BRBRBBR'", "expected_accepted": true, "expected_output": "BRBRBBR", "input": "RBRBRBRR" }, { "check_output": true, "description": "Input 'BRBRBR' should output 'BRBBRR'", "expected_accepted": true, "expected_output": "BRBBRR", "input": "BRBRBR" }, { "check_output": true, "description": "Input 'BBRBBRBR' should output 'BBRBBBRR'", "expected_accepted": true, "expected_output": "BBRBBBRR", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBRRBBR' should output 'BBRBRRR'", "expected_accepted": true, "expected_output": "BBRBRRR", "input": "RBBRRBBR" } ]
manufactoria
hard
7f636c12-7177-4bbf-aab0-4e9bba4c058d
numerical_operations
Numerical Add 2
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape to the end of the robot's sequence\n- **Route**: Direct robots through the factory based on their current tape state\n\n### Objective (output check)\nRoute robots to the correct destinations based on their final tape configuration and the puzzle requirements:\n- **Accepted**: Robot reaches the END node and meets the puzzle's acceptance criteria\n- **Rejected**: Robot is routed to the NONE node, or caught in an infinite loop, or robot reaches the END node but fails to meet the puzzle's acceptance criteria \n\n## DSL Syntax\n\n### Program Structure\n\nEvery solution must start with a `START` directive and end with an `END` directive, wrapped in ```manufactoria ...```:\n\n```manufactoria\nSTART start:\n NEXT <next_node_id>\n\n# Factory logic goes here\n\nEND end\n```\n\n### Node Types\n\n#### 1. Puller Nodes\n\nPullers remove specific colors from the front of the robot's tape sequence and route based on the current front color.\n\n**Red/Blue Puller:**\n\n```manufactoria\nPULLER_RB <node_id>:\n [R] <next_node_id> # Route and remove color if front tape is Red\n [B] <next_node_id> # Route and remove color if front tape is Blue\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither red nor blue\n```\n\n**Yellow/Green Puller:**\n\n```manufactoria\nPULLER_YG <node_id>:\n [Y] <next_node_id> # Route and remove color if front tape is Yellow\n [G] <next_node_id> # Route and remove color if front tape is Green\n [EMPTY] <next_node_id> # Route if no tape or front tape is neither yellow nor green\n```\n\n**Note**: Unspecified branches default to `NONE`, which rejects the robot.\n\n#### 2. Painter Nodes\n\nPainters add colored tape to the end of the robot's sequence and continue to the next node.\n\n```manufactoria\nPAINTER_RED <node_id>:\n NEXT <next_node_id>\n\nPAINTER_BLUE <node_id>:\n NEXT <next_node_id>\n\nPAINTER_YELLOW <node_id>:\n NEXT <next_node_id>\n\nPAINTER_GREEN <node_id>:\n NEXT <next_node_id>\n```\n\n## Syntax Rules\n\n1. **Node IDs**: Must be unique identifiers (alphanumeric characters and underscores only)\n2. **Comments**: Lines starting with `#` are comments (single-line only)\n3. **Indentation**: Use consistent spaces or tabs for route definitions\n4. **Case Sensitivity**: Colors must be uppercase (R, B, Y, G)\n5. **Termination**: \n - Robots routed to `NONE` are rejected\n - Robots routed to the END node are accepted if they meet the puzzle criteria, otherwise rejected\n6. **Code Blocks**: Final factory code should be wrapped in triple backticks with ``` markers\n\n## Example\n\nHere's a simple example that accepts robots with exactly one red tape (ending tape should be empty):\n\n```manufactoria\nSTART start:\n NEXT entry\n\nPULLER_RB entry:\n [R] end\n\nEND end\n```\n\n# Task \nYour task is to design a factory with code with following functionality:\n\nTreat Blue as 1 and Red as 0. Apply subtract 8 to the binary number and output the result. If the result is zero or negative, output an empty tape. If the result is positive, output the binary representation (which will start with B). The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' should output ''", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": true, "description": "Input 'R' should output ''", "expected_accepted": true, "expected_output": "", "input": "R" }, { "check_output": true, "description": "Input 'RB' should output ''", "expected_accepted": true, "expected_output": "", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' should output ''", "expected_accepted": true, "expected_output": "", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' should output ''", "expected_accepted": true, "expected_output": "", "input": "RRB" }, { "check_output": true, "description": "Input 'B' should output ''", "expected_accepted": true, "expected_output": "", "input": "B" }, { "check_output": true, "description": "Input 'RR' should output ''", "expected_accepted": true, "expected_output": "", "input": "RR" }, { "check_output": true, "description": "Input 'BR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRB" }, { "check_output": true, "description": "Input 'RBRB' should output ''", "expected_accepted": true, "expected_output": "", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BBB" }, { "check_output": true, "description": "Input 'BRRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRRR" }, { "check_output": true, "description": "Input 'BRRB' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BRRB" }, { "check_output": true, "description": "Input 'BRRRR' should output 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "BRRRR" }, { "check_output": true, "description": "Input 'BRRRRR' should output 'BBRRR'", "expected_accepted": true, "expected_output": "BBRRR", "input": "BRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRR' should output 'BBBRRR'", "expected_accepted": true, "expected_output": "BBBRRR", "input": "BRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRR' should output 'BBBBRRR'", "expected_accepted": true, "expected_output": "BBBBRRR", "input": "BRRRRRRR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BBBBRBBB'", "expected_accepted": true, "expected_output": "BBBBRBBB", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'BBBRBBB'", "expected_accepted": true, "expected_output": "BBBRBBB", "input": "BBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBB' should output 'BBRBBB'", "expected_accepted": true, "expected_output": "BBRBBB", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BBBBB' should output 'BRBBB'", "expected_accepted": true, "expected_output": "BRBBB", "input": "BBBBB" }, { "check_output": true, "description": "Input 'BBBB' should output 'BBB'", "expected_accepted": true, "expected_output": "BBB", "input": "BBBB" }, { "check_output": true, "description": "Input 'BRRRRRRRR' should output 'BBBBBRRR'", "expected_accepted": true, "expected_output": "BBBBBRRR", "input": "BRRRRRRRR" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BRBRRRBR'", "expected_accepted": true, "expected_output": "BRBRRRBR", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'RBBRBRRBR' should output 'BBRRBRBR'", "expected_accepted": true, "expected_output": "BBRRBRBR", "input": "RBBRBRRBR" }, { "check_output": true, "description": "Input 'BRBBBBBB' should output 'BRBBRBBB'", "expected_accepted": true, "expected_output": "BRBBRBBB", "input": "BRBBBBBB" }, { "check_output": true, "description": "Input 'RBRBRBRR' should output 'BRRBBRR'", "expected_accepted": true, "expected_output": "BRRBBRR", "input": "RBRBRBRR" }, { "check_output": true, "description": "Input 'BRBRBR' should output 'BRRRBR'", "expected_accepted": true, "expected_output": "BRRRBR", "input": "BRBRBR" }, { "check_output": true, "description": "Input 'BBRBBRBR' should output 'BBRBRRBR'", "expected_accepted": true, "expected_output": "BBRBRRBR", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBRRBBR' should output 'BRBBBBR'", "expected_accepted": true, "expected_output": "BRBBBBR", "input": "RBBRRBBR" } ]
manufactoria
hard
34fcd20d-df59-4887-b890-097eb2c5091e
numerical_operations
Numerical Subtract 8
README.md exists but content is empty.
Downloads last month
14