Coder Social home page Coder Social logo

hayden1126 / wordle-solver Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 99 KB

Wordle Solver is a CLI-based program that assists solving the Wordle game.

Home Page: https://www.nytimes.com/games/wordle/index.html

License: MIT License

Julia 100.00%
wordle wordle-assistant wordle-cheats wordle-helper wordle-solver julia julialang

wordle-solver's Introduction

Wordle Solver License: MIT

Wordle Solver is a CLI-based program that assists solving the Wordle game on https://www.nytimes.com/games/wordle/index.html .

  • The program works by filtering words using your input and recommending you words to guess for more information.
  • The program is coded in Julia and tested for Julia v1.8.4 (should work for most other versions too)

Table of contents:

Introduction

Wordle is a game where you have to guess a 5-letter word. You have 6 tries and your tries will give you information on whether the actual word has the letters you guessed or not as well as positions of letters in the actual word. Wordle Solver helps you get the words that fit the information that the game has given you from your guesses.

Installation

  1. Have the Julia programming language installed here, and make sure it is accessible by running julia in the command line.

  2. Clone this git or download all its files onto your computer.

  3. Using your command line, run the setup script which setups the necessary packages (make sure you are in the right directory):

    julia setup.jl
    
  4. To run the main script, run:

    julia run.jl
    

Program Guide

  • Start by running the main script: julia run.jl

  • The program works by filtering words using your input, so you need to get some information about the word on Wordle beforehand.

    • First, type in 1 to 2 words, example:

      image

      Information you can get:

      • Gray letters: The actual word does not contain any gray letters.
      • Yellow letters: The actual word contains the yellow letter but not at that character position.
      • Green letters: The actual word contains the green letter at that exact position.
  • Next, you can input the information into the running script according to the following 4 Types of input:

    1. General conditions - what letters are in the actual word or not (ignoring their position)

    • For the above example, input: ie/abdcough
      • letters before the dash '/' represent letters that the actual word contain (green and yellow letters)
      • letters after the dash '/' represent letters that the actual word does not contain (gray letters)
      • *You can input/type these conditions in any order or separately, so you can input /abcdough, press enter, then input ie, and this will do the same thing

    2. Specific conditions

    • For the above example, you can input: 2ne and 3nr separately
    • For 2ne: 2 represents the position of the letter; n means not/no; e represents the letter
    • So this means the '2'nd character of the actual word is not 'e'
    • You can also type multiple letters after 'n', example: 1nenp means 1st character is not e, n, or p
    • Conversely, you can input 3yi meaning the 3rd character of the actual word is i (y representing yes/is)

    3. Repeating conditions

    • If the word has repeated letters, for example if there are 2 or MORE 'e's in the word, input er2 meaning e repeats AT LEAST 2 times
    • If the letter only repeats EXACTLY 2 times, input eo2 meaning e repeats ONLY 2 times

    4. Special commands/inputs

    • input 1g or 1g <optional number> to view/print out that number of recommended words (words that can help you get the most amount of information)
    • input 1gp to view recommended words from only possible words (used for Hard mode)
    • input 1v to view/print out a list of the filtered possible words
    • input 1av to turn ON Auto-View (which automatically prints out the list of filtered words every time you input something)
    • input 1avoff to turn OFF Auto-View (This is turned back on if the number of possible words left is 10 or less)
    • input 1i to view all the information you have previously inputted (limited to what letters are in or not in the actual word)
    • input 1u to undo your last input. You can undo more than once, but you cannot reverse your undo
    • input 1r or reset to Reset the program
    • input 1e or exit to End program (Program ends automatically when the Wordle has been solved)
    • input 1w to launch the official Wordle website onto your browser
    • input 1wu to launch Wordle Unlimited onto your browser
    • input 1h or help or ? to list descriptions for each special command
  • For the above example, after inputing the filtering conditions, I would type 1g to get some recommended words:

    image

  • Then I would guess the first word in the recommended list:

    image

  • Then input the conditions again:

    image

  • Wow! This is great, I do not even have to input more conditions such as 3nt and 5yd, and we already got the answer to the wordle!

    image

Features

  • Wordle Solver is a prettified program and outputs nicely, it also outputs dynamically based on the size of your Terminal window:

image

  • Wordle Solver will check for invalid inputs:

image

Afterword

Wordle Solver started out as a mini-project made in a weekend. Now, a lot more functions have been added. However, there are still improvements to be made, more updates coming soon!

License License: MIT

All code in this repository is licensed under The MIT License (MIT)

Copyright (c) 2023 Hayden Leung

wordle-solver's People

Contributors

hayden1126 avatar

Stargazers

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