O'Reilly logo

Land of Lisp by Conrad Barski M.D.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Making Our AI Work on Larger Game Boards

Next, we’re going to adjust our game AI functions to use the new lazy list library when processing moves. Along the way, we will make some additional improvements to the AI code.

Trimming the Game Tree

image with no caption

In version 1 of Dice of Doom, our AI code was, in certain ways, extremely powerful. This is because, at every decision point, the AI player would look at every possible future board position to choose the absolute best next move. In this way, it could play a perfect game of Dice of Doom, winning every game that was winnable.

However, such a design does not scale to larger boards. This is because it becomes impossible ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required