Coder Social home page Coder Social logo

blitzkrieg's Introduction

About

Blitzkrieg is a solver for the currently popular Facebook Messenger game "Word Blitz". Blitzkrieg generates solutions for Word Blitz provided with sixteen letters that match the same arrangement of the Word Blitz puzzle.

Possible words are generated by using each letter as a starting point and then traversing the grid of letters by moving to the next adjacent letter. After each move, the total letters traversed thus far are checked against an English lexis in order to determine if the current collection of letters makes a valid word or not.

Compiling

Navigate to the root directory of the project and type make. This should generate the executable file blitzkrieg.out.

Executing

Type ./blitzkrieg.out to execute the solver. You will be presented with a prompt where you must type sixteen letters that represent the Word Blitz puzzle. Type the letters as the appear in Word Blitz row by row from top to bottom. After typing press enter.

Blitzkrieg should output 16 columns of text with each column headed by the rank of the letter as it appeared in the original puzzle. Each column consists of the possible words that can be formed starting from that letter.

If the letter grid is like the image below; the input would be "abcdefghijklmnop"

Letter Grid

Commands

If the word test is typed the letters used will be the first 16 letters of the English alphabet.

Configuring

At startup Blitzkrieg loads a configuration file (config.conf) which contains some options that can be modified. A description of the options along with their default values are in the table below.

Option Description Default
MAX_WORD_LENGTH Most letters a word should have 9
MIN_WORD_LENGTH Least letters a word should have 3
MAX_WORDS_PER_ROW Number of words shown before repeating column header 15
WORD_COLUMNS_PER_ROW Number of columns of words to show per row 16
SORT_DESCENDING Sort words in descending order True
ENABLE_HIGHLIGHTING Highlight word columns and words with rare letters True
HIGHLIGHT_LETTERS Words containing these letters are highlighted. xqzjy
LEXIS_FILE_PATH Path to file with list of words lexis

The default options should be fine on most systems. If your display is small and/or does not support coloured text, adjust values of MAX_WORDS_PER_ROW, WORD_COLUMNS_PER_ROW and ENABLE_HIGHLIGHTING respectively.

Miscellaneous

The data structure used to store the lexis is a Trie. While this is a fairly efficient data structure for the words, a more space-efficient structure such as a radix trie can be used. Such an implementation change should be trivial since the code is quite loosely coupled. So feel free to make this change yourself if necessary. Otherwise I'll get to it sometime later when I have more time :-).

Last Modified Sun 10 Feb 15:50:23 GMT 2019

blitzkrieg's People

Contributors

maxbaird avatar

Watchers

 avatar  avatar

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.