Game Description:

PaperBugs is a puzzle where you control bugs on a grid by writing a simple program. Each bug executes the same program step-by-step to reach their targets. The key challenge is that ALL bugs run the SAME program simultaneously!

Puzzle:

Available instructions:

  • MOVE - move forward one cell
  • LEFT / RIGHT - rotate 90 degrees
  • IF FLOWER - execute next line only if flower ahead
  • IF EMPTY - execute next line only if path clear
  • IF WALL - execute next line only if wall ahead
  • IF GEM - execute next line only if gem ahead

Board:

Legend:

  • Flower (blocks movement)
  • Gem (collectable)
  • Wall (blocks movement)

Goal:

Write a single program that guides both bugs to collect gems and reach their targets safely.

  • blueberry@feddit.orgOPM
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    2 months ago

    Here the correct walk-through:

    MOVE: MOVE: MOVE:

    [T1][B1][F][B2][T2]
    [ ][G][ ][G][ ]
    [#][ ][#][ ][#]
    [ ][ ][F][ ][ ]
    [F][ ][ ][ ][F]
    

    LEFT:

    [T1][B1][F][B2][T2] (B1 and B2 face left)
    [ ][G][ ][G][ ]
    [#][ ][#][ ][#]
    [ ][ ][F][ ][ ]
    [F][ ][ ][ ][F]
    

    IF FLOWER: RIGHT

    [T1][B1][F][B2][T2] (Only true for B2; B2 now faces up)
    [ ][G][ ][G][ ]
    [#][ ][#][ ][#]
    [ ][ ][F][ ][ ]
    [F][ ][ ][ ][F]
    

    RIGHT

    [T1][B1][F][B2][T2] (B1 faces up, B2 faces right)
    [ ][G][ ][G][ ]
    [#][ ][#][ ][#]
    [ ][ ][F][ ][ ]
    [F][ ][ ][ ][F]
    

    RIGHT

    [T1][B1][F][B2][T2] (B1 faces right, B2 faces down)
    [ ][G][ ][G][ ]
    [#][ ][#][ ][#]
    [ ][ ][F][ ][ ]
    [F][ ][ ][ ][F]
    

    IF FLOWER: LEFT

    [T1][B1][F][B2][T2] (Only applies for B1; now faces up)
    [ ][G][ ][G][ ]
    [#][ ][#][ ][#]
    [ ][ ][F][ ][ ]
    [F][ ][ ][ ][F]
    

    LEFT

    [T1][B1][F][B2][T2] (B1 faces left, B2 faces right)
    [ ][G][ ][G][ ]
    [#][ ][#][ ][#]
    [ ][ ][F][ ][ ]
    [F][ ][ ][ ][F]
    

    MOVE

    [B1][  ][F][B2][T2]
    [ ][G][ ][G][ ]
    [#][ ][#][ ][#]
    [ ][ ][F][ ][ ]
    [F][ ][ ][ ][F]