Coder Social home page Coder Social logo

ukmiitb / wordlehelper Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.07 MB

This script helps to solve wordle game in less than a minute, giving highly accurate suggestions

License: MIT License

Python 55.22% Procfile 0.41% HTML 6.97% JavaScript 37.40%

wordlehelper's Introduction

WordleHelper

This script provides api endpoints for getting highly accurate guesses for wordle game
If you want to run it as simple python code, checkout version1 branch from this repo
Integrating a simple frontend to use these API's has been carried out by https://github.com/ayushpuri1012

How to use

  1. The base url for the api endpoint is https://wordle-helper-app.herokuapp.com/
    On hitting this url, it'll just return text Welcome to Wordle Helper API

  2. The main url for getting predictions results is https://wordle-helper-app.herokuapp.com/suggestion
    Following points needs to be considered while accessing this endpoint
    Request Type: POST
    Header -> Content-Type: application/json
    Body: {
    "guess_word": "beast",
    "guess_word_result": "yyggb",
    "iteration": 2,
    "word_list": ["abc", "def", "ghi"]
    }
    guess_word: Is the word that was actually guessed in wordle game
    guess_word_result: Is the result of the guess word from wordle game. b is for black, y for yellow & g for green
    iteration: The current iteration going on. Make sure it starts with 1
    word_list: For each request sent, server would send back list of possible result words. Pass this list as word_list for next guess
    For iteration= 1, word_list should be an empty list

  3. Response from API: {
    "status": 200,
    "suggestion_result": [ "boral", "coral", "goral" ]
    }

    User should pick one word from suggestion_result, preferably word which is a common word & with distinct characters.
    For next guess, while making API call, result of suggestion_result should be sent as word_list

  4. If the 1st request is sent with x as word length then its upto frontend user to ensure all subsequent request are for same word length & that guess_word_result is also of same length as x. If this is not followed, API might return error response

  5. A sample web UI is added in this project in the folder frontend. To run this, you can clone this project, go to frontend/src/App.js in terminal and run npm start

  6. On running the code it'll have 2 input field. Enter the guess & Enter the response from wordle
    The 1st guess should come from user, then enter that word in guess field & that same word in wordle game and the output from wordle game should be added in Enter the response from wordle field and press Submit

  7. It'll return list of possible words for next guess. Pick any one word from this list, preferably word which is common & has distinct characters and enter the same as next guess word in UI as well in wordle game & the result of wordle in response field. The next set of suggestions would keep on shrinking and quickly reaching to exact word in few iterations

  8. Just remember, from the suggested list of words given out by code always try to pick the most common word

wordlehelper's People

Contributors

ukmiitb avatar

Watchers

 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.