What You've Learned

In this chapter, we made the computer player for our Dice of Doom game much more sophisticated. We implementing the game tree using lazy lists, and applied several optimization techniques to limit the number of board positions that are searched by the AI engine. Along the way, you learned the following:

  • Lazy programming allows you to work with very large (and even infinite) data structures and do so efficiently.

  • Once you have a lazy macro and a force function, you can use them to build more sophisticated lazy operations, including building a lazy list library.

  • Heuristics are imperfect algorithms that can be used to improve the performance of your code, with some creative thinking. In our example, we made some heuristic changes ...

Get Land of Lisp now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.