mdsalem17 / Scrabble-Player

Implementing a Scrabble Solver using C++ and GADDAG data structure

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Scrabble Solver Projet

The aim of this project was to program an automatic Scrabble player capable of determining the move with the most points using the GADDAG data structure.

Usage

Clone or download and unzip the archive. Compiling this repository is done using the premake4 command. You must therefore verify that it is installed. For that, you can use apt policy premake4 or dpkg -l premake4. Otherwise, Premake packages are available for most linux distributions.

To compile the program type:

premake4 gmake
make

To launch it type:

./bin/main

Options

To make it easier for you to get started, we made several options that can help you debug and better visualize the results.

To slow down the scrolling of the game

./bin/main --slow [seconds: optional]

Debugging mode

This mode helps you debug the game using a saved instance of the board and a particular hand to visualize the results

To get the best move using a board in text format

./bin/main --suzette-text [board] [hand]

Example :

./bin/main --suzette-text ................................................................................................................B.........P....A.........E....T.........R....E.........L....A.........ESBROUFA.......R........................... EELMSTT

To get the best move using a board saved in a (.txt) file

./bin/main --suzette-file [filename]

Example:

./bin/main --suzette-file ./data/boards/board3.txt

P.S. when launching the solver in the normal mode, all the boards are saved in the folder ./data/boards

Other debugging options

You can use the following options:

  • -case, -c [number] -> to choose a particular starting CASE using a [number] included between [0, 224]
  • -vertical, -v -> to search, the best move, vertically
  • -horizontal, -h -> to search, the best move, horizontally

Example:

./bin/main --suzette-file ./data/boards/board3.txt -case 200 -vertical

Need some help?

You can use the help option to visualize all the available options (with their explanation)

./bin/main --help

or

./bin/main --h

Project details

This project was developped by Khaled Abdrabo and Salem Messoud during the 3rd year of our Computer Science bachelor's degree in Claude Bernard University - Lyon 1.

About

Implementing a Scrabble Solver using C++ and GADDAG data structure


Languages

Language:C++ 97.6%Language:Lua 2.3%Language:Batchfile 0.1%