Implement Scrabble move generator (DAWG) with English and Russian rules
A Go library that returns every legal play ranked by score and scores or validates plays, using the Appel-Jacobson DAWG algorithm over github.com/iliadenisov/dafsa v1.1.0. - DAWG move generation (across / down / both), full tournament scoring with a per-tile breakdown; public Solver: GenerateMoves (ranked), ScorePlay, ValidatePlay. - Rulesets: English Scrabble, Russian Scrabble, Эрудит (parameterizable Ruleset). - cmd/builddict (build the DAWG from the dictionaries submodule), cmd/stress (self-play benchmark), selfplay engine; brute-force test oracle. - A GADDAG was implemented, benchmarked and removed (the DAWG was smaller and faster for a scoring solver); see RESULTS.md and ALGORITHM.md.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package scrabble
|
||||
|
||||
import (
|
||||
"scrabble-solver/board"
|
||||
"scrabble-solver/rack"
|
||||
)
|
||||
|
||||
// Generator produces every legal play for a position. The DAWG generator
|
||||
// (Appel-Jacobson) is the implementation; the interface keeps the self-play engine and
|
||||
// the solver decoupled from the concrete type.
|
||||
type Generator interface {
|
||||
// GenerateMoves returns every legal play for rack r on board b in the modes'
|
||||
// orientations. The result is unsorted; callers (or the Solver) rank it.
|
||||
GenerateMoves(b *board.Board, r rack.Rack, mode Mode) []Move
|
||||
|
||||
// Name identifies the generator (e.g. "dawg").
|
||||
Name() string
|
||||
}
|
||||
Reference in New Issue
Block a user