Ellington Management Group is a hedge fund with world-class talent from campuses across the nation. To help us identify top programming talent, we are proposing a self-contained challenge requiring only ingenuity and programming skills to solve.
We present a variant of the popular game Tic-Tac-Toe in which players bid for squares (Bid-Tac-Toe). In particular:
The challenge is to find a winning strategy for this game and write code according to the protocol specified below. The strategies submitted will be played against one another in a tournament.
You must deliver a program that plays your strategy by following a simple protocol we outline below. You must provide us with the complete source code of your program, written in any programming language you wish that has a free and publicly available implementation. If the language is arcane, please also provide a link to the implementation.
Your program should communicate solely via standard input/output (i.e. no graphical user interfaces). The program should repeatedly read a single line from standard input, process the command described by the line, and write an appropriate response to standard output. The program should terminate upon reading EOF (end of input) from the standard input.
Each command consists of a sequence of words delimited by whitespace. In the descriptions below, non-italicized words are to be taken literally and each italicized word is a placeholder for a corresponding word in the input. The commands are:
newgame opponentID
This indicates the start of a new game against the given opponent. The opponent ID will correspond uniquely to some other program in the tournament. Your program should output a single line containing 9 nonnegative integers in the format “a1 a2 a3 a4 a5 a6 a7 a8 a9” corresponding to your bids on each of the 9 squares, followed by an endline character. Board squares are enumerated from left to right and top to bottom:
|
1 |
2 |
3 |
|
4 |
5 |
6 |
|
7 |
8 |
9 |
nextround b1 b2 b3 b4
b5 b6 b7 b8 b9
Another round of play is required for this game. The bs are your opponent's bids for the previous round. You can deduce the state of the game from these bids and the bids you provided earlier. Respond with the format “a1 a2 a3 a4 a5 a6 a7 a8 a9” for your next set of bids (followed by an endline character). You must specify “0” for an already-occupied square.
gameover b1 b2 b3 b4 b5 b6 b7 b8 b9
The game is over; the bs again are your opponent’s bids, and you can deduce the winner or whether the game tied. Do not provide any response.
If at any time you give an illegal set of responses (not giving non-negative integers, not supplying “0” for an already-occupied square, bidding a set of values with sum exceeding your bankroll, etc.), you forfeit that round. Your input will be treated as “0 0 0 0 0 0 0 0 0” for that round, and you will receive a “gameover” command in the format above.
Your program will see the following repeatedly: a newgame command, followed by zero or more “nextround” commands, followed by a “gameover” command. A single execution of your program can expect to play many games against each of the other contestants’ programs. Your program can maintain whatever state it wants to in memory, but it cannot preserve state across executions and/or write to a file. Programs that violate this rule will be disqualified. It may, however, read from files in the current working directory.
Your program should make reasonable demands on computer resources. As a rough guideline, do not use more than a hundred megs of memory or take more than five seconds to respond to a command. We may disqualify any program that exceeds these bounds.
We will judge entries solely on how they perform in a tournament. We do not specify the details of the tournament, except to say that each submitted strategy will have an opportunity to play every other at least 100 times.
Mark faces off against his nemesis Rebecca, with their strategy having identifiers MarkMcLovin and rebecca111 respectively.
Mark receives newgame rebecca111 and outputs 2 4 2 4 10 4 2 4 2. Rebecca receives newgame MarkMcLovin and outputs 2 7 2 14 2 1 6 4 2:
|
|
R |
|
|
R |
M |
M |
|
R |
|
|
Note that the two strategies bid the same amounts for squares 1, 3, 8, and 9, so those squares are not owned by anyone. Mark deducts $10 + $4 = $14 from his bankroll, ending with $86. Rebecca deducts $7 + $14 + $6 = $27, ending with $73.
Mark then receives nextround 2 7 2 14 2 1 6 4 2 and Rebecca receives nextround 2 4 2 4 10 4 2 4 2. From this, they were both able to deduce the state of the board as above.
Mark outputs 25 0 25 0 0 0 0 0 30 and Rebecca outputs 25 0 17 0 0 0 0 13 31. The board now looks like:
|
|
R |
M |
|
R |
M |
M |
|
R |
R |
R |
Mark deducts $25, ending with $61. Rebecca deducts $13 + $31, ending with $29.
Mark then receives nextround 25 0 17 0 0 0 0 13 31 and Rebecca receives nextround 25 0 25 0 0 0 0 0 30.
Mark outputs 61 0 0 0 0 0 0 0 0 and Rebecca outputs 29 0 0 0 0 0 0 0 0. Mark wins the last square:
|
M |
R |
M |
|
R |
M |
M |
|
R |
R |
R |
Unfortunately, Rebecca had already won. Mark will receive gameover
29 0 0 0 0 0 0 0 0 and Rebecca will receive gameover 61 0 0 0 0 0 0 0 0.
From this, they both deduce that Rebecca had won, and they will both receive
new newgame commands, maybe with
each other, maybe with another strategy.
All responses should be sent to challenge AT-SIGN
ellington.com.
The Challenge ends on Monday, October 29th at 12 am, Eastern Time.
Any questions about the challenge should be directed to the same email address. The response should contain all of the following:
On a TBA date, Ellington will be hosting a reception for the $1,500 winners from each school at Ellington’s headquarters in Old Greenwich, CT.
You will meet with various business leaders and get to know Ellington during the afternoon.
Ellington Management
Group, L.L.C. is an investment management firm founded in December 1994. With
over 150 professionals, Ellington manages over $24 billion in collateralized
debt obligations ("CDOs") and over $5 billion of hedge fund capital,
net assets under management.
Ellington pursues a
relative value investment strategy with the objective of capturing a stable
income stream while minimizing return volatility over time. This strategy
relies on Ellington’s ability to identify and purchase undervalued securities,
and its intensive analytical approach to risk management. Ellington’s risk
management process emphasizes the proper hedging of portfolio risks. Given the
complexity of instruments such as MBS derivatives, this is only possible with
sophisticated and precise quantitative tools and methodologies that are the
foundation of Ellington’s investment technique. Analyzing prepayment risk, in
particular, necessitates the development and continuous refinement of
sophisticated statistics-based computer models.
At Ellington, top programming talent builds the backbone of our multi-billion dollar MBS trading platform. We develop trading systems, perform statistical analyses on historical data, and build advanced models that support highly profitable trading decisions.
Q: I am going to write my program in Perl/Python; how should I write the first line?
A: Just send us code that works on your computer. We will change the first line so it works on ours.
Q: Can we have two team members from two of the three listed schools?
A: Yes. But only one team affiliation can be selected.
Q: Can we use C#?
A: Yes, but make sure that it works under Mono so we can run under Unix.
Last
updated: 10/15/2007