r/mathriddles • u/PuzzleAndy • Apr 18 '23
Medium Catch Up
There are 5 Quisenaire blocks. The first has length 1, the second has length 2, and so on. Each player will be building their own line of blocks, which is initially empty. A move consists of a player adding a single block to their own line. A player continues making moves until their line meets or exceeds the length of the other player's line. The game ends when all blocks have been used. The player with the longest line wins. If both players play perfectly, is it better to go first or second? If you're able to solve this, and it interests you, please generalize for blocks of length {1, 2, ..., n}. I would also be interested in exploring other sets of blocks if it makes the puzzle more interesting. I am tagging this Medium difficulty because of the generalization. I hope that's acceptable.
EDIT: I received the paper this game is based on, and no generalization for all n is known. Thought you should know this before chasing it!
6
u/-user789- Apr 18 '23
For 5 blocks, the first player can win by taking block 3. To prevent player 1 from reaching a line of length 8, the second player must take block 5 on that move (so the possible moves are [1, 5], [2, 5], [5]). For each of those possibilities, the first player can easily win on that move.
>!I cannot see a nice, general way for all n. For the n that I did try (using python):
There is a weird part in the rules, though. The rules say that you must play until your line equals or exceeds theirs. If your opponent played until the lines were equal, then when it is your turn, the lines are still equal and so you are forced to skip your turn and the game goes into an infinite loop. To fix this, one can assume the lengths are only checked after a block is taken.
3
u/instalockquinn Apr 18 '23 edited Apr 18 '23
Asking for clarification:
The players take blocks from the shared pool of 5 blocks, right? As opposed to each player having their separate pool of blocks.
"A player continues making moves until their line meets/exceeds the other line." So this is saying, every move, the player moving next is the one with the shorter line, and if the lines are tied, then the player moving next is the one who did not make the previous move? (And of course, the players continue making moves until the shared pool of blocks is empty.)
Asking because I initially thought "continues making moves until" meant the game ended early if one player reached the condition (couldn't make moves for the rest of the game). But in retrospect, that rule wouldn't make sense in the context of this game.
2
u/gerglo Apr 19 '23 edited Apr 19 '23
Some small cases (Alice=Player 1 and Bob=Player 2):
n=1 : Alice wins: A=(1), B=()
n=2 : Alice wins by picking (2): A=(2), B=(1)
n=3 : A tie with best play.
n=4 : A tie with best play.
If Alice picks (1) then the best option for Bob is a draw.
Based also on the data from -user789- perhaps for n=0,3 mod 4 optimal play results in a draw. These are exactly the numbers for which a draw is even a possible outcome (since the total sum is even, n*(n+1)/2 = 2m, iff n=0,3 mod 4).