Giter Club home page Giter Club logo

wordle's Introduction

Wordle Recommender

A naive way to generate suggestions for the game of wordle

Instructions

In order to start the script simply run python main.py and follow the screen prompts. The script makes calls to datamuse api. For example, if you pass https://api.datamuse.com/words?sp=t??k to the api, the api will return "all the words that start with t, end in k, and have two letters in between".

Some Notes

  • Here is a sample video of how it works.
  • The algorithm starts with a bunch of precusrsor suggestions. I just picked whatever word that came to my mind. One doesn't have to follow them. You can simply put whatever word you see as better fit.
  • Once you make a suggestion, you then have to give a feedback to the script on how well the suggestions are by specifying something like iicai. c:correct letter, correct spot a:correct letter, wrong spot i:wrong letter
  • After the feedback, the algorithm check which of the chars were correct and which ones are at the wrong place. Let's say the suggestion was tesla but the actual word is their so the feedback should be caiia which you can infer based on the colors in the game. Once done, the algorithm then calls the api with the following query. t???? which means that find all the 5 letter words that start with t. Among those, it then searches for the words that are allowed by checking which of the chars are among the forbidden chars. Please check the code for more details.
  • It is designed for the hard mode of wordle but it should work with easy mode too.
  • Although I tried it with a lot of wordle archive cases and it worked but it might fail at some of the edge cases.
  • The algorithm that I used might not be the most efficient ones in terms of big O. It has elements of brute force in it.

wordle's People

Contributors

rozbeh 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.