GithubHelp home page GithubHelp logo

johanvandegriff / bogglesolver Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 1.6 MB

Python program that solves a word puzzle called Boggle.

Home Page: http://johan.vandegriff.net/boggle.py

License: MIT License

Python 97.21% Shell 2.79%

bogglesolver's Introduction

This collection of programs creates and solves Boggle boards.

create.py - Creates a boggle board.
usage: ./create.py
       ./create.py FILE
       ./create.py SIZE
       ./create.py FILE SIZE
       ./create.py SIZE FILE
default size = 5

solve.py - Solves a boggle board created by create.py.
(Does not display the solutions.)
usage: ./solve.py FILE [MIN WORD LENGTH]
default min word length = 4

display.py - Displays a board and the solutions, if any.
usage: ./display.py FILE

input.py - Writes the user input to a boggle board file.
usage: ./input.py FILE

boards/ - A directory of 1000 solved boards.

convert.py - Converts the old format of the board to the new one.

deconvert.py - Converts the new format of the board to the old one.

lists/ - The lists of words.

old/ - The original boggle program.

raw_display.py - Displays all the data from a board file in list form.

stats/ - Programs and documents for analyzing the 1000 boards and the board
         with 10,000 words.

What is Boggle?
From the Boggle Wikipedia page:

Boggle is a word game designed by Allan Turoff and originally distributed by
Parker Brothers. The game is played using a plastic grid of lettered dice, in
which players attempt to find words in sequences of adjacent letters.

Rules

The game begins by shaking a covered tray of 16 cubic dice, each with a
different letter printed on each of its sides. The dice settle into a 4×4 tray
so that only the top letter of each cube is visible. After they have settled
into the grid, a three-minute sand timer is started and all players
simultaneously begin the main phase of play.

Each player searches for words that can be constructed from the letters of
sequentially adjacent cubes, where "adjacent" cubes are those horizontally,
vertically, and diagonally neighboring. Words must be at least three letters
long, may include singular and plural (or other derived forms) separately, but
may not use the same letter cube more than once per word. Each player records
all the words he or she finds by writing on a private sheet of paper. After
three minutes have elapsed, all players must immediately stop writing and the
game enters the scoring phase.

In the scoring phase, each player reads off his or her list of discovered
words. If two or more players wrote the same word, it is removed from all
players' lists. Any player may challenge the validity of a word, in which case
a previously nominated dictionary is used to verify or refute it. For all words
remaining after duplicates have been eliminated, points are awarded based on
the length of the word. The winner is the player whose point total is highest,
with any ties typically broken by count of long words.

One cube is printed with "Qu." This is because Q is nearly always followed by
U in English words (see exceptions), and if there were a Q in Boggle, it would
be challenging to use if a U did not, by chance, appear next to it. For the
purposes of scoring Qu counts as two letters: squid would score two points (for
a five-letter word) despite being formed from a chain of only four cubes.

Boggle Deluxe

Big Boggle, later marketed as Boggle Master and Boggle Deluxe, featured a 5×5
tray, and disallowed 3-letter words. Some editions of the Big Boggle set
included an adapter which could convert the larger grid into a standard 4×4
Boggle grid.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.