A two-player game is played with two piles of stones, with sizes m,n. On a player's turn, that player can remove any number of stones from one pile, or the same number of stones from each pile. A player loses when they are unable to take a stone. If 1 \leq m,n \leq 30, for how many of the 900 starting positions does the first player have a winning strategy?

To determine for how many of the 900 starting positions the first player has a winning strategy, we need to analyze each possible starting position and evaluate if there exists a winning strategy for the first player.

Given that the first player can remove any number of stones from one pile or the same number of stones from each pile, there are several possibilities to consider:

1. If both piles have no stones (m = 0 and n = 0), then the first player loses immediately since there are no stones to remove. This counts as a losing position.

2. If one of the piles has no stones (e.g., m = 0 and n > 0, or m > 0 and n = 0), the first player can remove any number of stones (including zero) from the non-empty pile. In this case, the second player will be forced to remove all the stones from the remaining pile, resulting in a losing position for the second player. So, any starting position with one empty pile is a winning position for the first player.

3. If both piles have stones (m > 0 and n > 0), we need to analyze further. The first player can choose to remove stones from one pile or from both piles. We can systematically go through these possibilities for each pile size (m and n) from 1 to 30.

To do this, we can use dynamic programming to determine if a particular starting position is a winning or losing position for the first player. We can create a 2D table of size 31x31 to store the results of the analysis.

Starting from the smallest pile sizes (m = 1, n = 1), we can populate the table using the following recurrence relation:

winning[m][n] = false if (winning[m-1][n] = false) and (winning[m][n-1] = false) and (winning[m-1][n-1] = false)
true otherwise

Here, winning[m][n] represents whether the first player has a winning strategy for the starting position with pile sizes m and n.

By systematically filling up the table, we can determine if the first player has a winning or losing strategy for each starting position. Finally, we count the number of starting positions for which winning[m][n] is true.

Note: This solution assumes that the second player plays optimally.