How to compile and use Facebook Research’s Craftassist

UPDATE: These instructions are likely out-dated, and Facebook has made the instructions on their GitHub easier as well, please follow those before attempting mine.

Facebook Research set out to create a virtual assistant bot in Minecraft and since I made this video on Reddit people have asked how to set it up, and because Facebook’s instructions on their GitHub aren’t the best I decided to write my own.

Just testing with Facebook’s Minecraft AI from Minecraft

  1. Make sure to have some sort of a virtual Linux distro, I’m using WSL Ubuntu from the windows store.
  2. Clone the GitHub repo so type “git clone --recursive https://github.com/facebookresearch/craftassist.git” into Ubuntu
  3. Update Ubuntu’s packages, “sudo apt-get update && sudo apt-get upgrade
  4. Install all the right dependencies to compile, “sudo apt-get install cmake python3 python3-pip libgoogle-glog-dev libboost-all-dev libeigen3-dev gcc screen
  5. Install all the right dependencies for python to run the code, “pip3 install numpy sentry_sdk torch scipy word2number snowballstemmer python-Levenshtein ipdb spacy
  6. Change the current directory to craftassist, “cd craftassist
  7. Compile everything, “make
  8. Start the server “screen python3 ./python/cuberite_process.py” then detach from the screen session by pressing ‘Ctrl + A‘ and ‘Ctrl + D
    • You can list the screen sessions by typing “screen -list
    • You can resume a screen session by typing “screen -r [session number]
  9. Change the version of Minecraft to 1.12.x by following this guide
  10. Connect to your server by clicking in the Minecraft client Multiplayer > Direct Connect > localhost:25565
  11. Start the assistant “screen python3 ./python/craftassist/craftassist_agent.py
    • The assistant should join the game and you can ask it to do random things.

Thanks for reading!
Steve.


Comments

free lee Jan 11, 2020

1thanks for your great job! I've encountered such a problem, could you tell me how to solve it ?

afree2004@DESKTOP-HBLFG20:~/craftassist$ screen python3 ./python/craftassist/craftassistagent.py
[screen is terminating]
afree2004@DESKTOP-HBLFG20:~/craftassist$ python3 ./python/craftassist/craftassistagent.py
Traceback (most recent call last):
File "./python/craftassist/craftassistagent.py", line 27, in <module>
import memory
File "/home/afree2004/craftassist/python/craftassist/memory.py", line 23, in <module>
import dance
File "/home/afree2004/craftassist/python/craftassist/dance.py", line 9, in <module>
import tasks
File "/home/afree2004/craftassist/python/craftassist/tasks.py", line 18, in <module>
from perception import groundheight
File "/home/afree2004/craftassist/python/craftassist/perception.py", line 24, in <module>
BLOCKDATA = minecraftspecs.getblockdata()
File "/home/afree2004/craftassist/python/craftassist/minecraftspecs.py", line 24, in getblockdata
BLOCKDATA = pickleload("blockimages/blockdata")
File "/home/afree2004/craftassist/python/craftassist/minecraftspecs.py", line 68, in pickleload
return pickle.load(f)
pickle.UnpicklingError: invalid load key, 'v'.

Reply
satyamedh Jan 12, 2020

go check out this issue, just got fixed https://github.com/facebook...

ps, you commented there, didnt you????
satyamedh

Reply
(Optional, and will not be displayed or shared)

If I helped you please sponsor me on GitHub!

This site doesn't use any Google services or advertising, read more here.

© Stephen Horvath 2025