Skip to content

erameh6/Gensyn-Blockassist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Gensyn-Blockassist

BlockAssist is an AI-powered Minecraft assistant that learns from your gameplay. It starts with limited knowledge but improves as you play and build.


🚀 Getting Started

Steps:

  1. Follow the setup instructions below.
  2. Play Minecraft episodes and complete the building progress bar.
  3. Track your progress on the leaderboard.

⚙️ Hardware Requirements

  • Minimum: 8 GB RAM
  • Recommended: 16 GB RAM
  • Multi-core CPU
  • 100 GB of available disk space

🌍 Environment Setup

Local Setup (Recommended)

  • Supported OS: Linux or macOS

Other Options

  • WSL (Windows Subsystem for Linux): Coming soon.
  • Ubuntu via VirtualBox (Windows): Use this method if you want to run Ubuntu on Windows. (Note: Performance may be slower due to virtualization overhead.)

Cloud GPU Setup (with VNC Desktop)

Run Minecraft on a remote GPU using a VNC desktop interface. Note: Performance will be slower, but setup is straightforward.

Using Vast.ai (Linux Desktop Template)

  1. Rent a GPU using the custom Moei Linux Desktop Container template (includes nvh264enc encoder).
  2. Wait for the GPU deployment on the Instances page.

Accessing Your GPU Desktop

You have several options:

  • Selkies Low Latency Desktop (Recommended) — Best performance.

    • Reduce video bitrate if you have a low-bandwidth connection.
  • Apache Guacamole Desktop — Lower performance.

  • Local VNC Client (Advanced)

    1. Open your GPU dashboard and access the terminal via Jupyter Terminal.

    2. Retrieve your desktop password:

      echo $OPEN_BUTTON_TOKEN
    3. Find the mapped host:port for 5900/tcp (e.g., 70.45.225.15:18483).

    4. Install RealVNC and connect using the host:port and password.

    5. Follow the VNC Linux Desktop Full Guide to install Chrome or other apps.

⚠️ Note: The cloud installation is experimental and complex for non-Linux users. Alternatively, you can try the Sunshine + Moonlight remote setup for better performance, but proceed only if you’re familiar with advanced configurations.


🧩 Installation Guide

Step 1: Install Dependencies

sudo apt update
sudo apt install -y \
  make build-essential gcc \
  libssl-dev zlib1g-dev libbz2-dev libreadline-dev \
  libsqlite3-dev libncursesw5-dev xz-utils tk-dev \
  libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev \
  curl git unzip \
  libxi6 libxrender1 libxtst6 libxrandr2 libglu1-mesa libopenal1

Step 2: Clone the Repository

git clone https://github.com/gensyn-ai/blockassist.git
cd blockassist

Step 3: Install Node.js (v20)

node --version
npm --version

sudo apt remove -y nodejs npm
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs

Step 4: Install Yarn

curl -o- -L https://yarnpkg.com/install.sh | bash
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"

Step 5: Install Java

./setup.sh
exec $SHELL

Step 6: Install pyenv

curl https://pyenv.run | bash
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"

Step 7: Install Python

pyenv install 3.10
pyenv global 3.10

Step 8: Install Project Dependencies

pip install --upgrade pip
pip install -e . --no-cache-dir
pip install "mbag-gensyn[malmo]" --no-cache-dir
pip install psutil readchar

🎮 Running BlockAssist

  1. Launch Minecraft.

  2. In the project directory:

    cd blockassist
    
    export PYENV_ROOT="$HOME/.pyenv"
    export PATH="$PYENV_ROOT/bin:$PATH"
    eval "$(pyenv init --path)"
    eval "$(pyenv init -)"
    
    python run.py

Login Prompts

  • Hugging Face Token: Create an API token with Write permissions and enter it when prompted.
  • Gensyn Testnet Login: Visit http://localhost:3000 to log in. (This step is skipped if you’ve logged in before.)

🕹️ Playing Minecraft

  • Wait for two Minecraft windows to open.
  • Press ENTER in the terminal.
  • The game and map will load automatically — do not create your own world.

Controls:

  • Left-click (pickaxe): Remove block.
  • Left-click (dirt on red tiles): Place dirt.
  • Right-click (stone/glass/planks): Place materials.

When finished, press ENTER in the terminal to end the session.

Even unfinished episodes still count towards your leaderboard participation.


🧠 Training and Verification

After completing a session, your model will begin training and be submitted to Hugging Face and Gensyn’s smart contract. Once you see a blockchain transaction in the log, your submission is complete.


🏆 Leaderboard

Visit the BlockAssist leaderboard to view your earned participation points.


⚙️ Configuration

You can modify parameters in src/blockassist/config.yaml or via command-line flags:

  • episode_count: Number of playthroughs per session.
  • num_training_iters: Number of training iterations across episodes.

🧩 Troubleshooting

CUDNN Error

wget https://developer.download.nvidia.com/compute/cudnn/9.11.0/local_installers/cudnn-local-repo-ubuntu2204-9.11.0_1.0-1_amd64.deb
sudo dpkg -i cudnn-local-repo-ubuntu2204-9.11.0_1.0-1_amd64.deb
sudo cp /var/cudnn-local-repo-ubuntu2204-9.11.0/cudnn-local-4EC753EA-keyring.gpg /usr/share/keyrings/
echo "deb [signed-by=/usr/share/keyrings/cudnn-local-4EC753EA-keyring.gpg] file:///var/cudnn-local-repo-ubuntu2204-9.11.0 /" | sudo tee /etc/apt/sources.list.d/cudnn-local.list
sudo apt update
sudo apt install -y libcudnn9 libcudnn9-dev

Increase Malmo Startup Timeout

cd blockassist
sed -i 's#python -m malmo.minecraft launch#python -m malmo.minecraft launch --timeout 300#' scripts/run_malmo.sh

View Logs

  • Minecraft Logic Logs:

    tail -f logs/malmo.log
  • Startup Logs:

    tail -n 200 logs/run.log
  • Login Page Logs:

    tail -n 200 logs/yarn.log

💬 Community

Join the BlockAssist Discord and follow the instructions to get your community role.


License: MIT Stars: ⭐ 33  Forks: 🍴 12


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published