Coder Social home page Coder Social logo

qordle's People

Watchers

 avatar

qordle's Issues

In a guessing game, use a word which returns the maximum information

In the case the secret word is layer, the algorithms fail to identify the secret quickly because so many words have a similar construction. In this case, if the edit distance for all the remaining words is 1 then find a word which has as many of remaining letters as possible for the next guess.

~ > qordle suggest so~a~r~e dAtER gApER LAcER
["laker","lamer","laver","lawer","laxer","layer"]
~ > qordle play layer | jq
{
  "secret": "layer",
  "strategy": "frequency",
  "rounds": [
    {
      "dictionary": 12947,
      "next": "dater",
      "scores": [
        "so~a~r~e"
      ],
      "words": [
        "soare"
      ],
      "success": false
    },
    {
      "dictionary": 257,
      "next": "gaper",
      "scores": [
        "so~a~r~e",
        "dAtER"
      ],
      "words": [
        "soare",
        "dater"
      ],
      "success": false
    },
    {
      "dictionary": 66,
      "next": "lacer",
      "scores": [
        "so~a~r~e",
        "dAtER",
        "gApER"
      ],
      "words": [
        "soare",
        "dater",
        "gaper"
      ],
      "success": false
    },
    {
      "dictionary": 42,
      "next": "laker",
      "scores": [
        "so~a~r~e",
        "dAtER",
        "gApER",
        "LAcER"
      ],
      "words": [
        "soare",
        "dater",
        "gaper",
        "lacer"
      ],
      "success": false
    },
    {
      "dictionary": 6,
      "next": "lamer",
      "scores": [
        "so~a~r~e",
        "dAtER",
        "gApER",
        "LAcER",
        "LAkER"
      ],
      "words": [
        "soare",
        "dater",
        "gaper",
        "lacer",
        "laker"
      ],
      "success": false
    },
    {
      "dictionary": 5,
      "next": "laver",
      "scores": [
        "so~a~r~e",
        "dAtER",
        "gApER",
        "LAcER",
        "LAkER",
        "LAmER"
      ],
      "words": [
        "soare",
        "dater",
        "gaper",
        "lacer",
        "laker",
        "lamer"
      ],
      "success": false
    },
    {
      "dictionary": 4,
      "next": "lawer",
      "scores": [
        "so~a~r~e",
        "dAtER",
        "gApER",
        "LAcER",
        "LAkER",
        "LAmER",
        "LAvER"
      ],
      "words": [
        "soare",
        "dater",
        "gaper",
        "lacer",
        "laker",
        "lamer",
        "laver"
      ],
      "success": false
    },
    {
      "dictionary": 3,
      "next": "laxer",
      "scores": [
        "so~a~r~e",
        "dAtER",
        "gApER",
        "LAcER",
        "LAkER",
        "LAmER",
        "LAvER",
        "LAwER"
      ],
      "words": [
        "soare",
        "dater",
        "gaper",
        "lacer",
        "laker",
        "lamer",
        "laver",
        "lawer"
      ],
      "success": false
    },
    {
      "dictionary": 2,
      "scores": [
        "so~a~r~e",
        "dAtER",
        "gApER",
        "LAcER",
        "LAkER",
        "LAmER",
        "LAvER",
        "LAwER",
        "LAxER"
      ],
      "words": [
        "soare",
        "dater",
        "gaper",
        "lacer",
        "laker",
        "lamer",
        "laver",
        "lawer",
        "laxer"
      ],
      "success": false
    },
    {
      "dictionary": 1,
      "scores": [
        "so~a~r~e",
        "dAtER",
        "gApER",
        "LAcER",
        "LAkER",
        "LAmER",
        "LAvER",
        "LAwER",
        "LAxER",
        "LAYER"
      ],
      "words": [
        "soare",
        "dater",
        "gaper",
        "lacer",
        "laker",
        "lamer",
        "laver",
        "lawer",
        "laxer",
        "layer"
      ],
      "success": true
    }
  ]
}
{
  "secret": "years",
  "strategy": "frequency",
  "rounds": [
    {
      "dictionary": 12947,
      "next": "bears",
      "scores": [
        "~soAR~e"
      ],
      "words": [
        "soare"
      ],
      "success": false
    },
    {
      "dictionary": 12,
      "next": "dears",
      "scores": [
        "~soAR~e",
        "bEARS"
      ],
      "words": [
        "soare",
        "bears"
      ],
      "success": false
    },
    {
      "dictionary": 11,
      "next": "fears",
      "scores": [
        "~soAR~e",
        "bEARS",
        "dEARS"
      ],
      "words": [
        "soare",
        "bears",
        "dears"
      ],
      "success": false
    },
    {
      "dictionary": 10,
      "next": "gears",
      "scores": [
        "~soAR~e",
        "bEARS",
        "dEARS",
        "fEARS"
      ],
      "words": [
        "soare",
        "bears",
        "dears",
        "fears"
      ],
      "success": false
    },
    {
      "dictionary": 9,
      "next": "hears",
      "scores": [
        "~soAR~e",
        "bEARS",
        "dEARS",
        "fEARS",
        "gEARS"
      ],
      "words": [
        "soare",
        "bears",
        "dears",
        "fears",
        "gears"
      ],
      "success": false
    },
    {
      "dictionary": 8,
      "next": "lears",
      "scores": [
        "~soAR~e",
        "bEARS",
        "dEARS",
        "fEARS",
        "gEARS",
        "hEARS"
      ],
      "words": [
        "soare",
        "bears",
        "dears",
        "fears",
        "gears",
        "hears"
      ],
      "success": false
    },
    {
      "dictionary": 7,
      "next": "nears",
      "scores": [
        "~soAR~e",
        "bEARS",
        "dEARS",
        "fEARS",
        "gEARS",
        "hEARS",
        "lEARS"
      ],
      "words": [
        "soare",
        "bears",
        "dears",
        "fears",
        "gears",
        "hears",
        "lears"
      ],
      "success": false
    },
    {
      "dictionary": 6,
      "next": "pears",
      "scores": [
        "~soAR~e",
        "bEARS",
        "dEARS",
        "fEARS",
        "gEARS",
        "hEARS",
        "lEARS",
        "nEARS"
      ],
      "words": [
        "soare",
        "bears",
        "dears",
        "fears",
        "gears",
        "hears",
        "lears",
        "nears"
      ],
      "success": false
    },
    {
      "dictionary": 5,
      "next": "tears",
      "scores": [
        "~soAR~e",
        "bEARS",
        "dEARS",
        "fEARS",
        "gEARS",
        "hEARS",
        "lEARS",
        "nEARS",
        "pEARS"
      ],
      "words": [
        "soare",
        "bears",
        "dears",
        "fears",
        "gears",
        "hears",
        "lears",
        "nears",
        "pears"
      ],
      "success": false
    },
    {
      "dictionary": 4,
      "next": "wears",
      "scores": [
        "~soAR~e",
        "bEARS",
        "dEARS",
        "fEARS",
        "gEARS",
        "hEARS",
        "lEARS",
        "nEARS",
        "pEARS",
        "tEARS"
      ],
      "words": [
        "soare",
        "bears",
        "dears",
        "fears",
        "gears",
        "hears",
        "lears",
        "nears",
        "pears",
        "tears"
      ],
      "success": false
    },
    {
      "dictionary": 3,
      "scores": [
        "~soAR~e",
        "bEARS",
        "dEARS",
        "fEARS",
        "gEARS",
        "hEARS",
        "lEARS",
        "nEARS",
        "pEARS",
        "tEARS",
        "wEARS"
      ],
      "words": [
        "soare",
        "bears",
        "dears",
        "fears",
        "gears",
        "hears",
        "lears",
        "nears",
        "pears",
        "tears",
        "wears"
      ],
      "success": false
    },
    {
      "dictionary": 2,
      "scores": [
        "~soAR~e",
        "bEARS",
        "dEARS",
        "fEARS",
        "gEARS",
        "hEARS",
        "lEARS",
        "nEARS",
        "pEARS",
        "tEARS",
        "wEARS",
        "YEARS"
      ],
      "words": [
        "soare",
        "bears",
        "dears",
        "fears",
        "gears",
        "hears",
        "lears",
        "nears",
        "pears",
        "tears",
        "wears",
        "years"
      ],
      "success": true
    }
  ]
}

speculation should only return words as the same length of the secret

~ > qordle play -w qordle -S mound
2023-02-15T19:33:20+01:00 ERR score guess=ophthalmophlebotomy secret=mound
2023-02-15T19:33:20+01:00 ERR qordle error="secret: mound : secret and guess lengths do not match" stack=[{"func":"play","line":"177","source":"play.go"},{"func":"(*Command).Run","line":"273","source":"command.go"},{"func":"(*Command).Run","line":"266","source":"command.go"},{"func":"(*App).RunContext","line":"332","source":"app.go"},{"func":"main","line":"78","source":"main.go"},{"func":"main","line":"250","source":"proc.go"},{"func":"goexit","line":"1172","source":"asm_arm64.s"}]

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.