Dataset Viewer
Auto-converted to Parquet Duplicate
messages
listlengths
1
1
ground_truth
listlengths
27
30
dataset
stringclasses
1 value
difficulty
stringclasses
1 value
id
stringlengths
36
36
problem_family
stringclasses
1 value
name
stringlengths
27
29
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape 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 bitwise OR with 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 'BRB' should output 'BBRB'", "expected_accepted": true, "expected_output": "BBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' should output 'BRBR'", "expected_accepted": true, "expected_output": "BRBR", "input": "BR" }, { "check_output": true, "description": "Input 'RBRB' should output 'BBRB'", "expected_accepted": true, "expected_output": "BBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRRR' should output 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "BRRR" }, { "check_output": true, "description": "Input 'BBB' should output 'BBBB'", "expected_accepted": true, "expected_output": "BBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'BRRB' should output 'BRRB'", "expected_accepted": true, "expected_output": "BRRB", "input": "BRRB" }, { "check_output": true, "description": "Input 'BRBRBRB' should output 'BRBBBRB'", "expected_accepted": true, "expected_output": "BRBBBRB", "input": "BRBRBRB" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BRBRBRBR'", "expected_accepted": true, "expected_output": "BRBRBRBR", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BBBBBBBB'", "expected_accepted": true, "expected_output": "BBBBBBBB", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'BBBBBBB'", "expected_accepted": true, "expected_output": "BBBBBBB", "input": "BBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBB' should output 'BBBBBB'", "expected_accepted": true, "expected_output": "BBBBBB", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BBBBB' should output 'BBBBB'", "expected_accepted": true, "expected_output": "BBBBB", "input": "BBBBB" }, { "check_output": true, "description": "Input 'BBBB' should output 'BBBB'", "expected_accepted": true, "expected_output": "BBBB", "input": "BBBB" }, { "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 'BRRRRRRRR' should output 'BRRRRBRRR'", "expected_accepted": true, "expected_output": "BRRRRBRRR", "input": "BRRRRRRRR" }, { "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 'BRBBBBBB'", "expected_accepted": true, "expected_output": "BRBBBBBB", "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 'BRBRBR'", "expected_accepted": true, "expected_output": "BRBRBR", "input": "BRBRBR" }, { "check_output": true, "description": "Input 'BBRBBRBR' should output 'BBRBBRBR'", "expected_accepted": true, "expected_output": "BBRBBRBR", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBRRBBR' should output 'BBRBBBR'", "expected_accepted": true, "expected_output": "BBRBBBR", "input": "RBBRRBBR" } ]
manufactoria
medium
a41fd38e-67f7-40e8-9ced-d660be2d1cf4
numerical_operations
Numerical Bitwise Or With 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 bitwise OR with 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 'BBR'", "expected_accepted": true, "expected_output": "BBR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' should output 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "RRB" }, { "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 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' should output 'BBB'", "expected_accepted": true, "expected_output": "BBB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' should output 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "BB" }, { "check_output": true, "description": "Input 'B' should output 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "B" }, { "check_output": true, "description": "Input 'RBRB' should output 'BBB'", "expected_accepted": true, "expected_output": "BBB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRBRBRB' should output 'BRBRBBB'", "expected_accepted": true, "expected_output": "BRBRBBB", "input": "BRBRBRB" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BRBRBRBR'", "expected_accepted": true, "expected_output": "BRBRBRBR", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BBBBBBBB'", "expected_accepted": true, "expected_output": "BBBBBBBB", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'BBBBBBB'", "expected_accepted": true, "expected_output": "BBBBBBB", "input": "BBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBB' should output 'BBBBBB'", "expected_accepted": true, "expected_output": "BBBBBB", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BBBBB' should output 'BBBBB'", "expected_accepted": true, "expected_output": "BBBBB", "input": "BBBBB" }, { "check_output": true, "description": "Input 'BBBB' should output 'BBBB'", "expected_accepted": true, "expected_output": "BBBB", "input": "BBBB" }, { "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 'BRRRRRRRR' should output 'BRRRRRRBR'", "expected_accepted": true, "expected_output": "BRRRRRRBR", "input": "BRRRRRRRR" }, { "check_output": true, "description": "Input 'RBBRBRRBR' should output 'BBRBRRBR'", "expected_accepted": true, "expected_output": "BBRBRRBR", "input": "RBBRBRRBR" }, { "check_output": true, "description": "Input 'BRBBBBBB' should output 'BRBBBBBB'", "expected_accepted": true, "expected_output": "BRBBBBBB", "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 'BRBRBR'", "expected_accepted": true, "expected_output": "BRBRBR", "input": "BRBRBR" }, { "check_output": true, "description": "Input 'BBRBBRBR' should output 'BBRBBRBR'", "expected_accepted": true, "expected_output": "BBRBBRBR", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBRRBBR' should output 'BBRRBBR'", "expected_accepted": true, "expected_output": "BBRRBBR", "input": "RBBRRBBR" } ]
manufactoria
medium
bc0883d0-5682-4c34-9dbe-8c630e6dda91
numerical_operations
Numerical Bitwise Or With 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 bitwise XOR with 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 'BRB' should output 'BBRB'", "expected_accepted": true, "expected_output": "BBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' should output 'BRBR'", "expected_accepted": true, "expected_output": "BRBR", "input": "BR" }, { "check_output": true, "description": "Input 'BB' should output 'BRBB'", "expected_accepted": true, "expected_output": "BRBB", "input": "BB" }, { "check_output": true, "description": "Input 'B' should output 'BRRB'", "expected_accepted": true, "expected_output": "BRRB", "input": "B" }, { "check_output": true, "description": "Input 'RBRB' should output 'BBRB'", "expected_accepted": true, "expected_output": "BBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRRR" }, { "check_output": true, "description": "Input 'BBB' should output 'BBBB'", "expected_accepted": true, "expected_output": "BBBB", "input": "BBB" }, { "check_output": true, "description": "Input 'BRRB' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BRRB" }, { "check_output": true, "description": "Input 'BRBRBRB' should output 'BRBBBRB'", "expected_accepted": true, "expected_output": "BRBBBRB", "input": "BRBRBRB" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BRBRRRBR'", "expected_accepted": true, "expected_output": "BRBRRRBR", "input": "BRBRBRBR" }, { "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 '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 'BRRRRRRRR' should output 'BRRRRBRRR'", "expected_accepted": true, "expected_output": "BRRRRBRRR", "input": "BRRRRRRRR" }, { "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 'BRBBRBBB'", "expected_accepted": true, "expected_output": "BRBBRBBB", "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 '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 'BBRBBBR'", "expected_accepted": true, "expected_output": "BBRBBBR", "input": "RBBRRBBR" } ]
manufactoria
medium
7644c2e4-4b1e-438e-9b94-b6a58da74b4d
numerical_operations
Numerical Bitwise Xor With 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 bitwise OR with 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 'RR' should output 'BRRRRRR'", "expected_accepted": true, "expected_output": "BRRRRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' should output 'BRRRRBR'", "expected_accepted": true, "expected_output": "BRRRRBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' should output 'BRRRBRB'", "expected_accepted": true, "expected_output": "BRRRBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'B' should output 'BRRRRRB'", "expected_accepted": true, "expected_output": "BRRRRRB", "input": "B" }, { "check_output": true, "description": "Input 'RBRB' should output 'BRRRBRB'", "expected_accepted": true, "expected_output": "BRRRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRRRRRR' should output 'BRRRRRR'", "expected_accepted": true, "expected_output": "BRRRRRR", "input": "BRRRRRR" }, { "check_output": true, "description": "Input 'BBBBBB' should output 'BBBBBBB'", "expected_accepted": true, "expected_output": "BBBBBBB", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BRRRRRB' should output 'BRRRRRB'", "expected_accepted": true, "expected_output": "BRRRRRB", "input": "BRRRRRB" }, { "check_output": true, "description": "Input 'BRBRBRB' should output 'BRBRBRB'", "expected_accepted": true, "expected_output": "BRBRBRB", "input": "BRBRBRB" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BBBRBRBR'", "expected_accepted": true, "expected_output": "BBBRBRBR", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BBBBBBBB'", "expected_accepted": true, "expected_output": "BBBBBBBB", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'BBBBBBB'", "expected_accepted": true, "expected_output": "BBBBBBB", "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 '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 'RBBRBRRBR' should output 'BBRBRRBR'", "expected_accepted": true, "expected_output": "BBRBRRBR", "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 'BRBRBRR'", "expected_accepted": true, "expected_output": "BRBRBRR", "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 'BBRBBRBR'", "expected_accepted": true, "expected_output": "BBRBBRBR", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBRRBBR' should output 'BBRRBBR'", "expected_accepted": true, "expected_output": "BBRRBBR", "input": "RBBRRBBR" } ]
manufactoria
medium
516210fd-1637-44bd-be80-21c852ea27a5
numerical_operations
Numerical Bitwise Or With 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 bitwise OR with 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 'BBR'", "expected_accepted": true, "expected_output": "BBR", "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 'B' should output 'BRB'", "expected_accepted": true, "expected_output": "BRB", "input": "B" }, { "check_output": true, "description": "Input 'RR' should output 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' should output 'BBR'", "expected_accepted": true, "expected_output": "BBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' should output 'BRB'", "expected_accepted": true, "expected_output": "BRB", "input": "BRB" }, { "check_output": true, "description": "Input 'RBRB' should output 'BRB'", "expected_accepted": true, "expected_output": "BRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRR' should output 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "BRR" }, { "check_output": true, "description": "Input 'BB' should output 'BBB'", "expected_accepted": true, "expected_output": "BBB", "input": "BB" }, { "check_output": true, "description": "Input 'BRBRBRB' should output 'BRBRBRB'", "expected_accepted": true, "expected_output": "BRBRBRB", "input": "BRBRBRB" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BRBRBBBR'", "expected_accepted": true, "expected_output": "BRBRBBBR", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BBBBBBBB'", "expected_accepted": true, "expected_output": "BBBBBBBB", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'BBBBBBB'", "expected_accepted": true, "expected_output": "BBBBBBB", "input": "BBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBB' should output 'BBBBBB'", "expected_accepted": true, "expected_output": "BBBBBB", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BBBBB' should output 'BBBBB'", "expected_accepted": true, "expected_output": "BBBBB", "input": "BBBBB" }, { "check_output": true, "description": "Input 'BBBB' should output 'BBBB'", "expected_accepted": true, "expected_output": "BBBB", "input": "BBBB" }, { "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 'BRRRRRRRR' should output 'BRRRRRBRR'", "expected_accepted": true, "expected_output": "BRRRRRBRR", "input": "BRRRRRRRR" }, { "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 'BRBBBBBB'", "expected_accepted": true, "expected_output": "BRBBBBBB", "input": "BRBBBBBB" }, { "check_output": true, "description": "Input 'RBRBRBRR' should output 'BRBRBRR'", "expected_accepted": true, "expected_output": "BRBRBRR", "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 'BBRRBBR'", "expected_accepted": true, "expected_output": "BBRRBBR", "input": "RBBRRBBR" } ]
manufactoria
medium
25d3e4bd-e9e3-40e2-aa24-c3d6702b81bc
numerical_operations
Numerical Bitwise Or With 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 bitwise AND with 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 '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 '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 'BRRRRR' should output 'BRRRRR'", "expected_accepted": true, "expected_output": "BRRRRR", "input": "BRRRRR" }, { "check_output": true, "description": "Input 'BBBBB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BBBBB" }, { "check_output": true, "description": "Input 'BRRRRB' should output 'BRRRRR'", "expected_accepted": true, "expected_output": "BRRRRR", "input": "BRRRRB" }, { "check_output": true, "description": "Input 'BRBRBRB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRBRBRB" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BRRRRR'", "expected_accepted": true, "expected_output": "BRRRRR", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BRRRRR'", "expected_accepted": true, "expected_output": "BRRRRR", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'BRRRRR'", "expected_accepted": true, "expected_output": "BRRRRR", "input": "BBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBB' should output 'BRRRRR'", "expected_accepted": true, "expected_output": "BRRRRR", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BBBB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BBBB" }, { "check_output": true, "description": "Input 'BRRRRRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRRRRRRRR" }, { "check_output": true, "description": "Input 'RBBRBRRBR' should output ''", "expected_accepted": true, "expected_output": "", "input": "RBBRBRRBR" }, { "check_output": true, "description": "Input 'BRBBBBBB' should output 'BRRRRR'", "expected_accepted": true, "expected_output": "BRRRRR", "input": "BRBBBBBB" }, { "check_output": true, "description": "Input 'RBRBRBRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "RBRBRBRR" }, { "check_output": true, "description": "Input 'BRBRBR' should output 'BRRRRR'", "expected_accepted": true, "expected_output": "BRRRRR", "input": "BRBRBR" }, { "check_output": true, "description": "Input 'BBRBBRBR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBRRBBR' should output 'BRRRRR'", "expected_accepted": true, "expected_output": "BRRRRR", "input": "RBBRRBBR" } ]
manufactoria
medium
d0d28419-3878-46c4-9fa3-84f1345b843c
numerical_operations
Numerical Bitwise And With 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 bitwise AND with 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 '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 'BRRR' should output 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "BRRR" }, { "check_output": true, "description": "Input 'BBB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BBB" }, { "check_output": true, "description": "Input 'BRRB' should output 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "BRRB" }, { "check_output": true, "description": "Input 'BRBRBRB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRBRBRB" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "BBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBB' should output 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BBBBB' should output 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "BBBBB" }, { "check_output": true, "description": "Input 'BBBB' should output 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "BBBB" }, { "check_output": true, "description": "Input 'BRRRRRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRRRRRRRR" }, { "check_output": true, "description": "Input 'RBBRBRRBR' should output ''", "expected_accepted": true, "expected_output": "", "input": "RBBRBRRBR" }, { "check_output": true, "description": "Input 'BRBBBBBB' should output 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "BRBBBBBB" }, { "check_output": true, "description": "Input 'RBRBRBRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "RBRBRBRR" }, { "check_output": true, "description": "Input 'BRBRBR' should output 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "BRBRBR" }, { "check_output": true, "description": "Input 'BBRBBRBR' should output 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBRRBBR' should output ''", "expected_accepted": true, "expected_output": "", "input": "RBBRRBBR" } ]
manufactoria
medium
36b4a09e-e5e9-43da-ad66-5276de1737ec
numerical_operations
Numerical Bitwise And With 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 bitwise OR with 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 '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 'BRRRRR' should output 'BRRRRR'", "expected_accepted": true, "expected_output": "BRRRRR", "input": "BRRRRR" }, { "check_output": true, "description": "Input 'BBBBB' should output 'BBBBBB'", "expected_accepted": true, "expected_output": "BBBBBB", "input": "BBBBB" }, { "check_output": true, "description": "Input 'BRRRRB' should output 'BRRRRB'", "expected_accepted": true, "expected_output": "BRRRRB", "input": "BRRRRB" }, { "check_output": true, "description": "Input 'BRBRBRB' should output 'BBBRBRB'", "expected_accepted": true, "expected_output": "BBBRBRB", "input": "BRBRBRB" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BRBRBRBR'", "expected_accepted": true, "expected_output": "BRBRBRBR", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BBBBBBBB'", "expected_accepted": true, "expected_output": "BBBBBBBB", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'BBBBBBB'", "expected_accepted": true, "expected_output": "BBBBBBB", "input": "BBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBB' should output 'BBBBBB'", "expected_accepted": true, "expected_output": "BBBBBB", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BBBB' should output 'BRBBBB'", "expected_accepted": true, "expected_output": "BRBBBB", "input": "BBBB" }, { "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 'BRRRRRRRR' should output 'BRRBRRRRR'", "expected_accepted": true, "expected_output": "BRRBRRRRR", "input": "BRRRRRRRR" }, { "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 'BRBBBBBB'", "expected_accepted": true, "expected_output": "BRBBBBBB", "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 'BRBRBR'", "expected_accepted": true, "expected_output": "BRBRBR", "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 'BBRRBBR'", "expected_accepted": true, "expected_output": "BBRRBBR", "input": "RBBRRBBR" } ]
manufactoria
medium
50495548-2a19-4522-8e42-2a390dc0e7e7
numerical_operations
Numerical Bitwise Or With 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 bitwise OR with 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 'B'", "expected_accepted": true, "expected_output": "B", "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 'B'", "expected_accepted": true, "expected_output": "B", "input": "RRB" }, { "check_output": true, "description": "Input 'B' should output 'B'", "expected_accepted": true, "expected_output": "B", "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 'BRB'", "expected_accepted": true, "expected_output": "BRB", "input": "BRB" }, { "check_output": true, "description": "Input 'RBRB' should output 'BRB'", "expected_accepted": true, "expected_output": "BRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRBRBRB' should output 'BRBRBRB'", "expected_accepted": true, "expected_output": "BRBRBRB", "input": "BRBRBRB" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BRBRBRBB'", "expected_accepted": true, "expected_output": "BRBRBRBB", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BBBBBBBB'", "expected_accepted": true, "expected_output": "BBBBBBBB", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'BBBBBBB'", "expected_accepted": true, "expected_output": "BBBBBBB", "input": "BBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBB' should output 'BBBBBB'", "expected_accepted": true, "expected_output": "BBBBBB", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BBBBB' should output 'BBBBB'", "expected_accepted": true, "expected_output": "BBBBB", "input": "BBBBB" }, { "check_output": true, "description": "Input 'BBBB' should output 'BBBB'", "expected_accepted": true, "expected_output": "BBBB", "input": "BBBB" }, { "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 'BRRRRRRRR' should output 'BRRRRRRRB'", "expected_accepted": true, "expected_output": "BRRRRRRRB", "input": "BRRRRRRRR" }, { "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 'BRBBBBBB'", "expected_accepted": true, "expected_output": "BRBBBBBB", "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
medium
01e4b175-6d5e-474a-b5f6-8901c97a5329
numerical_operations
Numerical Bitwise Or With 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 bitwise XOR with 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 'BR'", "expected_accepted": true, "expected_output": "BR", "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 'RR' should output 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' should output 'BBR'", "expected_accepted": true, "expected_output": "BBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BRB" }, { "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 'B'", "expected_accepted": true, "expected_output": "B", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRR" }, { "check_output": true, "description": "Input 'BRBRBRB' should output 'BRBRRRB'", "expected_accepted": true, "expected_output": "BRBRRRB", "input": "BRBRBRB" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BRBRBBBR'", "expected_accepted": true, "expected_output": "BRBRBBBR", "input": "BRBRBRBR" }, { "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 '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 'BRRRRRRRR' should output 'BRRRRRBRR'", "expected_accepted": true, "expected_output": "BRRRRRBRR", "input": "BRRRRRRRR" }, { "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 '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 '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 'BBRRRBR'", "expected_accepted": true, "expected_output": "BBRRRBR", "input": "RBBRRBBR" } ]
manufactoria
medium
ad554436-fbf5-45d6-a3f5-3c08a4b3bb2b
numerical_operations
Numerical Bitwise Xor With 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 bitwise AND with 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 '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 '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 'BRR'", "expected_accepted": true, "expected_output": "BRR", "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 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRR' should output 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "BRR" }, { "check_output": true, "description": "Input 'BB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BB" }, { "check_output": true, "description": "Input 'BRBRBRB' should output 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "BRBRBRB" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "BBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBB' should output 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BBBBB' should output 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "BBBBB" }, { "check_output": true, "description": "Input 'BBBB' should output 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "BBBB" }, { "check_output": true, "description": "Input 'BRRRRRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRRRRRRRR" }, { "check_output": true, "description": "Input 'RBBRBRRBR' should output ''", "expected_accepted": true, "expected_output": "", "input": "RBBRBRRBR" }, { "check_output": true, "description": "Input 'BRBBBBBB' should output 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "BRBBBBBB" }, { "check_output": true, "description": "Input 'RBRBRBRR' should output 'BRR'", "expected_accepted": true, "expected_output": "BRR", "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 ''", "expected_accepted": true, "expected_output": "", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBRRBBR' should output 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "RBBRRBBR" } ]
manufactoria
medium
7506706e-864e-4959-b686-94fa7e8bca11
numerical_operations
Numerical Bitwise And With 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 bitwise AND with 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 'B'", "expected_accepted": true, "expected_output": "B", "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 'B'", "expected_accepted": true, "expected_output": "B", "input": "RRB" }, { "check_output": true, "description": "Input 'B' should output 'B'", "expected_accepted": true, "expected_output": "B", "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 'B'", "expected_accepted": true, "expected_output": "B", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BB" }, { "check_output": true, "description": "Input 'RBRB' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRBRBRB' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BRBRBRB" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBB' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BBBBB' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BBBBB" }, { "check_output": true, "description": "Input 'BBBB' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BBBB" }, { "check_output": true, "description": "Input 'BRRRRRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRRRRRRRR" }, { "check_output": true, "description": "Input 'RBBRBRRBR' should output ''", "expected_accepted": true, "expected_output": "", "input": "RBBRBRRBR" }, { "check_output": true, "description": "Input 'BRBBBBBB' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BRBBBBBB" }, { "check_output": true, "description": "Input 'RBRBRBRR' should output ''", "expected_accepted": true, "expected_output": "", "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 ''", "expected_accepted": true, "expected_output": "", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBRRBBR' should output ''", "expected_accepted": true, "expected_output": "", "input": "RBBRRBBR" } ]
manufactoria
medium
f77f9ef1-e400-4c51-ab61-fa25a7cdfc59
numerical_operations
Numerical Bitwise And With 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 bitwise XOR with 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 'RR' should output 'BRRRRRR'", "expected_accepted": true, "expected_output": "BRRRRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' should output 'BRRRRBR'", "expected_accepted": true, "expected_output": "BRRRRBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' should output 'BRRRBRB'", "expected_accepted": true, "expected_output": "BRRRBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' should output 'BRRRRBB'", "expected_accepted": true, "expected_output": "BRRRRBB", "input": "BB" }, { "check_output": true, "description": "Input 'B' should output 'BRRRRRB'", "expected_accepted": true, "expected_output": "BRRRRRB", "input": "B" }, { "check_output": true, "description": "Input 'RBRB' should output 'BRRRBRB'", "expected_accepted": true, "expected_output": "BRRRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRRRRRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRRRRRR" }, { "check_output": true, "description": "Input 'BBBBBB' should output 'BBBBBBB'", "expected_accepted": true, "expected_output": "BBBBBBB", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BRRRRRB' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BRRRRRB" }, { "check_output": true, "description": "Input 'BRBRBRB' should output 'BRBRB'", "expected_accepted": true, "expected_output": "BRBRB", "input": "BRBRBRB" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BBBRBRBR'", "expected_accepted": true, "expected_output": "BBBRBRBR", "input": "BRBRBRBR" }, { "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 '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 '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 'RBBRBRRBR' should output 'BRRBRRBR'", "expected_accepted": true, "expected_output": "BRRBRRBR", "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 'BRBRR'", "expected_accepted": true, "expected_output": "BRBRR", "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 '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
medium
96a31def-4417-401d-ad35-6bfb55f0f075
numerical_operations
Numerical Bitwise Xor With 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 bitwise XOR with 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 ''", "expected_accepted": true, "expected_output": "", "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 ''", "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 '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 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "BRB" }, { "check_output": true, "description": "Input 'RBRB' should output 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRBRBRB' should output 'BRBRBRR'", "expected_accepted": true, "expected_output": "BRBRBRR", "input": "BRBRBRB" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BRBRBRBB'", "expected_accepted": true, "expected_output": "BRBRBRBB", "input": "BRBRBRBR" }, { "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 '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 'BRRRRRRRR' should output 'BRRRRRRRB'", "expected_accepted": true, "expected_output": "BRRRRRRRB", "input": "BRRRRRRRR" }, { "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 'BRBBBBBR'", "expected_accepted": true, "expected_output": "BRBBBBBR", "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
medium
7e9a3205-9475-4501-a7fc-4add517c9e3c
numerical_operations
Numerical Bitwise Xor With 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 bitwise AND with 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 '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 'BRRRRRR' should output 'BRRRRRR'", "expected_accepted": true, "expected_output": "BRRRRRR", "input": "BRRRRRR" }, { "check_output": true, "description": "Input 'BBBBBB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BRRRRRB' should output 'BRRRRRR'", "expected_accepted": true, "expected_output": "BRRRRRR", "input": "BRRRRRB" }, { "check_output": true, "description": "Input 'BRBRBRB' should output 'BRRRRRR'", "expected_accepted": true, "expected_output": "BRRRRRR", "input": "BRBRBRB" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BRRRRRR'", "expected_accepted": true, "expected_output": "BRRRRRR", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'BRRRRRR'", "expected_accepted": true, "expected_output": "BRRRRRR", "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 'BRRRRRRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRRRRRRRR" }, { "check_output": true, "description": "Input 'RBBRBRRBR' should output 'BRRRRRR'", "expected_accepted": true, "expected_output": "BRRRRRR", "input": "RBBRBRRBR" }, { "check_output": true, "description": "Input 'BRBBBBBB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRBBBBBB" }, { "check_output": true, "description": "Input 'RBRBRBRR' should output 'BRRRRRR'", "expected_accepted": true, "expected_output": "BRRRRRR", "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 'BRRRRRR'", "expected_accepted": true, "expected_output": "BRRRRRR", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBRRBBR' should output 'BRRRRRR'", "expected_accepted": true, "expected_output": "BRRRRRR", "input": "RBBRRBBR" } ]
manufactoria
medium
77ab8a45-1873-4d8c-8722-d59f8ead01fb
numerical_operations
Numerical Bitwise And With 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 bitwise AND with 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 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "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 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "BB" }, { "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 'BRBRBRB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRBRBRB" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "BBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBB' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BBBBB' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "BBBBB" }, { "check_output": true, "description": "Input 'BBBB' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "BBBB" }, { "check_output": true, "description": "Input 'BRRRRRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRRRRRRRR" }, { "check_output": true, "description": "Input 'RBBRBRRBR' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "RBBRBRRBR" }, { "check_output": true, "description": "Input 'BRBBBBBB' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "BRBBBBBB" }, { "check_output": true, "description": "Input 'RBRBRBRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "RBRBRBRR" }, { "check_output": true, "description": "Input 'BRBRBR' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "BRBRBR" }, { "check_output": true, "description": "Input 'BBRBBRBR' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBRRBBR' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "RBBRRBBR" } ]
manufactoria
medium
079fdabb-f7bb-4782-91cc-62cf1311049f
numerical_operations
Numerical Bitwise And With 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 bitwise XOR with 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 '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 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "RRB" }, { "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 ''", "expected_accepted": true, "expected_output": "", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' should output 'BBB'", "expected_accepted": true, "expected_output": "BBB", "input": "BRB" }, { "check_output": true, "description": "Input 'B' should output 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "B" }, { "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 'B'", "expected_accepted": true, "expected_output": "B", "input": "BB" }, { "check_output": true, "description": "Input 'BRBRBRB' should output 'BRBRBBB'", "expected_accepted": true, "expected_output": "BRBRBBB", "input": "BRBRBRB" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BRBRBRRR'", "expected_accepted": true, "expected_output": "BRBRBRRR", "input": "BRBRBRBR" }, { "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 '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 'BRRRRRRRR' should output 'BRRRRRRBR'", "expected_accepted": true, "expected_output": "BRRRRRRBR", "input": "BRRRRRRRR" }, { "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 'BRBRBBR'", "expected_accepted": true, "expected_output": "BRBRBBR", "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
medium
dc68745c-6630-4e1c-9960-00ca2e1d8df0
numerical_operations
Numerical Bitwise Xor With 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 bitwise OR with 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 'RBRB' should output 'BRBRB'", "expected_accepted": true, "expected_output": "BRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRRRR' should output 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "BRRRR" }, { "check_output": true, "description": "Input 'BBBB' should output 'BBBBB'", "expected_accepted": true, "expected_output": "BBBBB", "input": "BBBB" }, { "check_output": true, "description": "Input 'BRRRB' should output 'BRRRB'", "expected_accepted": true, "expected_output": "BRRRB", "input": "BRRRB" }, { "check_output": true, "description": "Input 'BRBRBRB' should output 'BRBRBRB'", "expected_accepted": true, "expected_output": "BRBRBRB", "input": "BRBRBRB" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BRBBBRBR'", "expected_accepted": true, "expected_output": "BRBBBRBR", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BBBBBBBB'", "expected_accepted": true, "expected_output": "BBBBBBBB", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'BBBBBBB'", "expected_accepted": true, "expected_output": "BBBBBBB", "input": "BBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBB' should output 'BBBBBB'", "expected_accepted": true, "expected_output": "BBBBBB", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BBBBB' should output 'BBBBB'", "expected_accepted": true, "expected_output": "BBBBB", "input": "BBBBB" }, { "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 'BRRRRRRRR' should output 'BRRRBRRRR'", "expected_accepted": true, "expected_output": "BRRRBRRRR", "input": "BRRRRRRRR" }, { "check_output": true, "description": "Input 'RBBRBRRBR' should output 'BBRBRRBR'", "expected_accepted": true, "expected_output": "BBRBRRBR", "input": "RBBRBRRBR" }, { "check_output": true, "description": "Input 'BRBBBBBB' should output 'BRBBBBBB'", "expected_accepted": true, "expected_output": "BRBBBBBB", "input": "BRBBBBBB" }, { "check_output": true, "description": "Input 'RBRBRBRR' should output 'BRBRBRR'", "expected_accepted": true, "expected_output": "BRBRBRR", "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 'BBRBBRBR'", "expected_accepted": true, "expected_output": "BBRBBRBR", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBRRBBR' should output 'BBBRBBR'", "expected_accepted": true, "expected_output": "BBBRBBR", "input": "RBBRRBBR" } ]
manufactoria
medium
f991557a-f1c1-4260-9529-4683a93eeecf
numerical_operations
Numerical Bitwise Or With 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 bitwise XOR with 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 'RR' should output 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "RR" }, { "check_output": true, "description": "Input 'BR' should output 'BRRBR'", "expected_accepted": true, "expected_output": "BRRBR", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' should output 'BRBRB'", "expected_accepted": true, "expected_output": "BRBRB", "input": "BRB" }, { "check_output": true, "description": "Input 'BB' should output 'BRRBB'", "expected_accepted": true, "expected_output": "BRRBB", "input": "BB" }, { "check_output": true, "description": "Input 'B' should output 'BRRRB'", "expected_accepted": true, "expected_output": "BRRRB", "input": "B" }, { "check_output": true, "description": "Input 'RBRB' should output 'BRBRB'", "expected_accepted": true, "expected_output": "BRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRRRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRRRR" }, { "check_output": true, "description": "Input 'BBBB' should output 'BBBBB'", "expected_accepted": true, "expected_output": "BBBBB", "input": "BBBB" }, { "check_output": true, "description": "Input 'BRRRB' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BRRRB" }, { "check_output": true, "description": "Input 'BRBRBRB' should output 'BRRRBRB'", "expected_accepted": true, "expected_output": "BRRRBRB", "input": "BRBRBRB" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BRBBBRBR'", "expected_accepted": true, "expected_output": "BRBBBRBR", "input": "BRBRBRBR" }, { "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 '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 'BRRRRRRRR' should output 'BRRRBRRRR'", "expected_accepted": true, "expected_output": "BRRRBRRRR", "input": "BRRRRRRRR" }, { "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 'BBBRBR'", "expected_accepted": true, "expected_output": "BBBRBR", "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 'BBBRBBR'", "expected_accepted": true, "expected_output": "BBBRBBR", "input": "RBBRRBBR" } ]
manufactoria
medium
4d7621fe-0eeb-41ac-b18b-ad257f69dc32
numerical_operations
Numerical Bitwise Xor With 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 bitwise AND with 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 '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 '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 'BRRRR' should output 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "BRRRR" }, { "check_output": true, "description": "Input 'BBBB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BBBB" }, { "check_output": true, "description": "Input 'BRRRB' should output 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "BRRRB" }, { "check_output": true, "description": "Input 'BRBRBRB' should output 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "BRBRBRB" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "BBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBB' should output 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BBBBB' should output 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "BBBBB" }, { "check_output": true, "description": "Input 'BRRRRRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRRRRRRRR" }, { "check_output": true, "description": "Input 'RBBRBRRBR' should output 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "RBBRBRRBR" }, { "check_output": true, "description": "Input 'BRBBBBBB' should output 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "BRBBBBBB" }, { "check_output": true, "description": "Input 'RBRBRBRR' should output 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "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 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBRRBBR' should output ''", "expected_accepted": true, "expected_output": "", "input": "RBBRRBBR" } ]
manufactoria
medium
20e6ce70-ed02-41ce-870e-1bec0d84f8ff
numerical_operations
Numerical Bitwise And With 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 bitwise XOR with 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 'B' should output 'BRRRRB'", "expected_accepted": true, "expected_output": "BRRRRB", "input": "B" }, { "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 'RBRB' should output 'BRRBRB'", "expected_accepted": true, "expected_output": "BRRBRB", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRRRRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRRRRR" }, { "check_output": true, "description": "Input 'BBBBB' should output 'BBBBBB'", "expected_accepted": true, "expected_output": "BBBBBB", "input": "BBBBB" }, { "check_output": true, "description": "Input 'BRRRRB' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BRRRRB" }, { "check_output": true, "description": "Input 'BRBRBRB' should output 'BBBRBRB'", "expected_accepted": true, "expected_output": "BBBRBRB", "input": "BRBRBRB" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BRRRBRBR'", "expected_accepted": true, "expected_output": "BRRRBRBR", "input": "BRBRBRBR" }, { "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 'BRBBBB'", "expected_accepted": true, "expected_output": "BRBBBB", "input": "BBBB" }, { "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 'BRRRRRRRR' should output 'BRRBRRRRR'", "expected_accepted": true, "expected_output": "BRRBRRRRR", "input": "BRRRRRRRR" }, { "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 'BRRBBBBB'", "expected_accepted": true, "expected_output": "BRRBBBBB", "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 'BRBR'", "expected_accepted": true, "expected_output": "BRBR", "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 'BRRRBBR'", "expected_accepted": true, "expected_output": "BRRRBBR", "input": "RBBRRBBR" } ]
manufactoria
medium
29b70d2f-94d0-453f-b3a7-a67ef167a25f
numerical_operations
Numerical Bitwise Xor With 32
README.md exists but content is empty.
Downloads last month
24