How Far a Machine Looks: The Horizon Effect and Deciding With Less A tutorial in the free Jarroba AI course demonstrates the horizon effect, named by Hans Berliner in 1973, using Los Alamos chess — the 6×6, bishop-less variant first played by a 1956 program on the MANIAC I computer. In the tool's example, a machine searching 3 moves ahead rates a knight-for-pawn capture at +102 hundredths of a pawn because it cannot see the queen on c6 recapture beyond its limit, while quiescence search, which keeps examining captures until the position is quiet, corrects the evaluation without searching deeper. The lesson matters because fixed-depth search with a simple piece count (pawn 100, knight 300, queen 900) can misjudge positions whenever the search stops right after a capture. Note: Although this article can be read independently, it is part of a comprehensive interactive course — the table of contents for which can be found at https://jarroba.com/en/ai-course/ —where the entire course is available for free. In Playing against a machine https://jarroba.com/?p=51307 , the machine looked at the whole tic-tac-toe tree, but in Connect 4 it could only look a few moves ahead, and there it estimated how much the position was worth. Where it stops matters more than it seems: if it cuts off too early, it will probably play badly; if it looks too far, it either gains an advantage or wastes computation. And since searching deeper costs something, game engines use tricks to look at less and decide the same. Open the Game tab of the Search tool with Los Alamos chess https://jarroba.com/tools/en/search?tab=game&game=chess&variant=losalamos&qdepth=3&quiescence=true . It is 6×6 chess without bishops, the variant in which, in 1956, a program written at Los Alamos for the MANIAC I computer was the first to play something like chess Los Alamos chess , on Wikipedia https://en.wikipedia.org/wiki/Los Alamos chess . The machine looks 3 moves ahead, and the Quiescence search switch is on quiescence means continuing to look until there is nothing left to capture; it is explained below . Squares are named with a letter for the column, from a to f, and a number for the row, from 1 to 6, counting from White, which is the machine’s side. The tool’s board is seen from your side, Black, and has the letters and numbers on the edge: row 1 is at the top and column a on the right. Press Let the machine start . It advances the pawn from square a2 to square a3 a2-a3 , and below it shows what it would have played with quiescence and without it. “The line it expects” is the move it would make and the ones it expects to come after, one from each side: its own, yours, its own. A “×” means that move captures: knight c3×b5 is “the knight on c3 captures whatever is on b5”. To rate a position, the machine counts the pieces: a pawn is worth 100, a knight 300 and a queen 900 the tool itself says so below the table , and it subtracts yours from its own; that is why the values are in hundredths of a pawn. +102 means that, at the end of the line it expects, it thinks it will have one pawn more than you: that it will have captured one without losing anything in return. Look at the end of the line: the knight captures your pawn on b5 and that is where it stops. But that pawn is defended by your queen on c6, which would capture the knight on the next move. The machine would give a knight, worth 300, for a pawn, worth 100. It does not see it because that move lies beyond the 3 it looks at. Move by move, from your side of the board, it looks like this: Now move How many moves it looks ahead to 4, or open the same game looking 4 ahead https://jarroba.com/tools/en/search?tab=game&game=chess&variant=losalamos&qdepth=4&quiescence=true , and let it start again. Without quiescence it goes wrong the other way round: it thinks the knight on c3 loses a pawn −98 , because its line ends with your knight capturing the pawn on c2, and it does not see that afterward it can capture that knight. With quiescence it goes back to a2-a3. This is called the horizon effect , and it was named by Hans Berliner in 1973 Horizon effect , on Wikipedia https://en.wikipedia.org/wiki/Horizon effect . The machine looks to a fixed depth and there it estimates with a simple count: it adds up what each piece is worth. If the search stops right after a capture, the count says “I’m winning” or “I’m losing”, even though the obvious reply turns it around on the next move. What lies beyond the limit does not exist for it. Quiescence search fixes it without searching deeper. On reaching the limit it does not estimate right away: it keeps looking only at captures, one after another, until it reaches a quiet position, with nothing to capture. Only then does it estimate. It costs little, because captures are few: with 3 moves, 532 positions against 509. With 4, 5,157 against 1,398: the difference grows, but it is still less than looking one more move without quiescence, which with 5 is 8,170. The other problem is size. Open checkers https://jarroba.com/tools/en/search?tab=game&game=checkers&cdepth=8 the tool’s tab is called Draughts , on a 6×6 board, and press Let the machine start . The machine looks 8 moves ahead, and the table says how many positions it cost to decide with each technique. The value and the move come out the same with all of them: Move ordering helps the alpha-beta pruning from 0.6. Pruning stops looking at a move as soon as it sees it is worse than another one it already has. If the best one is looked at first, all the others are discarded. The tool tries captures first and, at each level of the tree, the move that caused a cut-off last time Alpha-beta pruning , on Wikipedia https://en.wikipedia.org/wiki/Alpha%E2%80%93beta pruning . The transposition table is memory. The same position can be reached by different paths: if you move piece A and then B, or B first and then A, the board ends up the same. The table notes what each position already seen was worth, so as not to calculate it again Transposition table , on Wikipedia https://en.wikipedia.org/wiki/Transposition table . The deeper the search, the more they pay off. With 12 moves, pruning alone looks at 108,860 positions and the three together at 34,524, three times fewer. In real checkers, on 8×8, there is a famous program, Chinook, from Jonathan Schaeffer’s team at the University of Alberta. In 1994 it was declared man-machine world champion, and in 2007 its team proved that checkers, played perfectly by both sides, ends in a draw Chinook , on Wikipedia