Coder Social home page Coder Social logo

wordle's Introduction

wordle bot

Table of contents

Introduction

This is a solver for wordle.

The goal is to make a bot that can beat most humans (on average).

Setup

Install python3.

No dependencies yet, so no setup environment.

Usage

To use the tool, run:

python ./src/wordle.py

Here's some example output:

> python ./src/wordle.py
Loaded 12972 words.
Round 1, guess: SEASE
Was it right? bbybb
Round 2, guess: RORAL
Was it right? bbbyb
Round 3, guess: NANNA
Was it right? bggbb
Round 4, guess: TANTY
Was it right? bggbb
Round 5, guess: MANIC
Was it right? bgggg
Round 6, guess: PANIC
Was it right? ggggg
Hooray!

You can also run in test mode to see how it performs for a specific word:

> python ./src/wordle.py -t panic
Loaded 12972 words.
Running test for word: PANIC
Round 1, guess: SEASE
Was it right? โฌ›โฌ›๐ŸŸจโฌ›โฌ›
Round 2, guess: RORAL
Was it right? โฌ›โฌ›โฌ›๐ŸŸจโฌ›
Round 3, guess: NANNA
Was it right? โฌ›๐ŸŸฉ๐ŸŸฉโฌ›โฌ›
Round 4, guess: TANTY
Was it right? โฌ›๐ŸŸฉ๐ŸŸฉโฌ›โฌ›
Round 5, guess: MANIC
Was it right? โฌ›๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
Round 6, guess: PANIC
Was it right? ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
Hooray!

Wordle bot 6/6

โฌ›โฌ›๐ŸŸจโฌ›โฌ›
โฌ›โฌ›โฌ›๐ŸŸจโฌ›
โฌ›๐ŸŸฉ๐ŸŸฉโฌ›โฌ›
โฌ›๐ŸŸฉ๐ŸŸฉโฌ›โฌ›
โฌ›๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ

You can also run it for a set of test words and get statistics:

> python ./src/wordle.py -s boost tiger query drink     
Loaded 12972 words.
BOOST: 3
TIGER: 4
QUERY: 5
DRINK: 5

STATISTICS
Played: 4, Win %: 100%, Won: 4, Failed: 0, Mean: 4.2
1: 0
2: 0
3: 1 ๐ŸŸฉ
4: 1 ๐ŸŸฉ
5: 2 ๐ŸŸฉ๐ŸŸฉ
6: 0

To see all options, run:

python src/wordle.py -h

Contribute

This repo isn't quite ready for contributions yet, but message me if you're interested.

A couple of notes:

  • word_lists/alpha.txt sourced from dwyl/english-words.
  • word_lists/wordle.txt sourced from the JavaScript of the wordle site.

wordle's People

Contributors

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