Wordle-solver - Evaluates the efficacy of Wordle algorithms

Overview

Wordle Solver

Wordle solver harness that evaluates the efficacy of any given algorithm.

This code tests every answer against any given algorithm to see how fast it solves them, then spits out a histogram.

Got an algorithm you want to try? Open a pull request!

Usage

Just hit $ ./gradlew run to get things started.

Warning: some of the algorithms can be pretty slow when iterated over every answer!

Results

Knuth

Based on Knuth's Mastermind algorithm.

Normal:

Solved in 1 guess(es): 1
Solved in 2 guess(es): 53
Solved in 3 guess(es): 990
Solved in 4 guess(es): 1162
Solved in 5 guess(es): 107
Solved in 6 guess(es): 2
Failed to solve: 0
Average # guesses: 3.5732181425485963

Hard:

Solved in 1 guess(es): 1
Solved in 2 guess(es): 89
Solved in 3 guess(es): 907
Solved in 4 guess(es): 1054
Solved in 5 guess(es): 209
Solved in 6 guess(es): 40
Failed to solve: 15
Average # guesses: 3.652608695652174

You might also like...
Visualizes various sorting algorithms

Sorting Visualizer πŸ“œ Description Visualizing sorting algorithms πŸ“Š for learning

Chat App is built to demonstrate a simple end-to-end chat encryption using RSA and AES algorithms
Chat App is built to demonstrate a simple end-to-end chat encryption using RSA and AES algorithms

End-to-End Encrypted Chat πŸ”’ Chat App is built to demonstrate a simple end-to-end chat encryption using RSA and AES algorithms Built With βš’οΈ Jetpack C

Kotlin Algorithms and Design Patterns
Kotlin Algorithms and Design Patterns

Kotlin Algorithms and Design Patterns This repository lists the most common algorithms, data structures, and design patterns written in the Kotlin pro

Bring together all of the remarkable Computer Graphics Algorithms in one place πŸš€
Bring together all of the remarkable Computer Graphics Algorithms in one place πŸš€

Compose Computer Graphics Playground πŸš€ "There was an idea to bring together all of the remarkable Computer Graphics Algorithms in one place. And keep

Collection of various algorithms in mathematics, computer science etc implemented in Kotlin for educational purposes.

The Kotlin Algorithms Implementation of different algorithms and data structures using Kotlin lang Overview The repository is a collection of open-sou

WordMasterKMP - WIP Kotlin Multiplatform sample inspired by Wordle and also Word Master web sample
WordMasterKMP - WIP Kotlin Multiplatform sample inspired by Wordle and also Word Master web sample

WordMasterKMP WIP Kotlin Multiplatform sample inspired by Wordle and also Word M

Wordle game clone written in Kotlin & using Compose UI Toolkit.
Wordle game clone written in Kotlin & using Compose UI Toolkit.

Wordle Compose Wordle game clone written in Kotlin & using Compose UI Toolkit. Screenshots Compose for Desktop Main screens Playing Victory End of gam

Wordle is an interesting game. Let's solve it!

wordle Wordle is an interesting game. Let's solve it! Algorithm The algorithm is simple: On the first attempt, guess the highest ranked word in the di

WordGuess - A portuguese game inspired in the world fever wordle game
WordGuess - A portuguese game inspired in the world fever wordle game

WordGuess WordGuess is a portuguese game inspired in the world fever wordle game

Faradle - Wordle made in Jetpack Compose
Faradle - Wordle made in Jetpack Compose

Faradle The famous Wordle game created with Jetpack Compose The logic is fully u

WordleSolver - Wordle solving application made with Compose
WordleSolver - Wordle solving application made with Compose

WordleSolver Wordle solving application made with Compose for Desktop. Screensho

WordleSolver - A small attempt to solve the Wordle game (in Spanish) without thinking too much

Wordle solver A small attempt to solve the Wordle game (in Spanish) without thin

WordleFX - Wordle in JavaFX and Kotlin
WordleFX - Wordle in JavaFX and Kotlin

Wordle This simple game is everywhere right now (the beginning of 2022) and it s

The Destiny lore word game, that's definitely not just a worse version of Wordle!

Wormdle The Destiny lore word game, that's definitely not just a worse version of Wordle! Why not use an existing clone? Ever wanted to play Wordle, b

