{"id":29251749,"url":"https://github.com/macrat/wordpy","last_synced_at":"2025-08-01T11:38:18.006Z","repository":{"id":38454244,"uuid":"458180722","full_name":"macrat/wordpy","owner":"macrat","description":"THAT word game in python.","archived":false,"fork":false,"pushed_at":"2023-02-16T06:08:29.000Z","size":183,"stargazers_count":0,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-03-04T02:13:42.350Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/macrat.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}},"created_at":"2022-02-11T12:38:14.000Z","updated_at":"2022-02-12T11:29:02.000Z","dependencies_parsed_at":"2022-08-20T06:41:01.997Z","dependency_job_id":null,"html_url":"https://github.com/macrat/wordpy","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/macrat/wordpy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macrat%2Fwordpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macrat%2Fwordpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macrat%2Fwordpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macrat%2Fwordpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/macrat","download_url":"https://codeload.github.com/macrat/wordpy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macrat%2Fwordpy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263427316,"owners_count":23464845,"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","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":"2025-07-04T01:08:17.755Z","updated_at":"2025-07-04T01:08:18.675Z","avatar_url":"https://github.com/macrat.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"wordpy\n======\n\n![puzzle](./puzzle.jpg)\n\nWord puzzle solver.\n\n\n## Use as solver\n\n``` shell\n$ git clone https://github.com/macrat/wordpy.git\n$ python3.10 -m wordpy\ncandidates 0:               \ncares\ncores\nbares\ncarey\nbores\ncanes\ncarts\nceras\ncires\ncorey\n\nwhat did you input?\n  _____\n\u003e cares\nwhat was correct? (input incorrect character as .)\n  _____\n\u003e ..r..\nwhat characters was yellow?\n\u003e a\n```\n\n`what did you input?` -\u003e enter what you have input to the game.\n\n`what was correct?` -\u003e enter what letters was correct. please input incorrect letters as `.`.\n\n`what characters was yellow?` -\u003e enter what letters was included in the answer but not correct position.\n\n\n## Make your own solver\n\n``` python\nimport wordpy\n\n\nclass MySolver(wordpy.Solver):\n    def __init__(self, game: wordpy.Game):\n        super().__init__(game)\n\n        # do initialization here\n\n    def guess(self) -\u003e wordpy.WordTable:\n        self.state # current game status.\n        self.words # current word candidates.\n\n        self.drop_words_by_state() # drop words that can't be the answer, from self.words.\n\n        return self.words[:10] # return some next word candidates.\n\n\nif __name__ == '__main__':\n    words = wordpy.get_words()\n    wordpy.benchmark(words, MySolver)\n```\n\nThere are 3 solvers in this repository.\nThe solvers are defined in [solver.py](./solver.py).\n\n- __wordpy.solver.RandomSolver__: Just choices random word from possible words.\n- __wordpy.solver.MajorLetterSolver__: Tries to use letters that commonly use.\n- __wordpy.solver.MinorLetterSolver__: The opposite of MajorLetterSolver. Uses minor letters.\n- __wordpy.solver.MarkSolver__: Tries to all letters as many as possible to detect what letters used in the answer. (this is most efficient in this repository)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacrat%2Fwordpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacrat%2Fwordpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacrat%2Fwordpy/lists"}