Giter Site home page Giter Site logo

ngram-wordle's Introduction

wordle-pysolver

Description

Mini side project to create the wordle game and a simple solver with the word list as input. Exploring the use of rich python library and specific python3 features such as type hints.

Playing the game manually

Running python game.py will start a manual game with a randomly selected word (from the 2315 words list).

Guessing valid 5 letters words will show the result of each guess. The Game will finish when the correct word is guessed or when the player reaches 6 incorrect guesses.

Running the tester

The tester is used to automatically run many games given a particular solver class (found in solver.py). The number of games won, average number of guesses and the time taken to play the games are shown. Run using python tester.py [WORD_LIST_FILEPATH] where the first argument points to the filepath for the words list.

Create wordle solver

  • Read file of all possible 5 letter words
  • Write wordle game logic, enum for guess states
  • Develop pruning word list algorithm for playing game, starting off with random
  • Score word list by frequency of letters
  • Score based on position of letter
  • Use ngrams for sorting

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.