{"id":29351843,"url":"https://github.com/poteto0/mamba-model","last_synced_at":"2025-07-09T00:08:10.628Z","repository":{"id":301172700,"uuid":"1008374578","full_name":"poteto0/mamba-model","owner":"poteto0","description":"bio-math model for basketball","archived":false,"fork":false,"pushed_at":"2025-06-25T13:34:49.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-25T14:36:32.941Z","etag":null,"topics":["basketball","biomathematics","simulation"],"latest_commit_sha":null,"homepage":"","language":"Go","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/poteto0.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,"zenodo":null}},"created_at":"2025-06-25T12:53:20.000Z","updated_at":"2025-06-25T13:34:53.000Z","dependencies_parsed_at":"2025-06-25T14:51:09.146Z","dependency_job_id":null,"html_url":"https://github.com/poteto0/mamba-model","commit_stats":null,"previous_names":["poteto0/mamba-model"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/poteto0/mamba-model","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poteto0%2Fmamba-model","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poteto0%2Fmamba-model/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poteto0%2Fmamba-model/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poteto0%2Fmamba-model/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/poteto0","download_url":"https://codeload.github.com/poteto0/mamba-model/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poteto0%2Fmamba-model/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264369069,"owners_count":23597330,"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":["basketball","biomathematics","simulation"],"created_at":"2025-07-09T00:08:08.053Z","updated_at":"2025-07-09T00:08:10.616Z","avatar_url":"https://github.com/poteto0.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 概要\n\nhttps://www.youtube.com/watch?v=VchfS2fvQCw\n\n## 背景\n\nバスケットボールでは、ショット精度以上にショットクリエイトが重要視される。特に NBA では、得点効率を意識したオフェンスが盛んであり、チームオフェンスのほとんどをエースが担うようなことも珍しくない。ところがエースが調子が悪い時には、そのセレクションに疑問が持たれることもある。そういうとき、SNS 上では、「外しても打ち続けるべき」又は「少しはセレクトを減らすべき」という意見が完全に 2 分される。\n\u003cbr\u003e\n特にエースの象徴として Kobe Bryant の名が上がることが多い。ショットを外しても撃ち続ける姿勢はマンバメンタリティ(曖昧さ回避)と称えられる。\n\n## 目的\n\nマンバメンタリティがどうチームオフェンスに影響するのかを数理的な視点で理解することを目指す。\n\u003cbr\u003e\n数理生物学的な手法で、バスケットボールにおけるショットセレクションモデルを理論上に構築し、シミュレーションを行うことで、これを目指す。\n\n# モデル\n\n＊工事中\n描き途中な上に、いくつか式を変えてしまっています。\n\n## 結果によるスコア成功率の変化\n\n```math\ns_p(n+1) = s_p^{base} + \\eta_{p} \\frac{1}{1+e^{-(n-n_{d})}} (acc(n) - s_p^{base})\n```\n\n```math\nacc(n) = \\frac{n_{made}(n)}{n}\n```\n\nただし、$n$は試投数、$n_{made}(n)$は$n$時点での成功数を表す。\nこの時実際に減少が起こる確率は、以下のように定義される\n\n```math\nR(made) \\coloneqq \\left\\{\n\\begin{array}{ll}\ns_p(n) \u0026 (made=ture) \\\\\n(1-s_p(n)) \u0026 (other) \\\\\n\\end{array}\n\\right.\n```\n\n```math\nrate_{real}(n) = \\prod_{i}^{n}{R(made(i))}\n```\n\nグラフは以下のようになった。\n\n## 結果によるメンタルの変動\n\nメンタル$mt$の変化量を以下にまとめる\n\n```math\n\\frac{d mt}{dt} = M(t, shot, made)\n```\n\n```math\nM(t, shot, made) \\coloneqq \\left\\{\n\\begin{array}{ll}\n0 \u0026 (shot = false) \\\\\n\\eta s_p(n) \u0026 (shot = true \\land made = true) \\\\\n-\\eta (1-mamba) \u0026 (other) \\\\\n\\end{array}\n\\right.\n```\n\n## ショット選択\n\n```math\nP(i) = \\frac{sp_{i}(t)}{OT + \\sum_j{sp_{j}(t)}}\n```\n\n何も選択されなかった場合($OT$)は、その時点での最低値に依存するオフェンスを行う\n\n```math\no_t \\min(sp_i)\n```\n\nその際に選手メンタルを以下で更新する\n\n```math\n\\frac{d mt}{dt} = - \\eta o_t  (1-mamba)\n```\n\n# 実行\n\n```bash\ncd mamba\ngo run play/main.go\n```\n\n# TODO\n\n- [ ] finish model\n- [ ] finish chart tool\n- [ ] web app\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoteto0%2Fmamba-model","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpoteto0%2Fmamba-model","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoteto0%2Fmamba-model/lists"}