{"id":17330594,"url":"https://github.com/yoshitomo-matsubara/mastermind-ai","last_synced_at":"2025-08-23T19:10:31.270Z","repository":{"id":97805583,"uuid":"71733665","full_name":"yoshitomo-matsubara/mastermind-ai","owner":"yoshitomo-matsubara","description":"Mastermind AI project","archived":false,"fork":false,"pushed_at":"2016-12-06T02:53:31.000Z","size":529,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-01T11:13:36.420Z","etag":null,"topics":["ai","game-ai","mastermind"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yoshitomo-matsubara.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2016-10-23T22:34:10.000Z","updated_at":"2018-05-15T08:39:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"22a9ff89-ed88-43f8-a7f4-03e9c1efabd7","html_url":"https://github.com/yoshitomo-matsubara/mastermind-ai","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshitomo-matsubara%2Fmastermind-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshitomo-matsubara%2Fmastermind-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshitomo-matsubara%2Fmastermind-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshitomo-matsubara%2Fmastermind-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yoshitomo-matsubara","download_url":"https://codeload.github.com/yoshitomo-matsubara/mastermind-ai/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245791933,"owners_count":20672669,"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":["ai","game-ai","mastermind"],"created_at":"2024-10-15T14:51:43.162Z","updated_at":"2025-03-27T05:45:00.249Z","avatar_url":"https://github.com/yoshitomo-matsubara.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mastermind AI project\n## Development\n- Java 1.8 +\n- Maven\n- IntelliJ IDEA\n\n## Usage\n    $ java -classpath mastermind-ai.jar mastermind.game.GameMaster -c \u003c# of colors\u003e -p \u003c# of positions\u003e [-m \u003cmethod type\u003e] [-a \u003canswer\u003e]\n- *# of colors* must be 1 or greater\n- *# of positions* must be 1 or greater\n- [optional] *method type*: np (NaivePlayer, default), cfp (ColorFirstPlayer)\n- [optional] *answer* is delimited with comma (e.g. 0,1,2,3)\n    \n## How to add a new player (strategy)\n1. Create a new class file on **mastermind.ai** (e.g. SmartPlayer)\n2. Let the new class inherit **mastermind.ai.Player** (abstract class)  \n(You don't need to override methods other than ***search*** method.)\n\nFor example, you need to add the following lines to the new class.\n```\npublic class SmartPlayer extends Player {\n    public static final String TYPE = \"sp\";\n    \n    public SmartPlayer(State goalState) {\n        super(goalState);\n    }\n    \n    @Override\n    protected State search() {\n        ...\n        int[] elements = [your guess, each element is between 0 and (# of position - 1)]\n        return new State(elements, this.colorSize);\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoshitomo-matsubara%2Fmastermind-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoshitomo-matsubara%2Fmastermind-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoshitomo-matsubara%2Fmastermind-ai/lists"}