Skip to Main Content
Realm of Racket
book

Realm of Racket

by Conrad Barski M.D., David Van Horn, Eight Students of Northeastern University, Matthias Felleisen
June 2013
Intermediate to advanced content levelIntermediate to advanced
312 pages
6h 47m
English
No Starch Press
Content preview from Realm of Racket

Chapter 11. (Power to the Lazy)

#|

As every college student knows, being lazy is on occasion a remarkably effective way to get work done. What we mean, of course, is that some work just goes away if you wait long enough. In this chapter, we’ll show how these virtues of laziness carry over to the world of computation.

|#

11.1 Doomsday

Dice of Doom is fun, but the board is a little small. Try setting the board size so you get a 3×3 board and run the game. Did you notice that the generation of the game tree seems to just hang? It hangs because the time it takes to process the number of possible moves for a 3×3 board is massive compared to the time it takes for a 2×2 board. But think about it: do we really need to consider all possible moves at each step? ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Elm in Action

Elm in Action

Richard Feldman
Handbook of Constraint Programming

Handbook of Constraint Programming

Francesca Rossi, Peter van Beek, Toby Walsh

Publisher Resources

ISBN: 9781457185120Errata