{"id":17190941,"url":"https://github.com/dfm/wordle","last_synced_at":"2026-02-09T11:31:19.451Z","repository":{"id":66097737,"uuid":"445206616","full_name":"dfm/wordle","owner":"dfm","description":"A wordle simulator and an experiment in active learning","archived":false,"fork":false,"pushed_at":"2022-01-13T16:30:11.000Z","size":3501,"stargazers_count":9,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-22T01:37:11.328Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dfm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-01-06T14:53:22.000Z","updated_at":"2023-07-10T01:43:23.000Z","dependencies_parsed_at":"2023-04-10T01:16:51.321Z","dependency_job_id":null,"html_url":"https://github.com/dfm/wordle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dfm/wordle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfm%2Fwordle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfm%2Fwordle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfm%2Fwordle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfm%2Fwordle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dfm","download_url":"https://codeload.github.com/dfm/wordle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfm%2Fwordle/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268554909,"owners_count":24269062,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T01:24:26.348Z","updated_at":"2026-02-09T11:31:19.408Z","avatar_url":"https://github.com/dfm.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A wordle simulator\n\nA simulator for experimenting with different strategies for solving the [daily\nWordle puzzle](https://www.powerlanguage.co.uk/wordle/).\n\n## Strategies\n\nThere are [2 strategies](src/strategy) implemented here: (1)\n[`Baseline`](src/strategy/baseline.rs) a baseline that randomly guesses valid\nwords, and (2) [`Active`](src/strategy/active.rs) as algorithm that maximizes\nthe expected information gain at each step.\n\nSimulating the performance of these algorithms for all words in the Wordle\ndictionary gives the following results:\n\n\u003cimg src=\"assets/figure.png\" width=500 alt=\"The performance of our strategies\"\u003e\n\nwhere the orange histogram shows the distribution of guesses required when the\nsolver doesn't know that the correct Wordle is a \"common\" word. The green\ndistribution shows our results when we cheat and provide our algorithm with the\nknown word list from the Wordle source code.\n\n## Usage\n\n### Simulation mode\n\nTo simulate the performance for a specific puzzle, run:\n\n```bash\ncargo run -- -s array\n```\n\nwhere `array` can be replaced by [any valid 5-letter word](src/words.txt). This\nwill report results like:\n\n```bash\ntares: 12971 -\u003e 80\nmonad: 80 -\u003e 13\nfugly: 13 -\u003e 2\n'array' in 4 guesses\n```\n\nThis interface includes other command line arguments like `--hard` to run in\n\"hard mode\" and `--common` to let the algorithm know that the true word is a\n\"common\" word as defined by Wordle.\n\nTo run this simulation across the entire dictionary, run:\n\n```bash\ncargo run --bin simulate\n```\n\nThis will print a comma-separated list or results to standard out, with the form:\n\n```\ncigar,4\nrebut,3\nsissy,4\nhumph,4\n...\n```\n\nwhere the number is the number of guesses that were required to solve the\npuzzle.\n\n### Solve mode\n\nYou can also use this code to solve today's puzzle. The simplest way to do this\nis by using the command line interface:\n\n```bash\ncargo run\n```\n\nwhich will suggest guesses and ask for you to enter the results from the website\nby hand.\n\nThere is also a built-in solver that can interact with the website directly\nusing [thirtyfour](https://docs.rs/thirtyfour). To do this, you'll need to run a\nChrome WebDriver process using something like\n[chromedriver](https://chromedriver.chromium.org/downloads):\n\n```bash\nchromedriver --url-base=/wd/hub --port=4444\n```\n\nThen run\n\n```bash\ncargo run --bin solve\n```\n\nwhich should show you something like the following:\n\n![An example solve](assets/solve.gif)\n\nThis interface also takes command line arguments like `--hard` to solve in \"hard mode\":\n\n```bash\ncargo run --bin solve -- --hard\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfm%2Fwordle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdfm%2Fwordle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfm%2Fwordle/lists"}