Skip to content
No description or website provided.
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Input boards like this:

(def board 
  [[:s :s :s :s :s]
   [:s :s :b :b :s]
   [:s :b :w :w :b]
   [:s :b :w :w :b]
   [:s :s :b :b :s]])

To test if a piece at a given index is alive, write e.g.

(alive? [3 3] board)


(dead? [3 3] board)

You can count all the "paths to life" by running

(alive-all [1 3] board)

To make (and nicely format) the first two 6X6 boards for which black is dead at [3 3], put:

(format-boards (make-boards 2 [6 6] :b dead [3 3]))

Take a look at the code for alive or dead to see core.logic in action.


Generating large boards does not work. Since you cannot create a function with more than 256 arguments, you cannot generate a board with more than 256 variables.

Something went wrong with that request. Please try again.