RIP, puzzle robot

How to play

Conventional puzzles

The robot has been down for months. No one knows when service will be restored.

In one of ten supported languages, write a program to be evaluated on a server maintained by Facebook (“the robot”). I have specific instructions for each language: C, C++, Erlang, Haskell, Java, OCaml, Perl, PHP, Python, Ruby.

You will find most of these puzzles difficult unless you have studied algorithms at the undergraduate level. Please do not discuss algorithms in the context of specific puzzles!

Thrift puzzles

The Thrift-puzzle server has been down for months. No one knows when service will be restored.

In any language supported by Thrift, write a program to make your computer interact with the Thrift-puzzle server, which is maintained by Facebook. When you solve a puzzle, winGame() will return a string like simonsays(0123456789abcdef0123456789abcdef). Receive credit for your solution by sending an email to puzzles@fb.com whose subject is exactly that string. You are not required to attach your code, but the Puzzle Master would appreciate it. You should receive a reply within an hour or so.

To get started with Thrift, install the latest stable release and modify one of the clients in the tutorial directory to solve simonsays. Ignore the warnings about field keys not being specified.

Hidden puzzles

Discover a secret keyword and send an email to 1051962371@fb.com whose subject is exactly that keyword. There are two puzzles with secret keywords. Clues can be found on the Puzzle Master page.

Could not be understood

Conventional puzzles

Could not be built/run

The robot runs make and ant and then checks the working directory for a regular file whose name is the puzzle keyword. “Could not be built/run” means that no such file exists. If such a file does exist but is not executable, the robot makes it executable.

Why is my favorite programming language unsupported?

Why is the robot’s software so old?

Has puzzle X been solved in language Y?

Good algorithms will be successful in any of the supported languages.

Why does email to -21779453@fb.com bounce?

The correct interpretation of {0xFACEB00C>>2 in decimal}@fb.com is 1051962371@fb.com. The Puzzle Master intended that 0xFACEB00C evaluate to 4207849484, but in Java, which lacks unsigned types, 0xFACEB00C evaluates to -87117812. (-87117812 is the integer whose 32-bit signed two’s complement representation is identical to the 32-bit unsigned representation of 4207849484.) Since the Java standard defines >> to be an arithmetic right shift, the value of 0xFACEB00C>>2, which is -21779453, has undergone sign extension and is thus wrong.

Why doesn’t the robot reply instantly/with more details?

Per the Puzzle Master, the robot sends infrequent/vague replies to prevent puzzlers from learning about its test cases and to discourage malicious users from examining its security configuration.

Will the robot grade two submissions made within an hour of one other?

Yes; each submission requires its own email. Please be mindful of the fact that the robot is a shared resource.

Can I make submissions for puzzles that I have already solved?

Yes.

Who are you? Are you the Puzzle Master?

I, David Eisenstat, am a PhD candidate in the Computer Science Department at Brown University with no previous or current relationship to Facebook. The Puzzle Master works at Facebook and wishes to remain anonymous.

fridgemadness

For all upper engineers A and all lower engineers b and c, either A prefers b to c, or A prefers c to b. Because of the tiebreakers, this is true even when all three have identical drink lists. Lower engineers always have strict preferences as well.

The primary objective is to ensure that for all upper engineers A and lower engineers b, at least one of the following statements is true:

A and b are partners.

A prefers his or her partner to b.

b prefers his or her partner to A.

Considering only those assignments that achieve the primary objective, the upper engineers have pairwise-distinct best obtainable partners. The secondary objective is to assign them those partners.

The correct assignment is unique. If an upper engineer A and a lower engineer b are supposed to be partners, and you assign a different lower engineer c to A, then there are two possibilities. If A prefers c to b, then for your assignment, there are an upper engineer D (who may be A) and a lower engineer e (who may be b or c) who prefer one another to their assigned partners. If A prefers b to c, then c is not the best obtainable partner of A.

swarm

The primary objective is to maximize the sum of each base’s “expected” mineral gain. The secondary objective is not to use excessive force on any base. This is relevant because expected gains are rounded to the nearest mineral.

Retired

bagthebanner (Thrift)

bagthebanner, a game of capture the flag with robots, was the first Thrift puzzle. It was incompatible with common firewall settings and offered no viable defensive strategies. dinoisland is its replacement.

Using my test cases

Tests for some puzzles are not available yet.

On Windows, your Java program must use Unix-style line separators. Put the following lines at the beginning of your main method.

To save the output to a file results.txt, append >results.txt to the command. If you cannot invoke your program as the robot would, replace liarliar with a longer command such as java -Xmx1024M liarliar or php liarliar.

To conserve my bandwidth, the zip archives do not contain large outputs. I will not send them to you.

After the robot accepts your solution, please consider posting the summary printed by my test program in the Puzzle Master discussions.

Version history

2012-12-31: The puzzle descriptions are gone too. Now I’m done.

2011-10-05: RIP, puzzle robot. This is the final update.

2010-12-07: added a note about robot not looking for a run target in build.xml. Edited the version history to use proper articles.

2010-12-02: clarified that source files to be compiled should have extensions.