Dataset Viewer
Auto-converted to Parquet
messages
listlengths
1
1
ground_truth
listlengths
27
31
dataset
stringclasses
1 value
difficulty
stringclasses
1 value
id
stringclasses
7 values
problem_family
stringclasses
1 value
name
stringclasses
7 values
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape 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 floor division by 2^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 'B'", "expected_accepted": true, "expected_output": "B", "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 'B'", "expected_accepted": true, "expected_output": "B", "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 'B'", "expected_accepted": true, "expected_output": "B", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRR' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BRR" }, { "check_output": true, "description": "Input 'BRRR' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "BRRR" }, { "check_output": true, "description": "Input 'BBRR' should output 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "BBRR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BBBBBB'", "expected_accepted": true, "expected_output": "BBBBBB", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'BBBBB'", "expected_accepted": true, "expected_output": "BBBBB", "input": "BBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBB' should output 'BBBB'", "expected_accepted": true, "expected_output": "BBBB", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BBBBB' should output 'BBB'", "expected_accepted": true, "expected_output": "BBB", "input": "BBBBB" }, { "check_output": true, "description": "Input 'BBBB' should output 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "BBBB" }, { "check_output": true, "description": "Input 'BRRRRRR' should output 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "BRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRR' should output 'BRRRRR'", "expected_accepted": true, "expected_output": "BRRRRR", "input": "BRRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRRR' should output 'BRRRRRR'", "expected_accepted": true, "expected_output": "BRRRRRR", "input": "BRRRRRRRR" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BRBRBR'", "expected_accepted": true, "expected_output": "BRBRBR", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'RBBRBRRBR' should output 'BBRBRR'", "expected_accepted": true, "expected_output": "BBRBRR", "input": "RBBRBRRBR" }, { "check_output": true, "description": "Input 'BRBBBBBB' should output 'BRBBBB'", "expected_accepted": true, "expected_output": "BRBBBB", "input": "BRBBBBBB" }, { "check_output": true, "description": "Input 'RBRBRBRR' should output 'BRBRB'", "expected_accepted": true, "expected_output": "BRBRB", "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 'BBRBBR'", "expected_accepted": true, "expected_output": "BBRBBR", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBRRBBR' should output 'BBRRB'", "expected_accepted": true, "expected_output": "BBRRB", "input": "RBBRRBBR" } ]
manufactoria
easy
70cd720c-367d-4572-a371-70d3de1dc5c8
numerical_operations
Numerical Floor Division By 2^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 floor division by 2^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 ''", "expected_accepted": true, "expected_output": "", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' should output ''", "expected_accepted": true, "expected_output": "", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' should output ''", "expected_accepted": true, "expected_output": "", "input": "RRB" }, { "check_output": true, "description": "Input 'RR' should output ''", "expected_accepted": true, "expected_output": "", "input": "RR" }, { "check_output": true, "description": "Input 'BR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRB" }, { "check_output": true, "description": "Input '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 'BBBB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BBBB" }, { "check_output": true, "description": "Input 'BRRRR' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BRRRR" }, { "check_output": true, "description": "Input 'BRRRB' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BRRRB" }, { "check_output": true, "description": "Input 'BRRRRR' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "BRRRRR" }, { "check_output": true, "description": "Input 'BBRRRR' should output 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "BBRRRR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BBBB'", "expected_accepted": true, "expected_output": "BBBB", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'BBB'", "expected_accepted": true, "expected_output": "BBB", "input": "BBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBB' should output 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BBBBB' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BBBBB" }, { "check_output": true, "description": "Input 'BRRRRRR' should output 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "BRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRR' should output 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "BRRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRRR' should output 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "BRRRRRRRR" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BRBR'", "expected_accepted": true, "expected_output": "BRBR", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'RBBRBRRBR' should output 'BBRB'", "expected_accepted": true, "expected_output": "BBRB", "input": "RBBRBRRBR" }, { "check_output": true, "description": "Input 'BRBBBBBB' should output 'BRBB'", "expected_accepted": true, "expected_output": "BRBB", "input": "BRBBBBBB" }, { "check_output": true, "description": "Input 'RBRBRBRR' should output 'BRB'", "expected_accepted": true, "expected_output": "BRB", "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 'BBRB'", "expected_accepted": true, "expected_output": "BBRB", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBRRBBR' should output 'BBR'", "expected_accepted": true, "expected_output": "BBR", "input": "RBBRRBBR" } ]
manufactoria
easy
a3dff1fb-d883-4223-bd6e-42533745c271
numerical_operations
Numerical Floor Division By 2^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 floor division by 2^5 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 'BBBBB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BBBBB" }, { "check_output": true, "description": "Input 'BRRRRR' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BRRRRR" }, { "check_output": true, "description": "Input 'BRRRRB' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BRRRRB" }, { "check_output": true, "description": "Input 'BRRRRRR' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "BRRRRRR" }, { "check_output": true, "description": "Input 'BBRRRRR' should output 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "BBRRRRR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BBB'", "expected_accepted": true, "expected_output": "BBB", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "BBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBB' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BBBB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BBBB" }, { "check_output": true, "description": "Input 'BRRRRRRR' should output 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "BRRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRRR' should output 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "BRRRRRRRR" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BRB'", "expected_accepted": true, "expected_output": "BRB", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'RBBRBRRBR' should output 'BBR'", "expected_accepted": true, "expected_output": "BBR", "input": "RBBRBRRBR" }, { "check_output": true, "description": "Input 'BRBBBBBB' should output 'BRB'", "expected_accepted": true, "expected_output": "BRB", "input": "BRBBBBBB" }, { "check_output": true, "description": "Input 'RBRBRBRR' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "RBRBRBRR" }, { "check_output": true, "description": "Input 'BRBRBR' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BRBRBR" }, { "check_output": true, "description": "Input 'BBRBBRBR' should output 'BBR'", "expected_accepted": true, "expected_output": "BBR", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBRRBBR' should output 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "RBBRRBBR" } ]
manufactoria
easy
7bd92b48-100f-4711-97d6-449561c277dd
numerical_operations
Numerical Floor Division By 2^5
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape 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 floor division by 2^3 to the binary number and output the result. If the result is zero or negative, output an empty tape. If the result is positive, output the binary representation (which will start with B). The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' should output ''", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": true, "description": "Input 'R' should output ''", "expected_accepted": true, "expected_output": "", "input": "R" }, { "check_output": true, "description": "Input 'RB' should output ''", "expected_accepted": true, "expected_output": "", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' should output ''", "expected_accepted": true, "expected_output": "", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' should output ''", "expected_accepted": true, "expected_output": "", "input": "RRB" }, { "check_output": true, "description": "Input 'B' should output ''", "expected_accepted": true, "expected_output": "", "input": "B" }, { "check_output": true, "description": "Input 'RR' should output ''", "expected_accepted": true, "expected_output": "", "input": "RR" }, { "check_output": true, "description": "Input 'BR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRB" }, { "check_output": true, "description": "Input 'RBRB' should output ''", "expected_accepted": true, "expected_output": "", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BBB" }, { "check_output": true, "description": "Input 'BRRR' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BRRR" }, { "check_output": true, "description": "Input 'BRRB' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BRRB" }, { "check_output": true, "description": "Input 'BRRRR' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "BRRRR" }, { "check_output": true, "description": "Input 'BBRRR' should output 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "BBRRR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BBBBB'", "expected_accepted": true, "expected_output": "BBBBB", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'BBBB'", "expected_accepted": true, "expected_output": "BBBB", "input": "BBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBB' should output 'BBB'", "expected_accepted": true, "expected_output": "BBB", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BBBBB' should output 'BB'", "expected_accepted": true, "expected_output": "BB", "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 'BRRR'", "expected_accepted": true, "expected_output": "BRRR", "input": "BRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRR' should output 'BRRRR'", "expected_accepted": true, "expected_output": "BRRRR", "input": "BRRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRRR' should output 'BRRRRR'", "expected_accepted": true, "expected_output": "BRRRRR", "input": "BRRRRRRRR" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BRBRB'", "expected_accepted": true, "expected_output": "BRBRB", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'RBBRBRRBR' should output 'BBRBR'", "expected_accepted": true, "expected_output": "BBRBR", "input": "RBBRBRRBR" }, { "check_output": true, "description": "Input 'BRBBBBBB' should output 'BRBBB'", "expected_accepted": true, "expected_output": "BRBBB", "input": "BRBBBBBB" }, { "check_output": true, "description": "Input 'RBRBRBRR' should output 'BRBR'", "expected_accepted": true, "expected_output": "BRBR", "input": "RBRBRBRR" }, { "check_output": true, "description": "Input 'BRBRBR' should output 'BRB'", "expected_accepted": true, "expected_output": "BRB", "input": "BRBRBR" }, { "check_output": true, "description": "Input 'BBRBBRBR' should output 'BBRBB'", "expected_accepted": true, "expected_output": "BBRBB", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBRRBBR' should output 'BBRR'", "expected_accepted": true, "expected_output": "BBRR", "input": "RBBRRBBR" } ]
manufactoria
easy
83ee2bd6-a4e4-4cda-8ff1-deff8726dd34
numerical_operations
Numerical Floor Division By 2^3
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape 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 floor division by 2^7 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 'BBBBBBB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BBBBBBB" }, { "check_output": true, "description": "Input 'BRRRRRRR' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BRRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRB' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BRRRRRRB" }, { "check_output": true, "description": "Input 'BRRRRRRRR' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "BRRRRRRRR" }, { "check_output": true, "description": "Input 'BBRRRRRRR' should output 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "BBRRRRRRR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BBBBBB" }, { "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 'BRRRRRR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRRRRRR" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'RBBRBRRBR' should output 'B'", "expected_accepted": true, "expected_output": "B", "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 'B'", "expected_accepted": true, "expected_output": "B", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBRRBBR' should output ''", "expected_accepted": true, "expected_output": "", "input": "RBBRRBBR" } ]
manufactoria
easy
f75609e7-066a-41c2-b18a-c08b7591e6fb
numerical_operations
Numerical Floor Division By 2^7
[ { "content": "# Manufactoria Solution DSL\n\nA Domain Specific Language for describing Manufactoria puzzle solutions in text format.\n\n## Overview\n\nManufactoria is a puzzle game where you build automated factories to sort robots based on their colored tape patterns. Robots enter your factory carrying sequences of colored tape, and you must route them to the correct destinations based on the given criteria.\n\n## Game Mechanics\n\n### Robots and Tape\n- **Robots**: Each robot carries a sequence of colored tapes\n- **Tape Colors**: Primary colors are Blue (B) and Red (R), with additional Yellow (Y) and Green (G) for advanced puzzles\n- **Tape Representation**: Sequences are represented as strings (e.g., `RBRR`, `BBR`, or empty string `\"\"`)\n\n### Operations\n- **Pull**: Remove tape from the front of the robot's sequence\n- **Paint**: Add colored tape 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 floor division by 2^1 to the binary number and output the result. If the result is zero or negative, output an empty tape. If the result is positive, output the binary representation (which will start with B). The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' should output ''", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": true, "description": "Input 'R' should output ''", "expected_accepted": true, "expected_output": "", "input": "R" }, { "check_output": true, "description": "Input 'RB' should output ''", "expected_accepted": true, "expected_output": "", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' should output 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' should output ''", "expected_accepted": true, "expected_output": "", "input": "RRB" }, { "check_output": true, "description": "Input 'B' should output ''", "expected_accepted": true, "expected_output": "", "input": "B" }, { "check_output": true, "description": "Input 'RR' should output ''", "expected_accepted": true, "expected_output": "", "input": "RR" }, { "check_output": true, "description": "Input 'BR' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BR" }, { "check_output": true, "description": "Input 'BRB' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "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 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "RBRB" }, { "check_output": true, "description": "Input 'BRR' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "BRR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BBBBBBB'", "expected_accepted": true, "expected_output": "BBBBBBB", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'BBBBBB'", "expected_accepted": true, "expected_output": "BBBBBB", "input": "BBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBB' should output 'BBBBB'", "expected_accepted": true, "expected_output": "BBBBB", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BBBBB' should output 'BBBB'", "expected_accepted": true, "expected_output": "BBBB", "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 'BRRRRR'", "expected_accepted": true, "expected_output": "BRRRRR", "input": "BRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRR' should output 'BRRRRRR'", "expected_accepted": true, "expected_output": "BRRRRRR", "input": "BRRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRRRR' should output 'BRRRRRRR'", "expected_accepted": true, "expected_output": "BRRRRRRR", "input": "BRRRRRRRR" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BRBRBRB'", "expected_accepted": true, "expected_output": "BRBRBRB", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'RBBRBRRBR' should output 'BBRBRRB'", "expected_accepted": true, "expected_output": "BBRBRRB", "input": "RBBRBRRBR" }, { "check_output": true, "description": "Input 'BRBBBBBB' should output 'BRBBBBB'", "expected_accepted": true, "expected_output": "BRBBBBB", "input": "BRBBBBBB" }, { "check_output": true, "description": "Input 'RBRBRBRR' should output 'BRBRBR'", "expected_accepted": true, "expected_output": "BRBRBR", "input": "RBRBRBRR" }, { "check_output": true, "description": "Input 'BRBRBR' should output 'BRBRB'", "expected_accepted": true, "expected_output": "BRBRB", "input": "BRBRBR" }, { "check_output": true, "description": "Input 'BBRBBRBR' should output 'BBRBBRB'", "expected_accepted": true, "expected_output": "BBRBBRB", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBRRBBR' should output 'BBRRBB'", "expected_accepted": true, "expected_output": "BBRRBB", "input": "RBBRRBBR" } ]
manufactoria
easy
c1442ee2-9179-4fbf-a979-162621a7a1f8
numerical_operations
Numerical Floor Division By 2^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 floor division by 2^6 to the binary number and output the result. If the result is zero or negative, output an empty tape. If the result is positive, output the binary representation (which will start with B). The input tape carries only red/blue colors.", "role": "user" } ]
[ { "check_output": true, "description": "Input '' should output ''", "expected_accepted": true, "expected_output": "", "input": "" }, { "check_output": true, "description": "Input 'R' should output ''", "expected_accepted": true, "expected_output": "", "input": "R" }, { "check_output": true, "description": "Input 'RB' should output ''", "expected_accepted": true, "expected_output": "", "input": "RB" }, { "check_output": true, "description": "Input 'BBR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BBR" }, { "check_output": true, "description": "Input 'RBR' should output ''", "expected_accepted": true, "expected_output": "", "input": "RBR" }, { "check_output": true, "description": "Input 'RRB' should output ''", "expected_accepted": true, "expected_output": "", "input": "RRB" }, { "check_output": true, "description": "Input 'B' should output ''", "expected_accepted": true, "expected_output": "", "input": "B" }, { "check_output": true, "description": "Input 'BRB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BRB" }, { "check_output": true, "description": "Input 'BR' should output ''", "expected_accepted": true, "expected_output": "", "input": "BR" }, { "check_output": true, "description": "Input 'RBRB' should output ''", "expected_accepted": true, "expected_output": "", "input": "RBRB" }, { "check_output": true, "description": "Input 'BBBBBB' should output ''", "expected_accepted": true, "expected_output": "", "input": "BBBBBB" }, { "check_output": true, "description": "Input 'BRRRRRR' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BRRRRRR" }, { "check_output": true, "description": "Input 'BRRRRRB' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "BRRRRRB" }, { "check_output": true, "description": "Input 'BRRRRRRR' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "BRRRRRRR" }, { "check_output": true, "description": "Input 'BBRRRRRR' should output 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "BBRRRRRR" }, { "check_output": true, "description": "Input 'BBBBBBBB' should output 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "BBBBBBBB" }, { "check_output": true, "description": "Input 'BBBBBBB' should output 'B'", "expected_accepted": true, "expected_output": "B", "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 'BRRRRRRRR' should output 'BRR'", "expected_accepted": true, "expected_output": "BRR", "input": "BRRRRRRRR" }, { "check_output": true, "description": "Input 'BRBRBRBR' should output 'BR'", "expected_accepted": true, "expected_output": "BR", "input": "BRBRBRBR" }, { "check_output": true, "description": "Input 'RBBRBRRBR' should output 'BB'", "expected_accepted": true, "expected_output": "BB", "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 'B'", "expected_accepted": true, "expected_output": "B", "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 'BB'", "expected_accepted": true, "expected_output": "BB", "input": "BBRBBRBR" }, { "check_output": true, "description": "Input 'RBBRRBBR' should output 'B'", "expected_accepted": true, "expected_output": "B", "input": "RBBRRBBR" } ]
manufactoria
easy
8143901a-59af-4fd5-8399-27dd0a99101c
numerical_operations
Numerical Floor Division By 2^6
README.md exists but content is empty.
Downloads last month
14