一个基于大语言模型的智能Minecraft代理系统,能够自主执行复杂的游戏任务,如挖矿、制作、建造等。 还能与玩家进行流畅的交流,根据玩家的反馈进行行为
Maicraft-Mai 是一个智能的Minecraft游戏代理系统,它结合了:
- 大语言模型 (LLM) - 提供智能决策和任务规划
- 基于Mineflayer的MC操控 基于maicraft-mcp,操作mc游戏
- Agent - 采用ReAct逻辑的Agent
该系统能够理解游戏环境,制定策略,执行简单的MC游玩。
## 待实现清单
- 更好的建筑建造和矿道建造
- 基于语音的实时交流
- 与Amaidesu配合,使用tts生成麦麦语音
- 配合MaiCore的插件进行交互
## 🚀 快速开始
### 环境要求
- Python 3.11+
- Minecraft 服务器
### 安装步骤
1. **克隆仓库**
```bash
git clone https://github.com/MaiM-with-u/Maicraft
cd Maicraft
- 安装依赖
pip install -r requirements.txt
- 配置设置
将config-template.toml
复制并更名为config.toml
在 config.toml
文件中配置以下参数:
[llm]
model = "gpt-4o-mini"
api_key = "your-openai-api-key"
base_url = "https://api.openai.com/v1"
temperature = 0.2
max_tokens = 1024
[agent]
enabled = true
session_id = "maicraft_default"
max_steps = 50
tick_seconds = 8.0
report_each_step = true
[logging]
level = "INFO"
- 配置服务器
将
mcp_server/mcp_servers_template.json
复制并更名为mcp_server/mcp_servers.json
编辑maicraft-mcp的配置文件,设置你的Minecraft服务器信息
{
"mcpServers": {
"maicraft": {
"command": "npx",
"args": [
"-y",
"maicraft@latest",
"--host",
"你的Minecraft服务器地址", // 例如: "mc.example.com" 或 "192.168.1.100"
"--port",
"你的Minecraft服务器端口", // 例如: "25565" (默认端口)
"--username",
"你的游戏用户名", // 例如: "MaiBot"
"--auth",
"offline" // 离线模式,或使用 "online" 进行正版验证
]
}
}
}
--host
: Minecraft服务器地址 (IP地址或域名)--port
: 服务器端口 (默认25565)--username
: 游戏用户名--auth
: 认证模式 (offline
为离线模式,online
为正版验证)
- 启动系统
# Windows
start.cmd
# Linux/Mac
./start.sh
# 或者直接运行
python main.py
我们欢迎所有形式的贡献!
- Fork 项目
- 创建特性分支 (
git checkout -b feature/AmazingFeature
) - 提交更改 (
git commit -m 'Add some AmazingFeature'
) - 推送到分支 (
git push origin feature/AmazingFeature
) - 开启 Pull Request
本项目采用 MIT 许可证 - 查看 LICENSE 文件了解详情。
- Minecraft 开发团队
- Mineflayer
- 所有贡献者和用户
- 项目主页: GitHub
- 问题反馈: Issues
- 讨论交流: Discussions
注意: 这是一个实验性项目,请在使用前仔细阅读文档并测试功能。建议在测试环境中使用,避免影响正式的游戏存档。