<p>This game is <strong>Solvable</strong> due to <a href="https://boardgames.stackexchange.com/questions/48717/in-two-player-games-with-perfect-information-if-both-players-play-optimally-wi/48722#48722">Zermelo's theorem</a>.  I don't know if someone solved it.  This game is actually a mix of 25 * 24 games (setups). Solving the game means to solve each setup (which is a game with no affect of chance) and find if it is a p1 win, p1 lose or a draw.</p>
<p>The notation of a <a href="https://en.wikipedia.org/wiki/M,n,k-game" rel="nofollow noreferrer">m,n,k-game</a> talks about <em>m</em>-by-<em>n</em> board and win by making <em>k</em>-in-a-row.  If we put a side the random setup and the transfer, a (5,5,4) is a draw. However increasing the board by a single row to (6,5,4) makes it a first player win.</p>
<p>This variant is a (5,5,4) with random setup and a transfer action of p2. Because the vanilla (5,5,4) is very close to p1 win, I think most setups are either p1 win or p2 win (but not a draw).</p>

CC BY-SA 4.0
2024-06-02T07:01:28.250Z
2024-06-23T11:04:34.997Z
2024-06-23T11:04:34.997Z
Cohensius
<p>Is the optimal strategy known for the following variant of 4-in-a-row where the first 2 moves are random and the 2nd player can once move a mark to any location.</p>
<ul>
<li><p>Win condition: 4-in-a-row.</p>
</li>
<li><p>Board: 5x5.</p>
</li>
<li><p>Setup:</p>
<ol>
<li>Player1 randomly place a mark on the board.</li>
<li>Player2 randomly place a mark on the board, which can not be in the center.</li>
</ol>
</li>
<li><p>Play:</p>
<ol>
<li>After the first move by player 1, player 2 can move their piece.</li>
<li>Next, the turns alternating like in a regular tic-tac-toe.</li>
</ol>
</li>
</ul>
<p>Two questions:</p>
<ol>
<li>Is this game solved/solvable?</li>
<li>Does player 2 have a strategy that can guarantee a win for every random first move? If so, what is that strategy?</li>
</ol>

CC BY-SA 4.0
2024-06-02T06:03:10.087Z
Since you can force 3x3 to a draw, 4 for a winning condition should be even easier to force to a draw, random or not
Zibelas
CC BY-SA 4.0
2024-06-02T06:41:01.517Z
@Zibelas, you are wrong, it is easier to make a k-in-a-row because the board is bigger.  For example, a 3-in-a-row on a 5-by-5 board is very easy win by the first player.
Cohensius
CC BY-SA 4.0
2024-06-02T06:44:32.507Z
@Zibelas, what I mean is that there are several forces that push in different directions: the 4-in-a-row instead of 3-in-a-row push the game to a draw but the bigger board push the game to a first player win.  The random moves setup pushes the game to some games won by each of the players.
Cohensius
<variants><tic-tac-toe><connect-four>
Optimal strategy for 4-in-a-row on 5-by-5 board with random setup and a transfer
altair
# Optimal strategy for 4-in-a-row on 5-by-5 board with random setup and a transfer

(Asked by: username_0 on 2024-06-02)

Is the optimal strategy known for the following variant of 4-in-a-row where the first 2 moves are random and the 2nd player can once move a mark to any location.

* Win condition: 4-in-a-row.
* Board: 5x5.
* Setup:

  1. Player1 randomly place a mark on the board.
  2. Player2 randomly place a mark on the board, which can not be in the center.
* Play:

  1. After the first move by player 1, player 2 can move their piece.
  2. Next, the turns alternating like in a regular tic-tac-toe.

Two questions:

1. Is this game solved/solvable?
2. Does player 2 have a strategy that can guarantee a win for every random first move? If so, what is that strategy?

**Tags:** variants, tic-tac-toe, connect-four

> **Comments:**
> **username_1**: Since you can force 3x3 to a draw, 4 for a winning condition should be even easier to force to a draw, random or not  
> **username_2**: @username_1, you are wrong, it is easier to make a k-in-a-row because the board is bigger.  For example, a 3-in-a-row on a 5-by-5 board is very easy win by the first player.  
> **username_2**: @username_1, what I mean is that there are several forces that push in different directions: the 4-in-a-row instead of 3-in-a-row push the game to a draw but the bigger board push the game to a first player win.  The random moves setup pushes the game to some games won by each of the players.  

---

## 1 answers

### Answer by username_2 on 2024-06-02. Score: 3

This game is **Solvable** due to [Zermelo's theorem](https://boardgames.stackexchange.com/questions/48717/in-two-player-games-with-perfect-information-if-both-players-play-optimally-wi/48722#48722). I don't know if someone solved it. This game is actually a mix of 25 \* 24 games (setups). Solving the game means to solve each setup (which is a game with no affect of chance) and find if it is a p1 win, p1 lose or a draw.

The notation of a [m,n,k-game](https://en.wikipedia.org/wiki/M,n,k-game) talks about *m*-by-*n* board and win by making *k*-in-a-row. If we put a side the random setup and the transfer, a (5,5,4) is a draw. However increasing the board by a single row to (6,5,4) makes it a first player win.

This variant is a (5,5,4) with random setup and a transfer action of p2. Because the vanilla (5,5,4) is very close to p1 win, I think most setups are either p1 win or p2 win (but not a draw).


---

