# Tag Info

## Hot answers tagged minimax

4

In a game-theoretical sense, both of the moves you describe are equally good in the scenarios you describe, so the algorithm is "correct" in that it doesn't matter which move it picks -- you do not explicitly encode a preference for faster wins (or faster gains of $+100$) over slower scores. Introducing a discount factor to explicitly encode such a ...

3

This is because you are not using a discount factor in your search. A discount factor $\gamma$ is a number between 0 and 1. The discount factor describes the preference of an agent for current rewards over future rewards. When $\gamma$ is close to 0, rewards in the distant future are viewed as insignificant. When $\gamma$ is 1, discounted rewards are ...

1

What you can do is to add a counter $t$ to each node, initially 0, indicating how many of its children are terminal. When $t = c$ where $c$ is the number of children of a node, the node itself becomes terminal and increments the $t$ counter of its parent. Note that with this definition leaf nodes are automatically terminal, as they have no children, giving $... 1 Plainly, evaluating$10^{19}$positions is not going to be feasible in 7200 seconds. But if you use alpha-beta to prune the search tree and have perfect move ordering you can get that down to around$10^{10}$, a number that looks much more reasonable given that chess engines on PC hardware can do a couple million nodes per second easily. Since alpha-beta ... 1 Suppose the points are$[4,1,10,11]$. The distance from the starting point (whether you interpret that as$4$or$1\$) to each other point does not give you the nearest pair of points. In this problem, the input is an array containing numbers, not in sorted order.

1

In the rules of chess, one player can demand a draw when the same position is entered three times. If your opponent can demand a draw, the value of the position is 0 in the best case. So if you look forward far enough, you see that a move leading to repetition may not be that good. (In this case, you would choose the second best move if it has a value > 0, ...

Only top voted, non community-wiki answers of a minimum length are eligible