Since the problem is not deterministic, the solution must be heuristic.
The "price" at each step is the number of moves made per move. This can be PrN1 or PrN2 for the number of moves for player1 or player2, respectively, in turn N.
The βscoreβ at each step can be considered as the probability that a certain location (the position of both players) after the moves will be a good layout for the rest of the turns.
You want to use a valuation function that takes into account both the price and the valuation for making a decision.
The problem is that the only useful counting function is a function that is some function of the distance between the players (the larger the distance, the greater the probability of approaching the next rounds), and this is precisely synchronized with the minimum price. Any choice that keeps players as far apart as possible is the one that was the cheapest.
What does all this mean if the best algorithm is simply to move the closest player, which is your first instinct.
If the board were not infinite, you could create a better scoring function that takes into account the probabilities of the next boxes, which would give lower grades for the arrangements that leave the player at the edges of the board.
source share