weldor


Nameweldor JSON
Version 3.6.2024 PyPI version JSON
download
home_pagehttps://github.com/ayaanhossain/weldor
Summaryweldor - A reactive AI designed to assist you with Wordle variants
upload_time2024-03-07 03:55:04
maintainer
docs_urlNone
authorayaanhossain
requires_python>=3.6
license
keywords reactive ai artificial intelligence entropy wordle trees sets wordle-solver wordle-python wordle-assistant wordle-solution wordle-game wordle-helper
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h1 align="center">
    <a href="https://github.com/ayaanhossain/weldor/">
        <img src="https://raw.githubusercontent.com/ayaanhossain/repfmt/main/weldor/img/logo.svg"  alt="weldor" width="270" class="center"/>
    </a>
</h1>

<p align="center">
  <a href="#weldor-in-Action">weldor in Action!</a> •
  <a href="#Installation">Installation</a> •
  <a href="#World-of-Wordle">World of Wordle</a> •
  <a href="#Modifying-weldor">Modifying weldor</a> •
  <a href="#License">License</a>
</p>


`weldor` is a simple reactive AI designed to assist you in playing [Wordle](https://www.powerlanguage.co.uk/wordle/) and [some of its derivatives](https://www.cnet.com/tech/gaming/wordle-spinoffs-other-word-games-to-try-if-you-cant-get-enough/). Rather than just giving you [a single answer with the highest entropy](https://www.nme.com/news/gaming-news/wordle-fan-uses-maths-to-find-the-statistically-best-word-to-try-first-3156632) at each step, `weldor` combines [a classic combinatorics concept](https://en.wikipedia.org/wiki/Set_cover_problem) to give you multiple choices for your turns. By reducing Wordle variants to a game of deduction that still allows for gambling, rather than memorization or recall, `weldor` allows the player to both enjoy and win these games in a few rounds. You can also [change the dictionary](#Modifying-weldor) used by `weldor` for other variants.

<p align="center">
    <a href="https://replit.com/@bioalgorithmist/weldor#.replit">
        <img src="https://raw.githubusercontent.com/ayaanhossain/repfmt/main/weldor/img/replit.svg"  alt="You can try `weldor` live on repl.it at https://replit.com/@bioalgorithmist/weldor#.replit" width="170" class="center"/>
    </a>
</p>


## `weldor` in Action!

```python
 $ weldor              # type in "weldor" in your terminal and press ENTER to start

 weldor v2.7.2022      # program and version
 by ah                 # author

 guile (played)        # let's say you played "guile"
 ---*+                 # (feedback must have silvers as "-", greens as "*" and yellows as "+")
 newly (secret)        # "---*+" is then the encoded feedback if the secret was "newly" (true?)

 enter word: no idea   # weldor asks you to enter a word, but you say "no idea"

  try these?           # weldor then searches the space and proposes the following words
   - shirt (15 hcov)   #
   - first (15 hcov)   # the words and their information scores
   - skirt (15 hcov)   # are presented in sorted order for your
   - wrist (15 hcov)   # evaluation
   - strip (15 hcov)   #
   - arise (5.82 bits) # words selected based on high entropy are scored in bits and help
   - trace (5.83 bits) # in quickly eliminating large sections of the search space,
   - irate (5.83 bits) # while cover words are scored by differential alphabet coverage
   - crate (5.83 bits) #
   - slate (5.86 bits) # however, these are only suggestions,
   - raise (5.88 bits) # and you're free to ignore them

 enter word: grate     # instead of choosing "irate" or "crate" you play "grate" (the defiance!)
   feedback: -----     # and you're faced with all silvers in response (lol)

  try these?           # analyzing the outcome, weldor suggests the following
   - solid (19 hcov)   #
   - spoil (5.39 bits) # words with cover scores (scov and hcov) are selected to eliminate
   - slick (5.39 bits) # as many high entropy words as possible (tie-breaker); hcov words
   - noisy (5.40 bits) # are hard-mode compliant, but scov words may not be so
   - could (5.42 bits) #
   - lousy (5.42 bits) # you can opt to play a cover word with high value when the high
   - slimy (5.42 bits) # entropy words are very similar to each other in composition

 enter word: solid     # you decide to play "solid" which does a solid job of differentially
   feedback: -++--     # eliminating all words selected based on entropy

  try these?           # another round of suggestions from weldor!
   - knoll (6 hcov)    #
   - flown (2.16 bits) #     what the heck is a knoll?? is that a real word?
   - clock (2.16 bits) #
   - blown (2.25 bits) # the high entropy words are starting to look
   - flock (2.50 bits) # similar in composition, so maybe play another
   - clown (2.50 bits) # cover? or maybe not, they're not all the same
   - block (2.50 bits) # if you look at it carefully ... ?

 enter word: flock     # you choose flock ...
   feedback: -+*-+     # and enter the feedback from Wordle

  try this!!           # and et voila!
   - knoll (0.00 bits) # that just leaves you with one word to try and win this
   - pogchamp!         # (but maybe you could have won earlier with knoll..)

 weldor out!           # so long, weldor
```

## Installation

`weldor` is pure-python, and requires `Python 3.6` or above. It was developed and tested using Ubuntu Linux on [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/about) but it should also be compatible with macOS.

> Note: there may be some issues related to the GNU `readline` library on macOS which `weldor` needs to enable the use of `←`, `↑`, `→` and `↓` keys for selecting the words from suggested lists.

Installation is very easy with `pip`.

On your terminal, just use `pip` like so
```bash
$ pip install --upgrade weldor
```
and that should be it!

**Uninstallation** of `weldor` is easily done using
```bash
$ pip uninstall weldor
```

## World of Wordle

Since its release Wordle has garnered the attention of everyone everywhere. Variants have emerged.

* [Wordle](https://www.nytimes.com/games/wordle/index.html). The classic, with one secret word you have to guess daily. The goal is to solve the puzzle in 6 attempts or less. `weldor` can be used directly here.

* [Wordle Archive](https://metzger.media/games/wordle-archive/). A collection of all past Wordle games published so far. Also features a [randomized Wordle](https://metzger.media/games/wordle-archive/?random=play) as well as a [Word Race](https://metzger.media/games/word-race). Use `weldor` to beat others in races.

* [Absurdle](https://qntm.org/files/absurdle/absurdle.html). An adversarial version of Wordle that is designed to prolong the game. I am not exactly sure, but, Absurdle tries to eliminate your proposed words as much as possible, as long as there are other words it can switch to from the one it selected initially that are all compatible with previously generated colored feedback. The best strategy here with `weldor` is to not always play the highest entropy word at each step, but play a couple of random/fun ones that might throw the adversary off a little bit.

* [Dordle](https://zaratustra.itch.io/dordle). A randomized version of Wordle in which you have to guess two different words by proposing a single five-letter word for both. Definitely a good version to play with `weldor`. My strategy here is to start two separate `weldor` sessions, play the same word with both but based on the two feedback, continue with the word that has the highest entropy from both sessions combined.

* [Quordle](https://www.quordle.com/). Similar to Dordle, but you gotta guess 4 words with a single proposal. So, you'd need 4× `weldor` sessions.

* [Word Master](https://octokatherine.github.io/word-master/) and [hello wordl](https://hellowordl.net/). Unlimited Wordle clones. The hello wordl variant allows the use of different length words, which means you'll need to modify the dictionaries `weldor` uses under the hood (see next section). Check [this repo](https://github.com/dwyl/english-words) to obtain a collection of 466,000+ English words of various length. You'll need to write your own code to filter for words of a certain length.

* [Lewdle](https://www.lewdlegame.com/). Like Wordle, but with lewd words. I know where to find the dictionary, but I don't think I need `weldor` for this variant.

* [A host of topical clones](https://github.com/cwackerfuss/react-wordle). There are so many custom Wordle variants that use custom dictionaries, beyond just the ones from the English language, including [Numble](https://rbrignall.github.io/numble/) and [Nerdle](https://nerdlegame.com/). For Nerdle in particular, one can enumerate all 1,139,062,500 possible equations, evaluate them for mathematical correctness, and then save the filtered ones in a plaintext dictionary. For others, you might have to go through the game's page source or open reddit threads.


## Modifying `weldor`

To modify `weldor`, you'll need to clone this repository.
```bash
$ git clone https://github.com/ayaanhossain/weldor.git
```

Once cloned, you can replace the two dictionaries, inside `/weldor/weldor/wordbase/`, named [shell.txt](https://github.com/ayaanhossain/weldor/blob/main/weldor/wordbase/shell.txt) and [index.txt](https://github.com/ayaanhossain/weldor/blob/main/weldor/wordbase/index.txt).
```bash
$ ll weldor/weldor/wordbase
total 92
drwxrwxrwx 1 owner owner  4096 Feb 7 23:55 ./
drwxrwxrwx 1 owner owner  4096 Feb 7 23:55 ../
-rwxrwxrwx 1 owner owner 13889 Feb 7 23:55 index.txt*
-rwxrwxrwx 1 owner owner 74597 Feb 7 23:55 shell.txt*
```

The `shell.txt` file stores all guesses that are valid, but not really the answers, while `index.txt` file stores the answers -- direct Wordle clones use this discrimination.

If your variant does not have separated concepts of `shell` and `index`, then put your word list as an `index.txt`, and leave the `shell.txt` blank.

Please also feel free to change the logic in `propose_words(...)` function inside `weldor.py` (or anything else for that matter) to suit your needs as well as modify the `wordbaseset` variable to include your alphabets. If you come up with some cool modification to `weldor`, I'd love to hear about it ([open an issue](https://github.com/ayaanhossain/weldor/issues), maybe?).

Once you've modified `weldor`, simply use
```bash
$ python setup.py install
```
from the main directory to install your modified version.


## License

`weldor` (c) 2022 Ayaan Hossain.

`weldor` is an **open-source software** under MIT License.

See [LICENSE](https://github.com/ayaanhossain/weldor/blob/main/LICENSE) file for more details.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ayaanhossain/weldor",
    "name": "weldor",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "reactive ai artificial intelligence entropy wordle trees sets wordle-solver wordle-python wordle-assistant wordle-solution wordle-game wordle-helper",
    "author": "ayaanhossain",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/eb/90/d58462af2a11cbebf657df300e1cff0c9d83f6038144a909a9ec9f89b08a/weldor-3.6.2024.tar.gz",
    "platform": null,
    "description": "<h1 align=\"center\">\n    <a href=\"https://github.com/ayaanhossain/weldor/\">\n        <img src=\"https://raw.githubusercontent.com/ayaanhossain/repfmt/main/weldor/img/logo.svg\"  alt=\"weldor\" width=\"270\" class=\"center\"/>\n    </a>\n</h1>\n\n<p align=\"center\">\n  <a href=\"#weldor-in-Action\">weldor in Action!</a> \u2022\n  <a href=\"#Installation\">Installation</a> \u2022\n  <a href=\"#World-of-Wordle\">World of Wordle</a> \u2022\n  <a href=\"#Modifying-weldor\">Modifying weldor</a> \u2022\n  <a href=\"#License\">License</a>\n</p>\n\n\n`weldor` is a simple reactive AI designed to assist you in playing [Wordle](https://www.powerlanguage.co.uk/wordle/) and [some of its derivatives](https://www.cnet.com/tech/gaming/wordle-spinoffs-other-word-games-to-try-if-you-cant-get-enough/). Rather than just giving you [a single answer with the highest entropy](https://www.nme.com/news/gaming-news/wordle-fan-uses-maths-to-find-the-statistically-best-word-to-try-first-3156632) at each step, `weldor` combines [a classic combinatorics concept](https://en.wikipedia.org/wiki/Set_cover_problem) to give you multiple choices for your turns. By reducing Wordle variants to a game of deduction that still allows for gambling, rather than memorization or recall, `weldor` allows the player to both enjoy and win these games in a few rounds. You can also [change the dictionary](#Modifying-weldor) used by `weldor` for other variants.\n\n<p align=\"center\">\n    <a href=\"https://replit.com/@bioalgorithmist/weldor#.replit\">\n        <img src=\"https://raw.githubusercontent.com/ayaanhossain/repfmt/main/weldor/img/replit.svg\"  alt=\"You can try `weldor` live on repl.it at https://replit.com/@bioalgorithmist/weldor#.replit\" width=\"170\" class=\"center\"/>\n    </a>\n</p>\n\n\n## `weldor` in Action!\n\n```python\n $ weldor              # type in \"weldor\" in your terminal and press ENTER to start\n\n weldor v2.7.2022      # program and version\n by ah                 # author\n\n guile (played)        # let's say you played \"guile\"\n ---*+                 # (feedback must have silvers as \"-\", greens as \"*\" and yellows as \"+\")\n newly (secret)        # \"---*+\" is then the encoded feedback if the secret was \"newly\" (true?)\n\n enter word: no idea   # weldor asks you to enter a word, but you say \"no idea\"\n\n  try these?           # weldor then searches the space and proposes the following words\n   - shirt (15 hcov)   #\n   - first (15 hcov)   # the words and their information scores\n   - skirt (15 hcov)   # are presented in sorted order for your\n   - wrist (15 hcov)   # evaluation\n   - strip (15 hcov)   #\n   - arise (5.82 bits) # words selected based on high entropy are scored in bits and help\n   - trace (5.83 bits) # in quickly eliminating large sections of the search space,\n   - irate (5.83 bits) # while cover words are scored by differential alphabet coverage\n   - crate (5.83 bits) #\n   - slate (5.86 bits) # however, these are only suggestions,\n   - raise (5.88 bits) # and you're free to ignore them\n\n enter word: grate     # instead of choosing \"irate\" or \"crate\" you play \"grate\" (the defiance!)\n   feedback: -----     # and you're faced with all silvers in response (lol)\n\n  try these?           # analyzing the outcome, weldor suggests the following\n   - solid (19 hcov)   #\n   - spoil (5.39 bits) # words with cover scores (scov and hcov) are selected to eliminate\n   - slick (5.39 bits) # as many high entropy words as possible (tie-breaker); hcov words\n   - noisy (5.40 bits) # are hard-mode compliant, but scov words may not be so\n   - could (5.42 bits) #\n   - lousy (5.42 bits) # you can opt to play a cover word with high value when the high\n   - slimy (5.42 bits) # entropy words are very similar to each other in composition\n\n enter word: solid     # you decide to play \"solid\" which does a solid job of differentially\n   feedback: -++--     # eliminating all words selected based on entropy\n\n  try these?           # another round of suggestions from weldor!\n   - knoll (6 hcov)    #\n   - flown (2.16 bits) #     what the heck is a knoll?? is that a real word?\n   - clock (2.16 bits) #\n   - blown (2.25 bits) # the high entropy words are starting to look\n   - flock (2.50 bits) # similar in composition, so maybe play another\n   - clown (2.50 bits) # cover? or maybe not, they're not all the same\n   - block (2.50 bits) # if you look at it carefully ... ?\n\n enter word: flock     # you choose flock ...\n   feedback: -+*-+     # and enter the feedback from Wordle\n\n  try this!!           # and et voila!\n   - knoll (0.00 bits) # that just leaves you with one word to try and win this\n   - pogchamp!         # (but maybe you could have won earlier with knoll..)\n\n weldor out!           # so long, weldor\n```\n\n## Installation\n\n`weldor` is pure-python, and requires `Python 3.6` or above. It was developed and tested using Ubuntu Linux on [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/about) but it should also be compatible with macOS.\n\n> Note: there may be some issues related to the GNU `readline` library on macOS which `weldor` needs to enable the use of `\u2190`, `\u2191`, `\u2192` and `\u2193` keys for selecting the words from suggested lists.\n\nInstallation is very easy with `pip`.\n\nOn your terminal, just use `pip` like so\n```bash\n$ pip install --upgrade weldor\n```\nand that should be it!\n\n**Uninstallation** of `weldor` is easily done using\n```bash\n$ pip uninstall weldor\n```\n\n## World of Wordle\n\nSince its release Wordle has garnered the attention of everyone everywhere. Variants have emerged.\n\n* [Wordle](https://www.nytimes.com/games/wordle/index.html). The classic, with one secret word you have to guess daily. The goal is to solve the puzzle in 6 attempts or less. `weldor` can be used directly here.\n\n* [Wordle Archive](https://metzger.media/games/wordle-archive/). A collection of all past Wordle games published so far. Also features a [randomized Wordle](https://metzger.media/games/wordle-archive/?random=play) as well as a [Word Race](https://metzger.media/games/word-race). Use `weldor` to beat others in races.\n\n* [Absurdle](https://qntm.org/files/absurdle/absurdle.html). An adversarial version of Wordle that is designed to prolong the game. I am not exactly sure, but, Absurdle tries to eliminate your proposed words as much as possible, as long as there are other words it can switch to from the one it selected initially that are all compatible with previously generated colored feedback. The best strategy here with `weldor` is to not always play the highest entropy word at each step, but play a couple of random/fun ones that might throw the adversary off a little bit.\n\n* [Dordle](https://zaratustra.itch.io/dordle). A randomized version of Wordle in which you have to guess two different words by proposing a single five-letter word for both. Definitely a good version to play with `weldor`. My strategy here is to start two separate `weldor` sessions, play the same word with both but based on the two feedback, continue with the word that has the highest entropy from both sessions combined.\n\n* [Quordle](https://www.quordle.com/). Similar to Dordle, but you gotta guess 4 words with a single proposal. So, you'd need 4\u00d7 `weldor` sessions.\n\n* [Word Master](https://octokatherine.github.io/word-master/) and [hello wordl](https://hellowordl.net/). Unlimited Wordle clones. The hello wordl variant allows the use of different length words, which means you'll need to modify the dictionaries `weldor` uses under the hood (see next section). Check [this repo](https://github.com/dwyl/english-words) to obtain a collection of 466,000+ English words of various length. You'll need to write your own code to filter for words of a certain length.\n\n* [Lewdle](https://www.lewdlegame.com/). Like Wordle, but with lewd words. I know where to find the dictionary, but I don't think I need `weldor` for this variant.\n\n* [A host of topical clones](https://github.com/cwackerfuss/react-wordle). There are so many custom Wordle variants that use custom dictionaries, beyond just the ones from the English language, including [Numble](https://rbrignall.github.io/numble/) and [Nerdle](https://nerdlegame.com/). For Nerdle in particular, one can enumerate all 1,139,062,500 possible equations, evaluate them for mathematical correctness, and then save the filtered ones in a plaintext dictionary. For others, you might have to go through the game's page source or open reddit threads.\n\n\n## Modifying `weldor`\n\nTo modify `weldor`, you'll need to clone this repository.\n```bash\n$ git clone https://github.com/ayaanhossain/weldor.git\n```\n\nOnce cloned, you can replace the two dictionaries, inside `/weldor/weldor/wordbase/`, named [shell.txt](https://github.com/ayaanhossain/weldor/blob/main/weldor/wordbase/shell.txt) and [index.txt](https://github.com/ayaanhossain/weldor/blob/main/weldor/wordbase/index.txt).\n```bash\n$ ll weldor/weldor/wordbase\ntotal 92\ndrwxrwxrwx 1 owner owner  4096 Feb 7 23:55 ./\ndrwxrwxrwx 1 owner owner  4096 Feb 7 23:55 ../\n-rwxrwxrwx 1 owner owner 13889 Feb 7 23:55 index.txt*\n-rwxrwxrwx 1 owner owner 74597 Feb 7 23:55 shell.txt*\n```\n\nThe `shell.txt` file stores all guesses that are valid, but not really the answers, while `index.txt` file stores the answers -- direct Wordle clones use this discrimination.\n\nIf your variant does not have separated concepts of `shell` and `index`, then put your word list as an `index.txt`, and leave the `shell.txt` blank.\n\nPlease also feel free to change the logic in `propose_words(...)` function inside `weldor.py` (or anything else for that matter) to suit your needs as well as modify the `wordbaseset` variable to include your alphabets. If you come up with some cool modification to `weldor`, I'd love to hear about it ([open an issue](https://github.com/ayaanhossain/weldor/issues), maybe?).\n\nOnce you've modified `weldor`, simply use\n```bash\n$ python setup.py install\n```\nfrom the main directory to install your modified version.\n\n\n## License\n\n`weldor` (c) 2022 Ayaan Hossain.\n\n`weldor` is an **open-source software** under MIT License.\n\nSee [LICENSE](https://github.com/ayaanhossain/weldor/blob/main/LICENSE) file for more details.\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "weldor - A reactive AI designed to assist you with Wordle variants",
    "version": "3.6.2024",
    "project_urls": {
        "Bug Reports": "https://github.com/ayaanhossain/weldor/issues",
        "Homepage": "https://github.com/ayaanhossain/weldor",
        "Source": "https://github.com/ayaanhossain/weldor/tree/master/weldor"
    },
    "split_keywords": [
        "reactive",
        "ai",
        "artificial",
        "intelligence",
        "entropy",
        "wordle",
        "trees",
        "sets",
        "wordle-solver",
        "wordle-python",
        "wordle-assistant",
        "wordle-solution",
        "wordle-game",
        "wordle-helper"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "eb90d58462af2a11cbebf657df300e1cff0c9d83f6038144a909a9ec9f89b08a",
                "md5": "bcf3cf371851a648980b7a1e4374f204",
                "sha256": "69aaf7031427b5c52b104ef428ac17ae2741db48995e1e1a87f0ebc68ee4dba1"
            },
            "downloads": -1,
            "filename": "weldor-3.6.2024.tar.gz",
            "has_sig": false,
            "md5_digest": "bcf3cf371851a648980b7a1e4374f204",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 57045,
            "upload_time": "2024-03-07T03:55:04",
            "upload_time_iso_8601": "2024-03-07T03:55:04.087985Z",
            "url": "https://files.pythonhosted.org/packages/eb/90/d58462af2a11cbebf657df300e1cff0c9d83f6038144a909a9ec9f89b08a/weldor-3.6.2024.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-07 03:55:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ayaanhossain",
    "github_project": "weldor",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "weldor"
}
        
Elapsed time: 0.22628s