The rbloggersolver package can be used to create applications and experiments related to the boggle board game. The package can be used to

Generate boards

Boggle consists of 16 cubes with 6 faces. These are rolled and settle into a 4 by 4 grid. The cubes/dice in use are included as a data set named boggle_dice.

library(rbogglesolver)
knitr::kable(boggle_dice, format = "html", 
             row.names = 1:16, col.names = 1:6)

A standard random boggle board can be generated by calling random_board() with no arguments.

set.seed(100)
board <- random_board()
board

Non-standard size boards can be generated as well.

Boards can be smaller like this 2x2 example

set.seed(100)
random_board(2)

...or larger like this 8x8 board.

set.seed(100)
random_board(8)

Both of these examples use the same standard set of 16 boggle dice. An alternative set of dice can be supplied as an additional argument to provide alternate probabilities of given letters appearing in a board. The next example involves three sided dies with the letters A, B and C being used on a 3x3 grid.

alt_dice <- data.frame(
  "Face 1"=c('A', 'A', 'A', 'A'), 
  "Face 2"=c('B', 'B', 'B', 'B'),
  "Face 3"=c('C', 'C', 'C', 'C')
  )

random_board(3, alt_dice)

Solving

TODO: Solving a given cell

board

TODO: Solving a board

Scoring

TODO: Score words

TODO: Score boards



ezgraphs/rbogglesolver documentation built on May 16, 2019, 9:56 a.m.