Comments
  • Improve the performance of KnuthSolver by x50

    Improve the performance of KnuthSolver by x50

    According to a Wikipedia article, I believe we can count the number of possible targets generating the same hint for a guess to compute the score of the guess instead. The change produces the same histogram so I believe this does not change the behaviour.

    The code might not be idiomatic from Kotlin point of view. Feel free to add any modifications to it. Thanks!

    Bench mark environment

    Ubuntu 20.04 (Core i7-8700 3.2GHz x6)

    Result (before)

    Computing KnuthSolver Histogram... (could take a while)!
    Solved in 1 guess(es): 1
    Solved in 2 guess(es): 53
    Solved in 3 guess(es): 990
    Solved in 4 guess(es): 1162
    Solved in 5 guess(es): 107
    Solved in 6 guess(es): 2
    Failed to solve: 0
    Average # guesses: 3.5732181425485963
    Completed in 3446 second(s)!
    
    Computing KnuthSolver Histogram (hard mode)... (could take a while)!
    Solved in 1 guess(es): 1
    Solved in 2 guess(es): 89
    Solved in 3 guess(es): 907
    Solved in 4 guess(es): 1054
    Solved in 5 guess(es): 209
    Solved in 6 guess(es): 40
    Failed to solve: 15
    Average # guesses: 3.652608695652174
    Completed in 1777 second(s)!
    

    Result (after)

    Computing KnuthSolver Histogram... (could take a while)!
    Solved in 1 guess(es): 1
    Solved in 2 guess(es): 53
    Solved in 3 guess(es): 990
    Solved in 4 guess(es): 1162
    Solved in 5 guess(es): 107
    Solved in 6 guess(es): 2
    Failed to solve: 0
    Average # guesses: 3.5732181425485963
    Completed in 90 second(s)!
    
    Computing KnuthSolver Histogram (hard mode)... (could take a while)!
    Solved in 1 guess(es): 1
    Solved in 2 guess(es): 89
    Solved in 3 guess(es): 907
    Solved in 4 guess(es): 1054
    Solved in 5 guess(es): 209
    Solved in 6 guess(es): 40
    Failed to solve: 15
    Average # guesses: 3.652608695652174
    Completed in 36 second(s)!
    
    opened by hkurokawa 1
Owner
Daniel Lew
Daniel Lew
Wordlesolver - Wordle (Gurgle) solver with code from Wordle-Solver

WordleSolver Wordle (Gurgle) solver with code from https://github.com/PoorLazyCo

Bill Farmer 9 Nov 27, 2022
Wordle-solver - This application supports in finding the correct answer to the daily word puzzle game Wordle

Wordle-solver - This application supports in finding the correct answer to the daily word puzzle game Wordle

Jiri Bakker 1 Jan 19, 2022
Wordle-clone-android - A Wordle Clone For Android

wordle-clone-android A Wordle Clone For Android Setup Add answer-bank.txt to the

Donovan LaDuke 5 Jul 17, 2022
Sally - Simple Algebraic Linear equations solver

Sally Sally is a simple solver for Simple Algebraic Linear equations. Platform-a

Mykyta Sikriier 2 May 2, 2022
A non-linear problem solver using automatic differentiation and penalty methods.

HelixOptimizer Join the discord and contribute! https://discord.gg/kqe74EER A non-linear problem solver using automatic differentiation and penalty me

Triple Helix 0 Oct 18, 2022
A simple Water Board solver.

WaterSolver A simple Water Board solver. Some variants are very wrong! No need to report this... For now this is it. Might update the mod by being abl

null 4 Nov 18, 2022
Algorithms and data structures in Kotlin.

Here you can find the most common algorithms and data structures written in Kotlin. The goal of this project is to create the most eloquent implementa

Boris Maslakov 805 Dec 26, 2022
An Android application which visualizes some of the famous Algorithms for finding path from Source to Destination in a 2D grid.

Pathfinding-Visualizer An Android application which visualizes some of the famous Algorithms for finding path from Source to destination in a 2D grid.

Pranjal Mishra 37 Aug 8, 2022
A visualization tool for various pathfinding algorithms.

Pathfinding Visualizer Welcome to Pathfinding Visualizer! I built this application because I was fascinated by pathfinding algorithms, and I wanted to

ClΓ©ment Mihailescu 1.5k Dec 27, 2022
This repo contains my solutions to some data structures and algorithms problems on leetcode.

DSA Playground This repository contains solutions to dsa problems in kotlin. NOTE: This file will get long, please consider using <Ctrl>F DSA With Kun

Hardik Sachan 2 Dec 9, 2021