{"id":13344070,"url":"https://github.com/usumerican/zshogi","last_synced_at":"2026-02-17T13:01:50.505Z","repository":{"id":244608177,"uuid":"815409496","full_name":"usumerican/zshogi","owner":"usumerican","description":"A simple USI shogi engine implemented in Zig","archived":false,"fork":false,"pushed_at":"2024-08-05T11:53:27.000Z","size":588,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-10T18:43:33.559Z","etag":null,"topics":["chess","javascript","shogi","webassembly","zig"],"latest_commit_sha":null,"homepage":"https://usumerican.github.io/zshogi/","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/usumerican.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}},"created_at":"2024-06-15T04:49:10.000Z","updated_at":"2024-08-05T11:52:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"ae0b2f6f-6210-44f3-86e6-9a81573a5e91","html_url":"https://github.com/usumerican/zshogi","commit_stats":null,"previous_names":["usumerican/zshogi"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/usumerican/zshogi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usumerican%2Fzshogi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usumerican%2Fzshogi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usumerican%2Fzshogi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usumerican%2Fzshogi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/usumerican","download_url":"https://codeload.github.com/usumerican/zshogi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usumerican%2Fzshogi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29545295,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T13:00:00.370Z","status":"ssl_error","status_checked_at":"2026-02-17T12:57:14.072Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["chess","javascript","shogi","webassembly","zig"],"created_at":"2024-07-29T19:32:20.088Z","updated_at":"2026-02-17T13:01:50.476Z","avatar_url":"https://github.com/usumerican.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Z Shogi\n\nA simple USI shogi engine implemented in Zig\n\n## 概要\n\nZ Shogi は、[Zig](https://ziglang.org/) で実装されたシンプルな将棋エンジンです。\n\nUSI 対応の将棋 GUI ソフトで利用できる実行可能ファイル、\nJavaScript から利用できる WebAssembly 版ライブラリ、\n動作確認用の Web アプリを提供しています。\n\n将棋プログラミングについては、[やねうら王](https://github.com/yaneurao/YaneuraOu)を参考にしました。\n\n評価関数については、やねうら王の[NNUE-K-P-256-32-32用評価関数バイナリその2](https://github.com/yaneurao/YaneuraOu/releases/tag/20190212_k-p-256-32-32)を使っています。\n\n## ライブラリの使い方\n\n```\nnpm install zshogi\n```\n\n```js\nimport { Engine } from 'zshogi';\n\n(async () =\u003e {\n  const engine = await Engine.init();\n  for (const request of [\n    'usi',\n    'setoption name DepthLimit value 5',\n    'getoption',\n    'isready',\n    'usinewgame',\n    'd',\n    'go',\n    'position startpos moves 1g1f',\n    'd',\n    'go',\n    'matsuri',\n    'd',\n    'moves',\n    'checks',\n  ]) {\n    console.log('\u003e ' + request);\n    console.log(engine.run(request));\n  }\n})();\n```\n\n## 開発\n\n実行可能ファイルのビルドには、Zig が必要です。\n\n```\nzig build test\n```\n\n```\nzig build --release=fast\n```\n\n```\n./zig-out/bin/zshogi \u003c\u003cEOF\nusi\nisready\nusinewgame\nd\nmoves\ngo\nEOF\n```\n\n合法手生成の性能を計測します。\n\n```\necho \"usi\\nisready\\nmatsuri\\nperft 4\" | zig build run --release=fast\n```\n\nWebAssembly 版ライブラリと Web アプリのビルドには、Node.js も必要です。\n\n```\nnpm ci\n```\n\n```\nnpm run zig:test\n```\n\n```\nnpm run zig:wasm\n```\n\n```\nnpm run lib\n```\n\n```\nnpm run test\n```\n\n```\nnpm run build\n```\n\n```\nnpm run preview\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusumerican%2Fzshogi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fusumerican%2Fzshogi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusumerican%2Fzshogi/lists"}