Code the bot to get the bits and avoid the bugs
Main

Simple

Random


LOAD
Main

Average

Random


LOAD
Main

Difficult

Random


LOAD
Load Commands Delete Rules

Delete

repeat

while

if







Were your cards verified?
Moves: 0      Bits: 0      Points: 0

Show Time

Time

Verify

If you are going to save the bits, do not close until verified by others.
Close

Send Results?

Back

Code

LOAD CODE
Back

Directions

Solutions
The purpose is to program the bot to collect the green bits while avoiding the red bugs. After a puzzle is chosen, the playing field will be displayed. Select the Code button to bring up the coding window. Then choose Commands to show the available commands.  Descriptions of the commands are below.

Tapping on a command will add it to the code window. Once a command is added to the code window, it can be indented by tapping on its left or right side. Tapping in the middle of the command will select or de-select it. Commands can be deleted by clicking the Delete button in the menu.

Commands that are to be executed when an if, else, while, or repeat statement is used should be indented.  See below for an example which makes the bot turn left if there is a bug in front of it; otherwise the bot will move.

Once the code is complete, press the Load button to load the scenario. Then press the Start button to execute the commands. If the bot collects all bits or hits a bug, the execution will end.

New commands are added after the command with the yellow border.  If you want to add a command before all of the commands, de-select all commands.

Your score is based on the number of bits you collect.  The first bit is worth 1 point, the second 2 points, the third 4 points, and so on.

Example


Commands

Command Description
moveForward Moves the bot forward one position.
rotate... Turns the bot left or right relative to itself.
if... Checks if a statement is true. If so, indented commands below it are executed.
else Used to execute statement(s) when the if condition is false. Must be used with an if statement.
while... Keeps executing statement(s) while the condition is true.
repeat... Executes the statement(s) the specified number of times or until the condition is true.

Custom Scenario

Select the Custom button on the menu screen to design your own world. Click on the symbols at the bottom. Then click on a spot to add or delete the item.
Back

Game Rules

OBJECTIVE

Your goal is to earn points by programming the bot to collect bits.  In order to program the bot, you need to collect the appropriate Code and Memory cards. The maximum number of points that can be collected in each round is 255.  A round ends when a player has collected all bits.  The game ends when the agreed-upon time is up or the agreed-upon number of rounds are complete.

BIT VALUE

When players run their programs, they earn points for each bit they collect.  The point value of the bit depends on how many are collected when the code is executed: 1 point for the first bit they collect, 2 for the second, 4 for the third, 8 for the fourth and so on.  Since each puzzle has 8 bits, a player earns 255 (1 + 2 + 4 + 8 + 16 + 32 + 64 + 128) points if all bits are collected in one attempt.  For example, if a player runs the program and collects 1 bit, they earn 1 point.  Then if they collect two bits the next time they run the program, they earn three points, one for the first bit and two for the second.  Based on this scoring system, players maximize their score by minimizing the number of times they run the program.  This encourages players to write more complicated programs to collect as many bits as possible in a single attempt.

Players must not save their progress until they officially run their code and have it verified by other players as discussed below.

SETUP

Shuffle the cards and deal six cards to each player. Place the deck on the table, flip the top card over and place it face up next to the deck for the discard pile.  During play, players can pick from either pile.

Pick a puzzle to solve.  Once suggestion for selecting the puzzle is to have the players agree on the difficulty level and then have the dealer use the random button. Once the puzzle is selected, play proceeds clockwise from the dealer.

PLAYER TURN

On your turn:
  1. (Optional) Announce if you are going to execute your program to collect bits. Prior to executing your code, you need to announce so that others can play the Steal Turn card.  After running your code, you must show the cards you used and the pop-up window in the game which shows the number of lines and cards you used.  You do NOT show your actual solution.  The pop-up window is verification that your solution used only the cards in your hand.  Do not close this window and save your progress until the other players verify.  If you play an invalid solution in which you use more lines then you have memory, or code which you do not have, then your turn ends and each player picks a card from your hand and discards it on the bottom of the discard pile.  If a Steal Turn card is played against you, then your turn ends immediately and you do not pick or play as described in step 2. Play resumes with the person who played the Steal Turn card. 
  2. EITHER (a) pick the top card from either pile OR (b) play a Steal Card(s), a Swap, a Search, or a Spy card.  If you have more than six cards, you must discard one.
You may set time limits for each turn.

If all cards are picked, then the discard pile is re-shuffled, the deck is placed face down, and one card is flipped over face up for the discard pile.

PROGRAMMING

Players use the commands in their library to write programs to collect bits. Ideally, a player writes a single program to collect all 8 bits. In that case, the score is the maximum of 255. However, if a player writes a program to collect several bits, then the player earns points for those collected and the puzzle is saved. The next time the player runs a program, the bot begins where it ended the previous time with the remaining bits.

CODE LIBRARY

When you pick a Code card, the corresponding command is added to your library.  You can use those commands in your program as many times as desired. The number of lines of code in your program is limited by the amount of memory you have.

CARDS
  • Steal Card(s) - Allows you to take cards from other players. There are two Steal cards. One allows you to look at a player's cards and take one.  The other allows you to take one card from each player (without looking at their cards) and then keep one (after looking at the cards you took).
  • Steal Turn - Prevents another player from taking their turn and shifts the turn to you.  It can be played when a player indicates they are executing their code.  It is generally played to prevent another player from collecting bits, especially if you are able to solve the puzzle.  After you take your turn, play resumes with the player after you.
  • Code - Adds commands to your library so that you can use them in your program.  Once you have a code card, you can use that command as many times as you want in your program, assuming that you have sufficient memory.  You do not discard it after using.
  • Swap - Allows you to discard cards from your hand and pick an equal amount of cards from one of the two piles. You also pick a card to replace the Swap card that you discard.
  • Memory - Gives you memory to allow you to write programs with more lines of code. You do not discard it after using.
  • Search - Allows you to look through one of the two piles to pick a card.  You can either look in the deck OR the discard pile but not both.
  • Spy - Allows you to look at everyone's cards.  You will pick a card from either pile after playing this card.
  • Upgrade  - Doubles your memory.  You do not discard it after using.
Code, Memory, and Upgrade cards are not discarded after use. All other cards are discarded after use.

ENDING THE GAME

The round ends when a player collects all bits.  All cards are collected and shuffled.  The player who wins the round deals.  The game ends when the agreed-upon number of rounds are complete or the time is up.
Back

Solutions

Solutions for some problems follow. Several solutions for each are shown.

Example 1










Example 2










Example 3