Serving Robot

Program

    How to play & rules

    You give a serving robot a list of commands so that it brings each customer the plates they ordered. Build the program, press “Play”, and the robot carries out the commands in order. There are 28 stages in 5 chapters, and new commands appear as you go: repeat, if, while and the memo.

    How to clear a stage

    How a turn goes

    1. Press command buttons to add commands to your program.
    2. Press “Play” to run the robot. “Step” runs one command, “Step back” goes back one, and “Restart” puts the robot back at the start (your program stays).
    3. If it fails, fix the command shown in red and press “Play” again. “Details” shows the speed setting and a detailed result.

    What the commands do

    Forward
    Moves one cell in the direction the robot faces. If a wall, table, the kitchen or the edge of the shop is in front, it can’t move and the run fails.
    Turn right · Turn left
    Turns on the spot. Right and left are from the robot’s point of view. Example: facing east (→), “Turn right” makes it face south (↓). The current direction is shown above the board as “Facing”.
    Serve
    Gives one plate to the customer in front (the next cell in the direction the robot faces).
    Repeat (a set number of times)
    Repeats the commands inside the frame a set number of times (1 to 9; change it with − and +). Example: “Repeat 3 times [Forward]” moves exactly like three Forward commands, but uses only 2 blocks.
    If
    Checks a condition once. If it holds, the robot runs the “then” side; otherwise it runs the “else” side. Example: “If customer on right then [Turn right, Serve, Turn left]” serves only on the days when someone sits on the right.
    While
    Repeats the commands inside the frame as long as the condition holds, then moves on. If the condition is false from the start, the inside is skipped. Example: “Repeat while path ahead [Forward]” walks to the end of the aisle whatever its length. A loop whose condition never changes is stopped after 300 steps.
    Conditions
    “path ahead / on right / on left” asks whether the next cell in that direction is free floor the robot can walk on. “customer ahead / on right / on left” asks whether a customer whose order is not yet complete sits in the next cell in that direction.
    Note order · Add to memo
    Writes the order of the customer in front on the memo. “Add to memo” adds it to the number already there. The memo is shown above the board.
    Pick up
    Picks up as many plates as the memo says from the kitchen in front. You can do this only once per run, and not while the memo is 0.
    Repeat memo times
    Repeats the commands inside as many times as the memo says. The count is fixed when the frame starts. Example: with 3 on the memo, “Repeat memo times [Serve]” serves 3 plates.

    The block limit

    Each stage limits how many blocks you can use (shown as “Program 3/8 blocks”). A frame and each command inside it count as one block each; the “Else” divider, repeat counts and conditions don’t count. When writing the same commands out one by one would go over the limit, a repeat will make it fit.

    Editing your program

    Other notes

    Controls

    Click or tap command buttons to build your program, then press “Play” to run it. Tap a command in the program to change, move, copy or delete it. Choose “Move”, then “Move here” to move it into or out of a frame.

    Use “Step” to run one command and “Step back” to go back one. “Restart” returns the robot to the start and keeps your program. Use “Undo” to undo an edit and “Redo” to restore it.

    On a keyboard, Tab moves between controls, Enter presses them, and Esc closes open actions. Ctrl/⌘+Z undoes an edit; Ctrl/⌘+Y or Shift+Ctrl/⌘+Z redoes it.

    For commands and clear conditions, see How to play & rules. For tips and FAQ, see the guide below.

    Report a bug

    Only the site operators can read your report. It will not appear in public comments.

    Do not include your name, school, address, contact details, or links. The game version and browser type are attached automatically. Privacy

    Views—Ratings—Comments—

    Feel free to stream or share gameplay, including monetized content. Streaming and sharing guidelines

    ver 0.9.0 · Updated

    Release notes
    1. · ver 0.9.0First published.

    Rate this game

    How was the game? Choose a button to rate it.

    Comments

    Write a comment

    Do not include real names, schools, addresses or contact details.
    Links and inappropriate language are not allowed. Comments and replies are public and may be removed.

    Comment rules

      Serving Robot: how to play, rules and tips

      Serving Robot is a step-by-step command puzzle. A small robot waiter works in a shop full of tables, and your job is to tell it exactly what to do. You don’t steer the robot directly. Instead you build a short program from command blocks such as Forward, Turn right and Serve, press Play, and watch the robot carry the plan out one block at a time. If every customer receives the plates they ordered and the robot finishes with empty hands, the stage is cleared.

      There are 28 stages in 5 chapters. The first stages need only a few blocks, and each chapter adds one new idea: repeating a group of commands, choosing with “If”, looping with “While”, and remembering a number with the memo. Everything runs in your browser, there is nothing to install, and your progress is saved automatically on your device.

      How to play Serving Robot

      A small shop seen from above: dark walls, a light aisle, the robot facing east with 1 plate, a customer table with the tag 0/1, and the kitchen on the left.
      Reading the board. The tag above a customer shows plates served / plates ordered.
      1. Read the goal. Under the stage name you see a one-line request, such as “The seat just ahead has ordered 1 plate.” Above the board you see how many plates the robot is holding and which way it faces.
      2. Add commands. Press the command buttons under the board. Each press adds one block to your program, at the end or after the block you selected.
      3. Press Play. The robot runs your blocks from top to bottom. The block being run is highlighted, so you can follow along. “Step” runs one block at a time, and “Step back” rewinds one block.
      4. Read the result. On success you see “Stage cleared” in the result area and a “Cleared” badge just above the board. On failure you see a short reason. If a block caused it, for example a Forward that bumps into a wall, that block turns red. If the program simply ended too early, with someone still waiting or plates left in hand, no block turns red: the result tells you what was missing.
      5. Fix and try again. Your program is kept after a failure. Fix the red block if there is one; otherwise add the missing blocks or rethink the route, then press Play again. “Restart” puts the robot back at the start without touching your program.

      Serving Robot rules

      A stage is cleared when all of the following are true at the moment the program ends:

      • Every customer has received exactly the number of plates they ordered.
      • The robot holds no plates.
      • The program ran to the end without an error.

      Serving everyone halfway through is not enough: the robot always runs the rest of the program, and a later block can still cause a failure. These situations stop the run with a failure:

      What happenedWhy it fails
      Bumped into a wall, a table or the kitchenForward only works when the next cell is aisle
      Served with no customer in frontServe hands a plate to the next cell the robot faces
      Served with no plates in handThe robot can only give what it carries
      Served more than was orderedCustomers want exactly their order
      Ended with someone still waitingEvery order must be complete
      Ended with plates still in handThe robot must finish empty-handed
      A loop ran 300 stepsThe program probably never ends

      Examples. From chapter 3 on, many stages show two or three examples above the board, for instance “Seat above” and “Seat below”. The layout or the orders change between examples, but you write one program for all of them. A stage counts as cleared only when the same program succeeds on every example. “Check all examples” runs them all at once and lists the result for each.

      All commands

      CommandWhat it does
      ForwardMoves one cell in the direction the robot faces.
      Turn right / Turn leftTurns 90 degrees on the spot, from the robot’s point of view.
      ServeGives one plate to the customer in the next cell ahead.
      Repeat (number) timesRuns the blocks inside the frame a set number of times, 1 to 9.
      If … then / ElseChecks a condition once and runs one of its two sides.
      Repeat while …Runs the blocks inside again and again while a condition holds.
      Note orderWrites the order of the customer in front on the memo.
      Add to memoAdds the order of the customer in front to the memo.
      Pick upTakes as many plates as the memo says from the kitchen in front.
      Repeat memo timesRuns the blocks inside as many times as the memo says.

      Right and left belong to the robot. The most common mistake is to turn the way that looks right on the screen. If the robot faces south (down the screen), “Turn right” makes it face west, which is to the left of the screen. When in doubt, look at the “Facing” arrow above the board, or press Step and watch the turn.

      Conditions

      “If” and “While” ask a yes-or-no question about the cell next to the robot. You pick the question from a menu inside the block. Each stage offers only the conditions it needs.

      ConditionIt is true when…
      path ahead / on right / on leftthe next cell in that direction is aisle the robot could walk onto
      waiting customer ahead / on right / on lefta customer whose order is not yet complete sits in the next cell in that direction

      A customer who has received everything no longer counts as waiting, even though they are still sitting there. So “waiting customer ahead” turns false as soon as the last plate is served. That detail makes it a handy test for “does this table still need a plate?”, and “Repeat while waiting customer ahead [Serve]” serves exactly the ordered number of plates.

      Loops: Repeat and While

      Five Forward blocks and a Serve block on the left equal a Repeat 5 times frame holding one Forward, followed by Serve, on the right.
      The same moves, written out and with Repeat.

      Repeat is the first loop you meet, in chapter 2. Put one or more blocks inside the frame and set the count with − and +. The frame and each block inside count toward the block limit, but the count itself is free. So “Repeat 5 times [Forward]” is only 2 blocks, where writing Forward five times would be 5. The real power shows when you repeat a group: “Forward, Forward, Turn right, Serve, Turn left” repeated 3 times serves three tables in a row with just 6 blocks.

      You can place a frame inside another frame (two levels deep), for example a Repeat inside a Repeat. Stage 11 is built around that idea.

      While arrives in chapter 4. Instead of a fixed count, it checks its condition before every round. When the condition is true it runs the inside and checks again. When it is false it moves on to the next block. If the condition is false the very first time, the inside is skipped completely. This is what you need when the aisle is 3 cells long on one day and 5 on another: “Repeat while path ahead [Forward]” always stops just in front of the far end.

      Every action, condition check and loop check uses one step. If the condition of a While never changes, for example a While with nothing inside, the robot stops after 300 steps and the frame is marked so you can fix it.

      Choosing with If

      Flow chart. If checks once whether a waiting customer is on the right: true goes to the then side, false to the else side, then both continue. While checks before every round: true runs Forward and checks again, false leaves the loop.
      If decides once; While keeps asking.

      If appears in chapter 3, where the examples start to differ. The block has two sides: the “then” side runs when the condition is true, the “Else” side when it is false. Either side may be empty. A typical use: “If waiting customer on right then [Turn right, Serve, Turn left] Else [Turn left, Serve, Turn right]” serves whichever side the customer sits on and turns back to face along the aisle.

      If checks its condition only once, when the robot reaches it. Put an If inside a Repeat or a While when you need to make the same choice at every table along an aisle.

      The memo and the kitchen

      In chapter 5 the robot starts with no plates. It has to find out how many plates are needed, fetch them from the kitchen, and then serve. The memo is a single number shown above the board.

      • Note order reads the order of the customer the robot faces and writes it on the memo.
      • Add to memo adds that customer’s order to the number already there, so you can total two tables.
      • Pick up must be used while facing the kitchen. It takes as many plates as the memo says. You may use the kitchen only once per run, and not while the memo is 0.
      • Repeat memo times runs its inside as many times as the memo says. The count is fixed when the frame starts, so “Repeat memo times [Serve]” serves exactly the ordered number of plates.

      Because the kitchen can be used only once, a stage with two tables needs you to add both orders before you go to the kitchen. Remember to read an order again before serving if the memo now holds a total.

      The block limit

      Every stage limits how many blocks your program may use. The count is shown above your program, for example “Program 6/8 blocks”. A frame counts as one block and every block inside it counts as one more. The “Else” divider, repeat counts and conditions are not counted. Several stages are designed so that writing everything out would go over the limit: that is your hint to look for a pattern you can repeat.

      Chapters at a glance

      ChapterStagesNew idea
      1 Basics1–6Forward, turning and serving
      2 Repeat7–12Repeating a group a set number of times
      3 If13–18Choosing between two sides
      4 While19–23Looping until a condition changes
      5 Memo24–28Reading orders, the kitchen and totals

      Serving Robot strategy and tips

      • Walk it in your head first. Before adding blocks, trace the route with your finger: how many cells, where it turns, which side the customer sits on.
      • Use Step generously. Running one block at a time shows exactly where the plan goes wrong, and the current block is highlighted in the program.
      • Find the repeating unit. When tables are evenly spaced, write the moves for one table, including turning back to face along the aisle, then wrap them in Repeat.
      • Turn back after serving. Most loop bugs come from serving and forgetting to face the aisle again, so the next round walks into a wall.
      • Test every example. A program that clears one example may fail another. “Check all examples” finds out in one press.
      • Prefer conditions over counts when lengths change. If the number of cells differs between examples, a While is usually the answer.
      • Edit instead of starting over. Tap a block to move it up or down, move it into or out of a frame with “Move”, swap it with “Change to”, copy or delete it. Use Undo (Ctrl+Z) and Redo (Ctrl+Y) freely.

      Serving Robot FAQ

      Do I need an account or a download?

      No. The game runs in your browser. Your programs and cleared stages are saved automatically in this browser on this device.

      Why is no block red after a failure?

      Only a failure caused by a block, such as bumping into a wall or serving with empty hands, marks that block in red. When the program ends with a customer still waiting or plates left in hand, nothing went wrong in a single block; the program was just not finished. Read the result, which tells you who is still waiting or how many plates are left, and add the missing blocks or change the route.

      Why did the robot fail even though everyone got their plates?

      Check whether the robot still holds plates at the end, or whether a later block caused an error. The program must finish without errors and with empty hands.

      What is the difference between Step back, Restart and Undo?

      Step back and Restart move the robot only: one block back, or all the way to the start. Undo changes your program, taking back your last edit. Your program is never deleted by a failed run.

      Can I change a block after adding it?

      Yes. Tap it in the program to see its actions. Repeat counts are changed with − and +, and conditions with the menu inside the block.

      Is there a hint if I get stuck?

      Under “More” you can insert a sample answer. It is one possible solution; shorter ones may exist. Your previous program can be restored with Undo.

      Does it work on phones?

      Yes. On a phone the board, command buttons, program and Play button sit one above another, and all controls can be tapped. A keyboard works too: Tab moves between controls, Enter presses them and Esc closes panels.

      Why does a stage show several examples?

      Examples teach you to write general programs. When the seats or the aisle length change between examples, a program that only memorises one layout will fail, while one that uses conditions and loops will clear them all.