npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

wordle-sidekick

v1.0.29

Published

A companion CLI solver to play competitive Wordle, or just for fun!

Downloads

37

Readme

Introduction

I think Wordle is actually more fun when you can cheat (just a little)! Use this CLI solver app when you play online, or play alone. It's also a great illustration of the application of Information Theory to play Wordle using a statistically optimal strategy. In the case of Wordle we want to maximize the amount of information that can be obtained from each guess by first computing the average expected value, also known as the Von Neumann entropy, for each word in the game's dictionary:

wordle3

A sorted list of word and entropy tuples is then used to play the game. See 3Blue1Brown's video Solving Wordle Using Infformation Theory for an excellent in-depth discussion of how the algorithm works.

It would be be boring if you cheated at every turn so don't! Play against a Wordle site and have a peek at the top guesses only when you're really stumped. It's fun to see how far you can get without a 'cheat' and a relief to know you can when you want to. You can also play with different word sizes: 4-10 chars are supported.

Example Usage

  1. Play against an online site, manually entering the hints the site provides (b/g/y are mnemonics for black, green, yellow):

wordle-sidekick

? Play mode: m

? Guess, hint: rates bybyb

... wordle0

  1. Play against the app:

? Play mode: a

? Guess: rates

... wordle1

Note:

  • You can hit 'q' at any time to quit. 'h' for help to come. 't' to see a play loop of 10 games with random words and guesses.
  • You can press return repeatedly while viewing the 'cheat' list to see more results (sorted by entropy descending)
  • An index value (1-99) can be used for any guess in the list as long as it is valid.

Try out other word sizes.

There's at least one site out out there which supports this that you can play against - https://wordlegame.org/ The nature of the game changes a bit for other word sizes, anyway they're interesting to watch in a play loop:

Pass either the word-size or the play mode on the command line or both:

wordle-sidekick 8 t

wordle4

Implementation

  • CLI is a simple JS file, written semi-pedantically to illustrate the algorithm.

  • Data fles (/frequencies/*.json) used by CLI are built by a straightforward Python file.

The word frequencies are incorporated to threshold guess choices, which is pretty neat and something I struggled with until I found 3b1b's video. All data files All entropy and frequency files are generated from google_word_frequencies and wordle_original_words using tools.py. I didn't think it worth it to put these in a dev dependency.