# π° VillagerAgent: A Graph-Based Multi-Agent Framework for Coordinating Complex Task Dependencies in Minecraft π
![]() Fishing |
![]() Building |
![]() Driving |
![]() Talking |
![]() Farming |
![]() Feeding |
![]() Cultivate |
![]() Holding |
![]() Riding |
![]() Seeding |
![]() Storing |
![]() Sleeping |
![]() | ![]() |
![]() | ![]() |
![]() | ![]() |
### VillagerAgent Framework
Meet VillagerAgent, our multi-agent maestro πΌ, orchestrating a symphony of tasks with its four core components: Task Decomposer, Agent Controller, State Manager, and Base Agents. It's like a conductor for AI, turning individual actions into a masterpiece of collaboration.
## Core Components π
- **VillagerBench**: The virtual sandbox where agents interact and learn π€Ή.
- **TaskManager**: The master planner, keeping tasks on track and agents in the know π.
- **DataManager**: The keeper of knowledge, holding all the data cards close to its chest ποΈ.
- **GlobalController**: The overseer, ensuring every agent plays their part to perfection π―.
## npm Installation
### Windows
1. **Download the Node.js Installer**:
- Visit the [Node.js official website](https://nodejs.org/).
- Download the latest stable version of the Node.js installer for Windows (the LTS version is usually recommended).
2. **Run the Installer**:
- Double-click the downloaded installer file.
- Follow the instructions provided by the installation wizard. Make sure to include all necessary components, including npm, during the installation process.
3. **Verify Installation**:
- Open Command Prompt or PowerShell.
- Enter the following commands to check the versions of Node.js and npm:
```
node -v
npm -v
```
- If the installation was successful, you will see the version numbers of Node.js and npm displayed.
### Linux (Debian/Ubuntu-based)
1. **Install Using Package Manager**:
- Open the terminal.
- First, update your package index:
```
sudo apt update
```
- Install Node.js and npm:
```
sudo apt install nodejs npm
```
2. **Install Using nvm** (Node Version Manager, recommended for managing multiple versions of Node.js):
- Open the terminal.
- Install nvm by running:
```
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
```
- Restart the terminal or run the following command to update the current session:
```
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
```
- Install Node.js using nvm (this will also install npm):
```
nvm install node
```
3. **Verify Installation**:
- Type the following commands to check the versions of Node.js and npm:
```
node -v
npm -v
```
- If the installation was successful, you will see the version numbers of Node.js and npm displayed.
## Minecraft 1.19.2 Server Setup
### Preparation
1. **Ensure Java is Installed**: Minecraft servers require the Java runtime environment. Make sure you have the latest version of Java installed on your computer. You can check if Java is installed by running `java -version` in the command line.
2. **Download Server File**: Visit the official Minecraft website to download the 1.19.2 version of the server file (`minecraft_server.1.19.2.jar`).
### Configuring the Server
1. **Create a Server Folder**: Choose a location on your computer to create a new folder that will hold all the Minecraft server files.
2. **Move Server File**: Move the downloaded server file (`minecraft_server.1.19.2.jar`) into the folder you created.
3. **Run the Server**:
- Open the command line interface.
- Navigate to the folder containing the server file using the `cd` command.
- Run the following command to start the server:
```
java -Xmx1024M -Xms1024M -jar minecraft_server.1.19.2.jar nogui
```
- The `-Xmx1024M` and `-Xms1024M` parameters set the maximum and initial memory allocation for the server in megabytes (MB). You may need to adjust these values based on your server's hardware.
4. **Accept the EULA**: The first time you run the server, a file named `eula.txt` will be generated. Open this file and change `eula=false` to `eula=true` to accept the Minecraft End User License Agreement.
5. **Restart the Server**: Run the `java` command again to start the server.
### Configuring Server Properties
1. **Edit the `server.properties` File**: After the first server run, a configuration file named `server.properties` will be generated. You can edit this file to customize the server settings, such as game mode, difficulty, etc. If you are testing the capabilities of multiple agents on VillagerBench, set the mode to peaceful and the terrain to superflat.
2. **Port Forwarding**: If you want other players to be able to access your server from outside networks, you may need to set up port forwarding on your router. By default, the Minecraft server uses port 25565.
3. **Start and Test the Server**: After completing all the settings, restart the server and try connecting to it to ensure everything is running smoothly.
### Important Notes
- Ensure that any agents that may join the server have been granted admin privileges (you can add permissions with the command `/op agent_name`).
- Make sure your server's firewall rules allow the port used by the Minecraft server.
- Regularly back up your server files to prevent data loss.
- Keep the server's Java version up to date for optimal performance and security.
The steps above provide a basic tutorial for setting up a Minecraft server. Depending on your specific needs and configuration, more advanced settings may be required.
## Citation
π If you find our work helpful, please leave us a star and cite our paper.
```
@inproceedings{dong2024villageragent,
title={VillagerAgent: A Graph-Based Multi-Agent Framework for Coordinating Complex Task Dependencies in Minecraft},
author={Dong, Yubo and Zhu, Xukun and Pan, Zhengzhe and Zhu, Linchao and Yang, Yi},
booktitle={Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (ACL)},
year={2024},
url={https://arxiv.org/abs/2406.05720}
}
```
## Contribution Guide π€
Jump on board! We love contributions. Before you submit your pull request, make sure:
- Your changes have aced the tests π.
- You've spruced up the docs (if you've added some pizzazz) π.
## License π
This project is all yours under the [MIT License](LICENSE).