Optimal fluid maze creation

32 Views Asked by At

Consider a two player strategy game, played on an 9*9 square grid. Player A has one piece, which starts on the central square of the bottom side. Each turn, Player A moves his piece to an adjacent square (not to a diagonal one). Player A has the goal of moving his piece to anywhere on the top side in the least number of moves.

Player B has $n$ dominoes, which can be placed on the lines of the grid, preventing player A from moving through that line. Player A cannot move through the dominoes.

Once placed, a domino cannot be moved. However, the maze is 'fluid' in the sense that Player B chooses how to place her dominoes in response to where Player A goes.

Player B has the goal of maximising the number of moves it will take Player A to reach anywhere on the top side. On player B's turn, she can either add a domino to the board (if she has placed fewer than $n$ dominoes so far), or do nothing. However, a domino may not be placed in such a way to make it impossible for A to have a path to the other side of the board.

For instance, suppose we label the squares of the grid from 1 to 9 'vertically' (the direction player A is trying to move) and $A$ to $I$ horizontally. If there were no dominoes placed, player A would move their piece straight up the board (E1 -> E2 -> ... -> E9) to finish the game in 8 moves.

If player B has one domino to place, they can place it horizontally, to bar the path between E1 & E2, and F1 & F2. Player A must now side-step to D1 before marching up the board. Having one domino allowed player B to add 1 step to player A's minimum number of moves.

What should B's strategy be, to maximise the number of steps A needs to take?

What is the number of moves that B can add, as a function of $n$?

It seems that the first few numbers of this sequence are 1, 3, 7, 12. However, as n increases, the function becomes difficult to calculate. Any thoughts on what it is?