Update README.md
Browse files123---license: apache-2.0---123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163---license: apache-2.0tags:- embodied-ai- agent- reinforcement-learning- minecraft- multimodalarxiv: 2410.22194---# ADAM: An Embodied Causal Agent in Open-World Environments<div align="center">[[Website]](https://opencausalab.github.io/ADAM)[[Arxiv]](https://arxiv.org/abs/2410.22194)[[PDF]](https://arxiv.org/pdf/2410.22194)[[GitHub]](https://github.com/OpenCausaLab/ADAM)______________________________________________________________________</div>We introduce ADAM, An emboDied causal Agent in Minecraft, that can autonomously navigate the open world, perceive multimodal contexts, learn causal world knowledge, and tackle complex tasks through lifelong learning.ADAM is empowered by four key components: 1) an interaction module, enabling the agent to execute actions while documenting the interaction processes; 2) a causal model module, tasked with constructing an ever-growing causal graph (i.e., technology tree) from scratch, which enhances interpretability and diminishes reliance on prior knowledge; 3) a controller module, comprising a planner, an actor, and a memory pool, which uses the learned causal graph to accomplish tasks; 4) a perception module, powered by multimodal large language models, which enables ADAM to perceive like a human player. Our project page is at [https://opencausalab.github.io/ADAM](https://opencausalab.github.io/ADAM)Extensive experiments show that ADAM accurately constructs an almost perfect causal graph, enabling effective task decomposition and execution with increased efficiency and strong interpretability. Additionally, in modified Minecraft scenarios where no prior knowledge is available, ADAM maintains its performance and shows remarkable robustness and generalization capability.We provide the implementation of ADAM in this repo. We employ [Mineflayer](https://github.com/PrismarineJS/mineflayer),a JavaScript-based framework designed for integration with the commercial Minecraft. For visualprocessing, we utilize [prismarine-viewer](https://github.com/PrismarineJS/prismarine-viewer), an API for visualizingMinecraft content. The encapsulation of the Mineflayer uses the implementationin [VOYAGER](https://github.com/MineDojo/Voyager).# InstallationADAM requires Python ≥ 3.9 and Node.js ≥ 16.13.0. Our experiment tested the Minecraft environment on the **Windows**platform. The Azure Cloud Service is also available in the implementation.## Python Install```git clone https://github.com/OpenCausaLab/ADAMcd ADAMpip install -e .```## Node.js InstallIn addition to the Python dependencies, you need to install the following Node.js packages:```cd env/mineflayernpm install -g npxnpm installcd mineflayer-collectblocknpx tsccd ..npm install```For users from mainland China, we recommend the following installation method:```cd env/mineflayernpm config set registry https://registry.npmmirror.comnpm install -g npxnpm installcd mineflayer-collectblocknpx tsccd ..npm install```## Minecraft Instance and Fabric Mods InstallThe tutorial is from [VOYAGER](https://github.com/MineDojo/Voyager).### Minecraft Instance InstallFollow the instructions in [Minecraft Login Tutorial](installation/minecraft_instance_install.md) to set up yourMinecraft Instance.### Fabric Mods InstallFollow the instructions in [Fabric Mods Install](installation/fabric_mods_install.md) to install the mods.# Getting StartedYou can run ADAM by:```pythonfrom Adam.ADAM import ADAMwith open("API_key.txt", 'r') as key_file:openai_api_key = key_file.read()ADAM = ADAM(mc_port=52832,llm_model_type='gpt-4-turbo',use_local_llm_service=False,openai_api_key=openai_api_key,parallel=True)ADAM.explore(['diamond'], [])```# Resume from a checkpointOur implementation has methods for automatic saving and automatic loading of checkpoints. If you want to continue from acheckpoint, you can use the following code.```pythonfrom Adam.ADAM import ADAMwith open("API_key.txt", 'r') as key_file:openai_api_key = key_file.read()ADAM = ADAM(mc_port=52832,llm_model_type='gpt-4-turbo',use_local_llm_service=False,openai_api_key=openai_api_key,auto_load_ckpt=True,parallel=True)ADAM.explore(['diamond'], [])```If you want to continue from a specific checkpoint, you can use the following code.```pythonfrom Adam.ADAM import ADAMwith open("API_key.txt", 'r') as key_file:openai_api_key = key_file.read()ADAM = ADAM(mc_port=52832,llm_model_type='gpt-4-turbo',use_local_llm_service=False,openai_api_key=openai_api_key,load_ckpt_path='your_ckpt_path',parallel=True)ADAM.explore(['diamond'], [])```# Paper and Citation```bibtex@article{yu2024adam,title = {ADAM: An Embodied Causal Agent in Open-World Environments},author = {Shu Yu and Chaochao Lu},year = {2024},journal = {arXiv preprint arXiv:2410.22194}}```
README.md+163-3