Boogle is a program that creates and solves Boggle boards, like the one above. It can generate random 4x4 or 5x5 boards using the actual Boggle cubes, or you can input your own custom board (with custom dimensions). It outputs a HTML file of each board, as well as a index file to navigate between them. The HTML boards are sized for printing out, although they also can be easily played on your screen.

It can generate batches of boards, directed by command-line arguments, or it can run in interactive mode, in which you detail the parameters of each board. In addition to the board size, it allows you to specify the minimum length acceptable word. It scores the words using three scoring methods.

View some sample 4x4 boards, 5x5 boards, and custom boards generated by Boogle.

Boogle is written in Ocaml, in a mostly-functional style. It can solve about 1700 4x4 boards per second (2500/s if it is allowed to just print out the words as it finds them) on my 1.6 gigahertz laptop.

Download the Boogle source. Please email me if you would like to modify or redistribute it. To run it, you can supply your own dictionary file (such as /usr/dict/words) or use this more comprehensive one.

To run Boogle, save the source and the dictionary in the same directory (unless you are using your own dictionary). Invoke ocamlopt as follows:
$ ocamlopt -o boogle str.cmxa
This will result in a compiled program, "boogle", that you can run directly. If you have ocaml but not ocamlopt, you can interpret boogle by running
$ ocaml str.cma

I will try to post some versions compiled for various platforms here, although I have no idea whether they'll actually work or not.

AJ Shankar (aj at cs dot berkeley dot edu)