{"id":24171255,"url":"https://github.com/loveboyme/inventoryoptimizer","last_synced_at":"2025-03-02T12:18:30.825Z","repository":{"id":272150022,"uuid":"915661927","full_name":"loveboyme/InventoryOptimizer","owner":"loveboyme","description":"使用遗传算法，对 Minecraft 玩家背包物品进行偏好性排序。| Utilizing genetic algorithms to perform preference-based sorting of items in a Minecraft player's inventory.","archived":false,"fork":false,"pushed_at":"2025-01-12T14:07:26.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-12T14:42:30.217Z","etag":null,"topics":["ai","algorithm","automatic","based","bukkit","genetic","inventory","item","management","minecraft","optimization","plugin","preference","smart","sort","sorting","spigot"],"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/loveboyme.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":"2025-01-12T13:27:17.000Z","updated_at":"2025-01-12T14:07:29.000Z","dependencies_parsed_at":"2025-01-12T14:42:37.621Z","dependency_job_id":"dabdc568-1efd-40ca-b297-4441d0d19a95","html_url":"https://github.com/loveboyme/InventoryOptimizer","commit_stats":null,"previous_names":["loveboyme/inventoryoptimizer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loveboyme%2FInventoryOptimizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loveboyme%2FInventoryOptimizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loveboyme%2FInventoryOptimizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loveboyme%2FInventoryOptimizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loveboyme","download_url":"https://codeload.github.com/loveboyme/InventoryOptimizer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241503097,"owners_count":19972982,"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","algorithm","automatic","based","bukkit","genetic","inventory","item","management","minecraft","optimization","plugin","preference","smart","sort","sorting","spigot"],"created_at":"2025-01-13T00:27:51.286Z","updated_at":"2025-03-02T12:18:30.797Z","avatar_url":"https://github.com/loveboyme.png","language":"Java","readme":"# 📦 InventoryOptimizer ⚙️\n\n✨ **智能优化你的 Minecraft 背包！** ✨\n\nInventoryOptimizer 是一款 Bukkit 插件，利用遗传算法来学习你的物品使用习惯，并智能地重新排列你的背包，让你常用的物品触手可及！再也不用在杂乱的背包里翻箱倒柜啦！\n\n## 🌟 主要特性\n\n* **🧠 智能学习：** 插件会默默观察你的物品交互行为，学习你常用的物品以及你习惯放置它们的位置。\n* **🧬 遗传算法优化：** 基于你的使用习惯，使用强大的遗传算法找出最优的背包排列方案。\n* **🪄 一键优化：** 只需一个命令 ` /optimize `，即可让插件为你整理背包。\n* **🛠️ 可配置性：**  可以自定义遗传算法的参数，如种群大小、变异率等，以适应不同的优化需求。\n* **📊 数据驱动：**  插件会存储玩家的物品使用数据，以便进行更精准的优化。\n* **🔔 学习完成通知：**  当插件完成学习后会通知玩家，可以开始使用优化功能。\n\n## ⚙️ 工作原理\n\n1. **数据收集：** 当玩家与背包物品交互时（如点击、移动物品），插件会记录物品的使用频率和偏好放置的槽位。\n2. **遗传算法应用：**  当玩家执行 `/optimize` 命令时，插件会：\n   *  **初始化种群：**  创建多个随机的背包排列方案。\n   *  **评估适应度：**  根据玩家的学习数据（物品使用频率和槽位偏好），评估每个排列方案的“好坏”。\n   *  **选择：**  选择适应度较高的排列方案作为“父母”。\n   *  **交叉：**  将“父母”的排列方案进行组合，产生新的“后代”排列方案。\n   *  **变异：**  对部分“后代”排列方案进行随机调整，引入多样性。\n   *  **迭代：**  重复选择、交叉和变异过程多次，不断进化，直到找到最优的背包排列。\n3. **应用优化：**  将找到的最优背包排列应用到玩家的背包中。\n\n## 🛠️ 安装\n\n1. 将 `InventoryOptimizer.jar` 文件放入你的 Bukkit/Spigot 服务器的 `plugins` 文件夹中。\n2. 重启你的服务器。\n\n## 🎮 使用方法\n\n* **`/optimize`**: 执行此命令来优化你的背包。插件会根据你的学习数据，自动排列你的物品。\n\n## ⚙️ 配置\n\n插件的配置文件位于 `plugins/InventoryOptimizer/config.yml`。你可以修改以下选项：\n\n```yaml\n# 遗传算法参数\ngenetic_algorithm:\n  population_size: 50   # 每一代的个体数量\n  mutation_rate: 0.05    # 基因变异的概率 (0.0 到 1.0)\n  elite_size: 5        # 保留的精英个体数量\n\n# 学习阶段参数\nlearning_threshold: 200 # 玩家需要进行多少次物品交互后才认为学习完成\nlearning_check_interval: 300 # (秒) 定期检查玩家学习状态的间隔\n```\n\n- **genetic_algorithm.population_size**: 遗传算法中每一代产生的候选背包排列方案的数量。数值越大，搜索空间越大，可能找到更优解，但计算时间也会增加。\n- **genetic_algorithm.mutation_rate**: 在遗传算法中，新的背包排列方案发生随机变化的概率。较高的变异率可以引入更多多样性，但也可能破坏好的排列。\n- **genetic_algorithm.elite_size**: 每一代中保留的适应度最高的个体数量，这些个体将直接进入下一代，保证优秀基因的传承。\n- **learning_threshold**: 玩家需要进行多少次物品交互（拾取、放置、移动物品等）后，插件才会认为学习完成，并允许使用 /optimize 命令。\n- **learning_check_interval**: 插件每隔多少秒检查一次在线玩家的学习状态，如果达到学习阈值，则通知玩家学习完成。\n\n## 🤝 贡献\n\n欢迎提交 Issues 和 Pull Requests！如果你有任何改进建议或者发现了 bug，请在 GitHub 上提出。\n\n## 📄 许可证\n\n本项目使用 [MIT License](https://www.google.com/url?sa=E\u0026q=LICENSE)。\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floveboyme%2Finventoryoptimizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floveboyme%2Finventoryoptimizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floveboyme%2Finventoryoptimizer/lists"}