An Algorithmic and Social Introduction to Computer Science (CSC-105 2000S)

The algorithms Dewdney describes assume that both players make the ``best'' possible move. How would the min-max and alpha-beta pruning algorithms change if one player selected a move randomly?


I believe that in the min-max algorithm, making a random move only increases the computer's odds of winning the game. Even in a complicated game such as Chess, as soon as a move is made, the position evaluator of the program is already outlining the possible legal moves that are favorable. However, when using the alpha-beta procedure, the random play causes some problems for the program. Unfortunately the computer assumes that the best move is going to be made, and in the process, eliminates any further analysis of the game tree. Hence, in looking at the best move, and not having the best move made, the program does not make the best possible move.



I guess the algorithms would not work as well because the computer would have to greatly expand the tree for every possible move. It would be much less efficient because it could not automatically discard certain undesirable moves on the other player's part. However, assuming that the other player will always make the best possible move is a risky assumption in and of itself. I don't think one can safely assume that, as, even with the best players, there is always room for "human error."


The algorithms Dewdney describes assume that both players make the best possible move. How would the min-max and alpha-beta pruning algorithms change if one player selected a move randomly?

I am not sure that I completely understand the book's presentation of the pruning algorithms, but I'll give it a try anyway. It seems to me if one player selected a move randomly then both pruning algorithms would be ineffective. Both algorithms are based on the computer making evaluations of strategy, and if one player chose random moves, these evaluations of strategy would fail to incompass the possiblities that a random mover would possess. The move might fall into a previously pruned strategy and thus the computer evaluation of the game would fail. What this means is that in the case of a randomly choosen move, the computer would have to eliminate all pruning strategies, min-max or alpha-beta, and evaluate all possible moves equally without regard to player strategy, which is unlikely to be effective, since the player is using 'only random moves' as their strategy. In theory, this method seems like it might have some player advantages, but in practice, this method seems likely to fail if winning the game is your goal. I've played chess like this a few times, and I usually lose.


Chapter 6 of Dewdney didn't make the greatest of sense to me, so it's very likely that my response could be totally and completely wrong. Given my rather vague understanding of the min-max and alpha-beta algorithms, then: It states in Dewdney that "the minimax procedure alternately backs up minimum and maximum values to the node of current play. Black then selects whichever move yields the highest value in the resulting position..." It seemed like this meant that black would merely respond to whatever move red made, which led me to think that even if red were to make a random move, the algorithm wouldn't be affected much (in terms of what move the computer would make in response).

The alpha-beta algorithm, on the other hand, where pruning is involved, seems like it would be affected much more by random moves, given that branches are cut off upon the assumption that red is making the best possible move. So if red were to make a random move, it seems like the computer would be confused. I don't know if it would be so to the extent that it wouldn't know what move to make, or merely that it would, irrespective or red's random move, continue to respond based on its pre-existing assumptions that red was making the best possible move.


If one player randomly selects a move rather than selecting the "correct" move, previously pruned branches of game trees become relevant and the tree generator must regenerate those previously pruned, by the minmax procedure, game tree branches. The positive evaluator analyzes the game tree after the random move and again determines the "correct" move to be executed assuming that the opposing player makes all "correct" future moves.

If the game tree machine adapts to the randomness of the player, the game tree machine may be more willing to take greater risks on the assumption that the random player will continue to make random moves rather than making correct moves. The alpha-beta pruning algorithm might change in response to random moves by a player by pruning fewer or no branches and leaving all legal moves as possiblities rather than only the "correct" legal moves; that would allow the game tree machine to respond faster, however, would use more space.

In the end, a machine using a game tree is likely to defeat a player making random moves.


I did not really understand the minimax and alpha-beta methods very well in the chapter, but I would have to say that if one player selected a move randomly, it would most likely increase the other player's chance of winning.


Simply speaking, even though the program may assume that the other player will attempt the best possible move, it doesn't necessarily end there. If the player doesn't choose the best possible move--a novice, or what-have-you, the program can just choose its own best possible move and continue down the new tree, and make changes in reaction to the changes of the human player. I see where you're going with this--does this constitute some form of intelligence? I don't know, but I don't see that fulfilling one aspect of our semi-formed definition means the program's intelligent.


As usual, I didn't fully understand the algorithms Dewdney talked about, but it seems to me that if you were to take a random move, the program must account for all the possible moves a player could make, and not just the best strategic moves. The algorithms Dewdney describes only have a few of the possible moves, those deemed the "best." The tree would have to be greatly expanded to include all the moves each player could possible make each turn.


Does the action of the player change the way that the programs run? If the program runs on the assumption that the player will make the best move, its reaction should still be the same, since the assumption is based on the next move, not the previous one. I suppose that the programs would react with the best possible move according to the value gained. If the random move was faulty, the program would exploit the mistake and capitalize.

Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.

This page may be found at

Source text last modified Wed Feb 16 08:16:06 2000.

This page generated on Tue Apr 11 09:13:08 2000 by Siteweaver. Validate this page's HTML.

Contact our webmaster at