Read this section please.
This project so far is the result of thousands of hours of endless reasearch, trials and errors, and just the simple goal of eliminating loneliness from minecraft as much as possible. If you liked my work, please consider donating so that I can continue to work on this project in peace and can actually prove to my parents that my work is making a difference. (Also not having to ask for pocket money from mom).
Just know that I won't ever give up on this project.
Buy me a coffee
https://buymeacoffee.com/shasankp000
Paypal
Current stage of the mod
Since the new semester in my college has started this month, I am gonna be under really heavy pressure, since I have to study 11 subjects in total (Machine learning, Linear Algebra, Physics, CyberSecurity, and a lot more lol). Don't worry though I won't stop working on this project, it's just that the updates will be quite slower.
It's understandable if y'all leave by then or give up on this project, so, I won't mind. :))
Thank you all from the core of my heart for the support so far. I never imagined we would come this far.
Latest Update: 21/8/2025 at 04:08 AM IST (Indian Standard Time)
Please have patience while waiting for updates. Since I am the only guy working on this project, it does take me time to address all the issues/add in new features.
Changelog v1.0.5.2-release+1.21.1
Important: Earlier proposed second part features will be added in the next patch and this new update marks the end of support for 1.20.6 and below.
Thanks to https://github.com/arichornlover AI Player has now been updated to version 1.21.1
This minor update of AI player updates the mod to version 1.21.1 and also brings support for other custom API providers.
Custom OpenAI-Compatible Provider Support
This feature allows you to use alternative AI providers that are compatible with the OpenAI API standard, such as OpenRouter, TogetherAI, Perplexity, and others.
How to Use
1. Enable Custom Provider Mode
Set the system property(JVM argument) when launching the game:
-Daiplayer.llmMode=custom
2. Configure API Settings
- Firstly, delete the existing settings.json5 in the config folder (save any api keys elsewhere for the meantime)
- Open the in-game API Keys configuration screen (
/configMan) and then click the API Keys button. - Set the following fields:
- Custom API URL: The base URL of your provider (e.g.,
https://openrouter.ai/api/v1) - Custom API Key: Your API key for the provider
- Custom API URL: The base URL of your provider (e.g.,
- Hit save. In case you don't see the list of models immediately hit the "Refresh Models" button once or twice.
- If you still don't see the list of models, close the config manager, type
/configManagain and you should see the list of models available. - ollama is still required to be open in the background because of the embedding model being used, but I will separate this entirely in the next mini patch, by adding an embedding api endpoint from the providers, and also upgrading to the
embedddinggemmamodel fromnomic-embed-text
3. Select a Model
The system will automatically fetch available models from your provider's /models endpoint and display them in the model selection interface.
Supported Providers
Any provider that implements the OpenAI API standard should work. Some examples:
- OpenRouter:
https://openrouter.ai/api/v1 - TogetherAI:
https://api.together.xyz/v1 - Perplexity:
https://api.perplexity.ai/ - Groq:
https://api.groq.com/openai/v1 - Local LM Studio:
http://localhost:1234/v1
API Compatibility
The custom provider implementation uses the following OpenAI API endpoints:
GET /models- For fetching available modelsPOST /chat/completions- For sending chat completion requests
Your provider must support these endpoints with the same request/response format as OpenAI's API.
Troubleshooting
- "Custom provider selected but no API URL configured": Make sure you've set the Custom API URL field
- "Custom API key not set in config!": Make sure you've set the Custom API Key field
- Empty model list: Check that your API key is valid and the URL is correct
- Connection errors: Verify that the provider URL is accessible and supports the OpenAI API format
Changelog v1.0.5.1-release+1.20.6-bugfix-2
- Fixed a lot of bugs that got overlooked in the previous testing phase.
Changelog v1.0.5.1-release+1.20.6
I realized that many of the commitments made in the previous announcement were too ambitious to implement in a single update. To keep development smooth, this release is the first part of a two-part update.
This update focuses on core system rewrites and better AI decision-making, laying the foundation for the next wave of features.
Also support for versions below 1.20.6 has been dropped due to codebase changes that I simply can't handle migrating by myself. However others are free to port to lower versions.
Upcoming second part will have the update in 1.20.6 as the final update for 1.20.6 and also will have a new update to directly 1.21.6 where hence the future versions will continue onwards.
What's New in 1.0.5.1
Revamped NLP System
- Fully redesigned Natural Language Processing (NLP) — no more "I couldn’t understand you."
- This is a new and experimental system I’ve been designing and rigorously testing over the last month.
- Results are promising, but not yet up to my personal standards — expect further refinements in future updates.
Rewritten RAG & Database System (with Web Search)
- New Retrieval-Augmented Generation (RAG) system integrated with a database and web search.
- The AI now provides accurate factual information about Minecraft, drastically reducing hallucinations.
- Supported search providers:
- Gemini API
- Serper API
- Brave Search API (in development, will push this to the next patch instead)
Meta-Decision Layer
- Added a task chaining system:
- You give a high-level instruction → the bot automatically breaks it into smaller tasks → executes step by step.
Current Supported Tasks:
- Go to a location
- Go to a location and mine resources
- Detect nearby blocks & entities
- Report stats (health, oxygen, hunger, etc.)
API Integrations
AI Player now supports multiple LLM providers (configurable via API keys):
- OpenAI
- Anthropic Claude
- Google Gemini
- xAI Grok
Web Search Tool
If you select the Gemini Search as the web search tool for the LLM, it will use the API key you have set as your LLM provider in the settings.json5 file automatically.
For https://serper.dev/ search, get an api key from serper.dev and then navigate to the config folder in game, open the ai_search_config.json and put the key:

(Note: I couldn’t test all of these myself except the Gemini API since API keys are costly, but the integrations are ready.)
Bugfixes
- Fixed bug where JVM arguments were not being read.
- Removed owo-lib. AI-Player now uses an in-house config system.
- Fixed API keys saving issues.
- Added a new Launcher Detection System. Since Modrinth launcher was conflicting by it's own variables path system so the QTable was not being loaded. Supports: Vanilla MC Launcher, Modrinth App, MultiMC, Prism Launcher, Curseforge launcher, ATLauncher, and even unknown launchers which would be unsupported by default, assuming they follow the vanilla mc launcher's path schemes.
- Revamped the Config Manager UI with a responsive UI along with a search option for providers with a lot of models (like gemini).

Development Notes
- While this update may look small on the surface, designing the systems, writing the code, and debugging took a huge amount of time.
- On top of this, I’ve picked up more freelance contracts and need to focus on my final-year project.
- Updates will continue — just at a slower pace.
Coming Soon in Part 2
Here’s what’s planned for the next patch:
-
Combat & Survival Enhancements
- Bot uses weapons (including ranged) to fend off mobs.
- Reflex module upgrades.
- More natural world interactions (e.g., sleeping at night).
-
Improved Path Tracer
- Smarter navigation through water and complex terrain.
-
Self-Goal Assignment System
- Bot assigns itself goals like a real player.
- Will initiate conversations with players and move autonomously.
-
Mood System (design phase)
- Adds emotional context and varied behavior.
-
Player2 Integration
- Highly requested — this will be the first major feature of the second update.
Upcoming changes (some of them might be seen in the second patch).
- Switch to Deep-Q learning instead of traditonal q-learning (TLDR: use a neural network instead of a table)
- Create custom movement code for the bot for precise movement instead of carpet's server sided movement code.
-
Implement human consciousness level reasoning??? (to some degree maybe) (BIG MAYBE)
Current bugs in this version :
- Found a few more bugs, bugfix will be released tomorrow.
Mod description
Ever felt lonely while playing minecraft alone during that two-week phase? Well, this mod aims to solve that problem of loneliness, not just catering to this particular use case, but even (hopefully in the future) to play in multiplayer servers as well.
And the best part? You can run completely offline language models based on your computer's specifications.
Please note that this is not some sort of a commercialised AI product. This project is just a solution to a problem many Minecraft players have faced and do continue to face.
What does this mod do?
This mod so far adds in a second spawnable player(or bot) via the carpet mod, and you can talk to it through a large language model via ollama completely offline on your pc and so far I have integrated reinforcement learning for the bot to interact and learn from it's environment in the context of "reflex actions".
Goal based learning will be added soon in upcoming updates.
This mod also relies on the owo-lib mod for configuration handling.
This mod relies on the internal code of the Carpet mod, please star the repository of the mod: https://github.com/gnembon/fabric-carpet (Giving credit where it's due)
This mod also relies on the ollama4j project. https://github.com/amithkoujalgi/ollama4j
Installation Requirements
Requires Fabric api latest version.
Requires Carpet mod version as stated in the dependency section
Sample video of the mod (as of version 1.0.5.1)
https://streamable.com/imko3x?src=player-page-share
Sample video of the mod (as of the version 1.0.3-alpha-1)
Changelog video (as of the current version 1.0.3-alpha-2)
better and faster reflex actions, reduced training time.
Youtube tutorial soon
Installation & Setup Guide
Step 1: Install Java 21
This project requires Java 21 to run.
-
Download Java 21 from BellSoft JDK 21 LTS.
-
On Windows: click Download MSI and complete installation.
-
On Linux: install via your package manager, e.g.
sudo apt install openjdk-21-jdk
Step 2: Install Ollama
Go to
Download based on your operating system.
After installation, run ollama from your desktop. This will launch the ollama server.
This can be accessed in your system tray

Step 3: Configure Ollama Models
Open your command line (CMD/Terminal) and run:
ollama pull nomic-embed-text # Embedding model (required)
ollama pull qwen3:8b # Preferred language model (used in testing)
For previous users:
ollama rm gemma2 # Remove old model if installed
ollama rm llama2 # Remove old model if installed
ollama rm llama3.2 # Remove old model if installed
If you’ve run the mod before, delete old config:
.minecraft/config/settings.json5
✅ Make sure the Ollama server is running before starting the game.
Step 4: Download Dependencies
Ensure that all required dependencies (including Carpet mod) are installed.
Step 5: JVM Argument Setup
Before launching the game, you must provide the following JVM argument:
-Daiplayer.llmMode=<provider>
Examples:
-
Local Ollama (default):
-Daiplayer.llmMode=ollama -
OpenAI:
-Daiplayer.llmMode=openai -
Anthropic Claude:
-Daiplayer.llmMode=claude -
Google Gemini:
-Daiplayer.llmMode=gemini -
xAI Grok:
-Daiplayer.llmMode=grok
Step 6: Configure API Keys
Inside the Config Manager, there is now a dedicated section for entering API keys for all supported providers.
- For local models, you can select your preferred Ollama LLM.
- For hosted providers, enter your API keys accordingly.
⚠️ Note: Ollama must always be running since the embedding model (nomic-embed-text) is local and required.
Step 7: Launch the Game
- Start Minecraft.
- Before loading up a world (if you are on singleplayer) once the world loading screen reaches 100% it might lag a bit (or not) due to an NLP model being loaded in game
- Before loading up a world, please wait till you see all the folders in a structure with files like this:

- These files are for a one-time download only, so it's only for the first time on using this version.
- Once in the game, if you used a different provider other than ollama in the JVM argument, use the config manager to select your desired LLM/provider and set their API keys.
- Type the following command to spawn your bot:
/bot spawn <yourBotName> <training|play>
training→ Spawns bot in training mode (does not connect to LLM).play→ Normal mode with full AI features.
Important Notes
- It’s best to create a separate modpack for this mod, since Ollama must run in the background whenever you play.
- Ollama itself uses minimal memory, so it shouldn’t affect performance significantly.
Web Search Tool
If you select the Gemini Search as the web search tool for the LLM, it will use the API key you have set as your LLM provider in the settings.json5 file automatically.
For https://serper.dev/ search, get an api key from serper.dev and then navigate to the config folder in game, open the ai_search_config.json and put the key:

In-Game Commands
Main Command:
/bot
Example Usage:
/bot spawn Steve training
The updated syntax comes courtesy of Mr. Álvaro Carvalho.
Since the mod depends on Carpet, you can also spawn bots using Carpet’s commands. If you’re playing in offline mode, it’s recommended to use the mod’s built-in spawn command instead.
Important
Also remember that if you are using this mod, it's best to create a modpack for it's own as it will require you to run ollama server in the background every time you launch the game itself. Ollama server itself doesn't consume much memory so you should be fine.
Within the game
Main command
/bot
Sub commands:
A lot of the commands have been changed since the last version. Please check changelog of the latest version.
Example Usage:
/bot spawn Steve training
The above command syntax changes credits go to Mr. Álvaro Carvalho
And yes since this mod relies on carpet mod, you can spawn a bot using carpet mod's commands too and try the mod. But if you happen to be playing in offline mode, then I recommend using the mod's in built spawn command.
All Versions
+ Add Version- Version backport for
26.1.xfrom26.2, with full feature parity.
- No major changes, just removed redundant code and optimized the mod.
- Fixed one tiny bug where the bot would keep spamming "Hi" whenever a player was nearby.
The mod has now been ported to minecraft 26.2, and all the QoL changes in this version are being backported to the previous versions (1.21.1, 1.21.4 and 1.21.6/1.21.8)
Linux compatibility issues fix (major bugfixes with world crashes, djl version compatibility issues, etc, sqlite3 problems, etc).
MacOS compatibility issues fix.
A much faster lightweight goal planner for the bot.
A mood and persona system for the bot that's dynamically influenced by player actions and/or world events, which in turn will have an effect on the bot's action.
A dedicated "following" system for the bot which will allow the bot to track and follow the player, allow it to go on expeditions with the player (very experimental, as the moment is not exactly precise due to the bot being a server sided one).
A trading system with the bot, where you can trade your items with the bot (sneak-right-click) and it will trade its own items with you.
An autonomous self goal assignment system for the bot, it gives the bot "quests" to do, so that it automatically moves by itself in the world, and does stuff, like a real player. It will also initiate conversations with you by it's own, or react to world events or player induced world events (like player death or player finding a diamond, etc).
Updated LLM selection screen (
/configMan)The NLP bugs have been reduced to 1 in 15 times, and I have planned an updated NLP architecture to finally put the problem to sleep once and for all (will be present in future upgrades).
And also, last but not the least, more bugfixes.
AI-Player no longer requires ollama to be exclusively used and installed, instead it's now compatible with any OpenAI-API compatible provider, including local llm serving tools such as ollama, LM studio, etc.
More natural bot behaviour (such as sleeping at night, better focus on eating food if running low on health/hunger -- this will be learnt over time in training mode).
I unfortunately still don't have a fix for the pathfinding and path tracing issues since this is still a server sided bot and server sided minecraft physics are janky.
That's all for this update, the QoL changes in this update are being backported and should be released soon, and I hope I can drop more frequent updates, if I can get a break from life that is.
I might make a youtube video on this update if I get the time.
## What's new
- Implemented a new goal planner system that acts as a fast lightweight alternative to the previous LLM-based planner.
The previous one still exists but as a fallback and is triggered in case the first one fails.
- Code fixes, lots of it.
- Implemented a new ahead of time learning system where the bot can now go through stored training data in a sequence format and easily detect which set of actions led to it's death and thus not perform such actions in future based (or perform, based on it's risk appetite)
- Added a download progress bar in the main menu to display the download progress of the NLP models so that users don't already start the game (in case of first time installations)
- Added an aiming system for the bot to deal ranged attacks using bow and crossbow, and also block attacks using shields.
- Optimized the learning system to make it much faster and lag a lot less.
- Fixed existing Github issues (upto pre Jan 2026)
## 🏗️ Recent Major Features
### PlaceBlock Tool - Build Anything!
The AI can now place blocks in the world through natural language commands!
- Features:**
- 🏗️ **Smart Block Placement** - Place blocks at any coordinates with full validation
- 📦 **Automatic Inventory Management** - Finds blocks in inventory and moves to hotbar
- ✅ **Comprehensive Safety Checks** - Distance, inventory, position, and surface validation
- 🎯 **Precise Positioning** - Bot automatically faces the target before placing
- Example Commands:**
- "Place 5 stone blocks at x:100, y:64, z:200"
- "Fix this wall by placing cobblestone at the gap"
- "Build a floor using oak planks"
### Unified Embedding System - Any Provider, Zero Config!
Multi-provider embedding support with automatic selection.
- Features:**
- 🎯 **Fully Automatic** - Embeddings use the same provider as your main LLM
- 🔌 **Universal Support** - OpenAI, Gemini, Grok, Custom providers, or Ollama (local)
- 💰 **Cost Savings** - Intelligent fallback to free local Ollama embeddings
- ⚙️ **Zero Configuration** - Just set your API key and go!
- Supported Providers:**
- ✅ OpenAI (text-embedding-3-small)
- ✅ Google Gemini (text-embedding-004)
- ✅ xAI/Grok (text-embedding-ada-002)
- ✅ Custom OpenAI-compatible (LM Studio, vLLM, TabbyAPI)
- ✅ Ollama (nomic-embed-text) - Free local fallback
For users relying on OpenAI, Google Gemini and xAI/Grok providers, they will no longer need to install ollama for embedding models.
### Ollama API Compatibility fix
Support for reasoning models like DeepSeek-R1 using the updated ollama api has now been implemented.
## 🔧 Code Quality Improvements
### Optimizations & Cleanup
- ✅ Removed unused imports and dead code
- ✅ Improved threading with dedicated worker pools
- ✅ Better resource cleanup on shutdown
- ✅ Reduced memory footprint
### Bug Fixes
- ✅ **Fixed Linux path handling** for Prism Launcher Flatpak installations
- ✅ **Fixed Windows PyTorch binary paths** (missing backslash issue)
- ✅ **Improved thread safety** in state management
- ✅ **Removed duplicate class warnings**
For a detailed information please visit: https://shasankp000.github.io/AI-Player-Website/#/documentation
Or for setup instructions visit: https://shasankp000.github.io/AI-Player-Website/#/quick-start
This minor update of AI player updates the mod to version 1.21.1 and also brings support for other custom API providers.
# Custom OpenAI-Compatible Provider Support
This feature allows you to use alternative AI providers that are compatible with the OpenAI API standard, such as OpenRouter, TogetherAI, Perplexity, and others.
## How to Use
### 1. Enable Custom Provider Mode
Set the system property(JVM argument) when launching the game:
``
- Daiplayer.llmMode=custom
`
### 2. Configure API Settings
0. Firstly, delete the existing settings.json5 in the config folder (save any api keys elsewhere for the meantime)
1. Open the in-game API Keys configuration screen (/configMan) and then click the API Keys button.
2. Set the following fields:
- Custom API URL**: The base URL of your provider (e.g.,
https://openrouter.ai/api/v1)Custom API Key**: Your API key for the provider 3. Hit save. In case you don't see the list of models immediately hit the "Refresh Models" button once or twice.
4. If you still don't see the list of models, close the config manager, type /configMan again and you should see the list of models available.
5. ollama is still required to be open in the background because of the embedding model being used, but I will separate this entirely in the next mini patch, by adding an embedding api endpoint from the providers, and also upgrading to the embedddinggemma model from nomic-embed-text
### 3. Select a Model
The system will automatically fetch available models from your provider's /models endpoint and display them in the model selection interface.
## Supported Providers
Any provider that implements the OpenAI API standard should work. Some examples:
- OpenRouter**:
https://openrouter.ai/api/v1TogetherAI**: https://api.together.xyz/v1Perplexity**: https://api.perplexity.ai/Groq**: https://api.groq.com/openai/v1Local LM Studio**: http://localhost:1234/v1
## API Compatibility
The custom provider implementation uses the following OpenAI API endpoints:
GET /models - For fetching available modelsPOST /chat/completions` - For sending chat completion requestsYour provider must support these endpoints with the same request/response format as OpenAI's API.
## Troubleshooting
- "Custom provider selected but no API URL configured"**: Make sure you've set the Custom API URL field
- "Custom API key not set in config!"**: Make sure you've set the Custom API Key field
- Empty model list**: Check that your API key is valid and the URL is correct
- Connection errors**: Verify that the provider URL is accessible and supports the OpenAI API format
- Fixed a lot of bugs that went unnoticed in my first round of testing.
- Fixed bug where JVM arguments were not being read.
- Removed owo-lib. AI-Player now uses an in-house config system.
- Fixed API keys saving issues.
- Added a new Launcher Detection System. Since Modrinth launcher was conflicting by it's own variables path system so the QTable was not being loaded. Supports: Vanilla MC Launcher, Modrinth App, MultiMC, Prism Launcher, Curseforge launcher, ATLauncher, and even unknown launchers which would be unsupported by default, assuming they follow the vanilla mc launcher's path schemes.
- Revamped the Config Manager UI with a responsive UI along with a search option for providers with a lot of models (like gemini).

## Overview
AI Player **v1.0.5.1** is now live! 🎉
I realized that many of the commitments made in the previous announcement were too ambitious to implement in a single update. To keep development smooth, this release is the **first part** of a two-part update.
This update focuses on **core system rewrites** and **better AI decision-making**, laying the foundation for the next wave of features.
## 🚀 What's New in 1.0.5.1
### 🧠 Revamped NLP System
- Fully redesigned Natural Language Processing (NLP) — no more *"I couldn’t understand you."*
- This is a **new and experimental system** I’ve been designing and rigorously testing over the last month.
- Results are promising, but not yet up to my personal standards — expect further refinements in future updates.
### 📚 Rewritten RAG & Database System (with Web Search)
- New Retrieval-Augmented Generation (RAG) system integrated with a database and **web search**.
- The AI now provides **accurate factual information about Minecraft**, drastically reducing hallucinations.
- Supported search providers:
- Gemini API
- Serper API
- Brave Search API (in development, will push this to the next patch instead)
### 🧩 Meta-Decision Layer
- Added a **task chaining system**:
- You give a high-level instruction → the bot automatically breaks it into smaller tasks → executes step by step.
#### Current Supported Tasks:
- Go to a location
- Go to a location and mine resources
- Detect nearby blocks & entities
- Report stats (health, oxygen, hunger, etc.)
### 🔌 API Integrations
AI Player now supports multiple LLM providers (configurable via API keys):
- OpenAI**
- Anthropic Claude**
- Google Gemini**
- xAI Grok**
### Web Search Tool
If you select the Gemini Search as the web search tool for the LLM, it will use the API key you have set as your LLM provider in the settings.json5 file automatically.
For https://serper.dev/ search, get an api key from serper.dev and then navigate to the config folder in game, open the
ai_search_config.json and put the key:
- (Note: I couldn’t test all of these myself except the Gemini API since API keys are costly, but the integrations are ready.)*
## 🛠️ Development Notes
- While this update may look small on the surface, designing the systems, writing the code, and debugging took **a huge amount of time**.
- On top of this, I’ve picked up more freelance contracts and need to focus on my final-year project.
- Updates will continue — just at a slower pace.
## 📌 Coming Soon in Part 2
Here’s what’s planned for the **next patch**:
- ⚔️ **Combat & Survival Enhancements**
- Bot uses weapons (including ranged) to fend off mobs.
- Reflex module upgrades.
- More natural world interactions (e.g., sleeping at night).
- 🌊 **Improved Path Tracer**
- Smarter navigation through **water and complex terrain**.
- 🎯 **Self-Goal Assignment System**
- Bot assigns itself goals like a real player.
- Will initiate conversations with players and move autonomously.
- 😊 **Mood System** *(design phase)*
- Adds emotional context and varied behavior.
- 👥 **Player2 Integration**
- Highly requested — this will be the first major feature of the second update.
# Changelog v1.0.4-release+1.20.4-bugfix
- Fixed mod dependency metadata
# Changelog v1.0.4-release+1.20.6-bugfix
- Fixed mod dependency metadata
# Changelog v1.0.4-release+1.20.1
- Removed some minor functionality regarding listing the bot on the player menu since 1.20.1 carpet doesn't have the code for it.
- Minor code changes for 1.20.1
- Fixed mod dependency metadata
# Changelog v1.0.4-release+1.20.4
- Removed redundant code and unused imports.
- Changed status to release from beta.
- Updated codebase for 1.20.6 compatibility.
- Optimized codebase by removing redundant codes and unused imports.
Instead of pushing the update as alpha, I think the mod is now at the stage where I can decisively call it the beta stage.
# Changelog
- Fixed server sided compatibility support for play mode!
- Fixed a client side bug of the
/configMancommand not working on the client but on the server.
This marks the last version update for minecraft 1.20.4 as I will be moving up to 1.20.6 from now.
There will be another release of this version for 1.20.6, shortly.
Introduced Server sided compatability for training mode.
Play mode for some reason fails to connect to ollama server so I am still working it out, will be done in the next hotfix.
# Fixed
- removeArmor command now works.
- will be updated in the decision making logic accordingly in next hotfix.
1. Updated the qtable storage format (previous qtable is not comaptible with this version)
2. Created a "risk taking" mechanism which **greatly reduces training time** by making actions taken during training more contextual based instead of random.
3. Added more environment triggers for the bot to look up it's training data, now it also reacts to dangerous enviornment around it, typically lava, places where it might fall off, or sculk blocks.
4. Created very detailed reward mechanisms for the bot during training for the best possible efficiency.
5. Fixed the previous blockscanning code, now replaced using a DLS algorithm for better optimization.
# Upcoming changes.
1. Introduce goal based reinforcement learning(**You give the bot a goal and it will try to learn based on how to best achieve the goal you give**).
2. Switch to Deep-Q learning instead of traditonal q-learning (TLDR: use a neural network instead of a table)
3. Create custom movement code for the bot for precise movement instead of carpet's server sided movement code.
4. Give the bot a sense of it's surroundings in more detail (like how we can see blocks around us in game) so that it can take more precise decisions. Right now it has knowledge of what blocks are around it, but it doesn't know how those blocks are placed around it, in what order/shape. I intend to fix that.
5. Implement human consciousness level reasoning??? (to some degree maybe) (BIG MAYBE)
Some video footage :
mob related reflex actionshttps://github.com/user-attachments/assets/1700e1ff-234a-456f-ab37-6dac754b3a94
environment reactionhttps://github.com/user-attachments/assets/786527d3-d400-4acd-94f0-3ad433557239
## What to do to setup this version before playing the game(assuming you are a returning user) :
``
1. Make sure you still have ollama installed.
2. In cmd or terminal type ollama pull nomic-embed-text (if not already done).3. Type
ollama pull llama3.24. Type
ollama rm gemma2 (if you still have it installed)
5. Type ollama rm llama2 (if you still have it installed)6. If you have run the mod before go to your .minecraft folder, navigate to a folder called config, and delete a file called settings.json5
``
Then make sure you have turned on ollama server. After that launch the game.
Type /configMan in chat and select llama3.2 as the language model, then hit save and exit.
Then type /bot spawn <yourBotName> <training (for training mode, this mode won't connect to language model) and play (for normal usage)`# Youtube tutorial video (coming soon)
# What's new :
1. Fixed previous bugs.
2. Switched to a much lighter model (llama3.2) for conversations, RAG and function calling
3. A whole lot of commands
4. Reinforcement Learning (Q-learning).
5. **Theortically** Multiplayer compatible (just install the dependencies on server side), as carpet mod can run on servers too, but I have not tested it yet. Feedback is welcome from testers on this.
6. **Theoretically** the mod **should not** require everyone to install it on multiplayer, it should be a server-sided one, haven't tested this one yet, feedback is welcome from testers.
Bot can now interact with it's envrionment based on "triggers" and then learn about it's situation and try to adapt.
The learning process is not short, don't expect the bot to learn how to deal with a situation very quickly, in fact if you want intelligent results, you may need hours of training(Something I will focus on once I fix some more bugs, add some more triggers and get this version out of the alpha stage)
To start the learning process:
/bot spawn <botName> trainingRight now the bot only reacts to hostile mobs around it, will add more "triggers" so that the bot responds to more scenarios and learns how to deal with such scenarios in upcoming updates
[A video on how the bot learns and what's new in this patch](https://www.youtube.com/watch?v=6zEORx1OKfA)
## # New commands :
Spawn command changed.
/bot spawn <bot> <mode: training or play>, if you type anything else in the mode parameter you will get a message in chat showing the correct usage of this command/bot use-key <W,S, A, D, LSHIFT, SPRINT, UNSNEAK, UNSPRINT> <bot>/bot release-all-keys <bot> <botName>/bot look <north, south, east, west>/bot detectDangerZone // Detects lava pools and cliffs nearby/bot getHotBarItems // returns a list of the items in it's hotbar/bot getSelectedItem // gets the currently selected item/bot getHungerLevel // gets it's hunger levels/bot getOxygenLevel // gets the oxygen level of the bot/bot equipArmor // gets the bot to put on the best armor in it's inventory/bot removeArmor // work in progress.# Current bugs in this version :
1. If the bot dies or is killed off while it was engaged in an action, the code might throw an error on the bot respawn. Temporary fix is a game restart (or server restart).
Will be fixed in upcoming patch.
2. The
removeArmor sub-command doesn't work (yet).## What to do to setup this version before playing the game :
``
1. Make sure you still have ollama installed.
2. In cmd or terminal type ollama pull nomic-embed-text (if not already done).3. Type
ollama pull llama3.24. Type
ollama rm gemma2 (if you still have it installed)
5. Type ollama rm llama2 (if you still have it installed)6. If you have run the mod before go to your .minecraft folder, navigate to a folder called config, and delete a file called settings.json5
``
Then make sure you have turned on ollama server. After that launch the game.
Type /configMan in chat and select llama3.2 as the language model, then hit save and exit.
Then type /bot spawn <yourBotName> <training (for training mode, this mode won't connect to language model) and play (for normal usage)`For the nerds : How does the bot learn?
It uses an algorithm called Q-learning which is a part of reinforcement learning.
A very good video explanation on what Q-learning is :
[Reinforcement learning 101](https://www.youtube.com/watch?v=vXtfdGphr3c)
- This is the final hotfix version of version 1.0.2
In this hotfix, once again, a lot of the code has changed.
I will keep it simple in the changelog this time.
- Fixed**
1. ~~GUI issue in config manager which didn't show the currently selected language model~~ **[FIXED]**.
2. ~~The bot was not responding to normal conversations~~ **[FIXED]**.
- Even improved accuracy with the gemma2 model.**
For this patch, users will need to:
``
1. Go to your game folder (.minecraft)/config and you will find a settings.json5 file.
Delete that
2.(If you have run the previous 1.0.2 version already then) again go back to your .minecraft. you will find a folder called "sqlite_databases". Inside that is a file called memory_agent.db
3. Delete that as well.
4. Install the gemma2 model (ollama pull gemma2) [Required]
``Users can choose to keep the llama2 or mistral models and test each other's efficiency.
However the mod has a **100%** chance of breaking when llama2 and mistral is used because of the responses they generate.
The breaking of the mod happens llama2 and mistral generate very large initial responses whose vector embeddings cannot be generated and thus the mod throws an exception.
Gemma2 however keeps it precise and to the point, thus resulting in a lot shorter response.
Gemma2 also has much more accurate information about minecraft data, like crafting recipes, biomes, mobs, etc till 1.20.5 presumably, as the test results indicate, as compared to llama2 or mistral.
Thanks to [Mr. Álvaro Carvalho](https://github.com/A11v1r1), who suggested a few enhancements to the mod regarding the commands system and some inner code changes.
Also this version's icon is fixed and will be recognized by modmanager.
- Once again the setup instructions for existing users**
``
1. Go to your game folder (.minecraft)/config and you will find a settings.json5 file.
Delete that
2.(If you have run the previous 1.0.2 version already then) again go back to your .minecraft. you will find a folder called "sqlite_databases". Inside that is a file called memory_agent.db
3. Delete that as well.
4. Install the models, mistral, llama2 and nomic-embed-text
5.Then run the game
6. Inside the game run /configMan to set the language model to llama2.
Then spawn the bot and start talking!
``- patch 1.0.3 will include backwards compatibility for versions 1.20, 1.20.1 and 1.20.3 and other features as mentioned earlier!**
- This patch fixed a major issue where the llama2 model fails majorly at misclassification of the user
Aaaand after 2 weeks of a lot of coffee, back pain and brain ache, here's the new update.
At first it may seem that this version doesn't do much, but keep talking with the bot and you will find out :)
- To-do**: Install three models in ollama. **[VERY IMPORTANT]**
1. nomic-embed-text (ollama pull nomic-embed-text)
2. llama2 (ollama pull llama2)
3. mistral (ollama pull mistral)
And go to your game folder (.minecraft/config) and delete the old settings.json5 file.
In game, change your selected language model to llama2 for the best performance.
- TLDR**: The bot is way more intelligent now, can remember past conversations, can store current conversations and then use the data for long term storage, has gotten better at function calling like movement and block detection, no fixed responses, no need of fixed prompt checking, it all happens,
- Also the connection to the language model is only made when the bot is spawned in game, thus saving a lot of memory when the bot is not in the game.**
Eventually I intend to bring support for custom models on the ollama database.
- dynamically**, hehe.
Next patch will include more minecraft interaction, such as mining, improved movement, collision/obstacle detection, etc.
Accuracy for detecting correctly what the player wants to say: somewhere between 95-99%
# For the nerds.
So, for the tech savvy people, I have implemented the following features.
- LONG TERM MEMORY**: This mod now features concepts used in the field AI like Natural Language Processing (much better now) and something called
- Retrieval Augmented Generation (RAG)**.
How does it work?
Well:


We convert the user input, to a set of vector embeddings which is a list of numbers.
Then **physics 101!**
A vector is a representation of 3 coordinates in the XYZ plane. It has two parts, a direction and a magnitude.
If you have two vectors, you can check their similarity by checking the angle between them.
The closer the vectors are to each other, the more **similar** they are!
Now if you have two sentences, converted to vectors, you can find out whether they are similar to each other using this process.
In this particular instance I have used a method called **cosine similarity**
[Cosine similarity](https://www.geeksforgeeks.org/cosine-similarity/)
Where you find the similarity using the formula
(x, y) = x . y / |x| . |y|where |x| and |y| are the magnitudes of the vectors.
So we use this technique to fetch a bunch of stored conversation and event data from an SQL database, generate their vector embeddings, and then run that against the user's prompt. We get then further sort on the basis on let's say timestamps and we get the most relevant conversation for what the player said.
Pair this with **function calling**. Which combines Natural Language processing to understand what the player wants the bot to do, then call a pre-coded method, for example movement and block check, to get the bot to do the task.
Save this data, i.e what the bot did just now to the database and you get even more improved memory!
To top it all off, Llama 2 is the best performing model for this mod right now, so I will suggest y'all to use llama2.
In fact some of the methods won't even run without llama2 like the RAG for example so it's a must.
Aaaand after 2 weeks of a lot of coffee, back pain and brain ache, here's the new update.
At first it may seem that this version doesn't do much, but keep talking with the bot and you will find out :)
- To-do**: Install two models in ollama. **[VERY IMPORTANT]**
1. nomic-embed-text (ollama pull nomic-embed-text)
2. llama2 (ollama pull llama2)
In game, change your selected language model to llama2 for the best performance.
- TLDR**: The bot is way more intelligent now, can remember past conversations, can store current conversations and then use the data for long term storage, has gotten better at function calling like movement and block detection, no fixed responses, no need of fixed prompt checking, it all happens,
- Also the connection to the language model is only made when the bot is spawned in game, thus saving a lot of memory when the bot is not in the game.**
Eventually I intend to bring support for custom models on the ollama database.
- dynamically**, hehe.
Next patch will include more minecraft interaction, such as mining, improved movement, collision/obstacle detection, etc.
# For the nerds.
So, for the tech savvy people, I have implemented the following features.
- LONG TERM MEMORY**: This mod now features concepts used in the field AI like Natural Language Processing (much better now) and something called
- Retrieval Augmented Generation (RAG)**.
How does it work?
Well:


We convert the user input, to a set of vector embeddings which is a list of numbers.
Then **physics 101!**
A vector is a representation of 3 coordinates in the XYZ plane. It has two parts, a direction and a magnitude.
If you have two vectors, you can check their similarity by checking the angle between them.
The closer the vectors are to each other, the more **similar** they are!
Now if you have two sentences, converted to vectors, you can find out whether they are similar to each other using this process.
In this particular instance I have used a method called **cosine similarity**
[Cosine similarity](https://www.geeksforgeeks.org/cosine-similarity/)
Where you find the similarity using the formula
(x, y) = x . y / |x| . |y|where |x| and |y| are the magnitudes of the vectors.
So we use this technique to fetch a bunch of stored conversation and event data from an SQL database, generate their vector embeddings, and then run that against the user's prompt. We get then further sort on the basis on let's say timestamps and we get the most relevant conversation for what the player said.
Pair this with **function calling**. Which combines Natural Language processing to understand what the player wants the bot to do, then call a pre-coded method, for example movement and block check, to get the bot to do the task.
Save this data, i.e what the bot did just now to the database and you get even more improved memory!
To top it all off, Llama 2 is the best performing model for this mod right now, so I will suggest y'all to use llama2.
In fact some of the methods won't even run without llama2 like the RAG for example so it's a must.
Steve (or the bot/) can now understand what users saying a lot better by using a process called **"Natural Language Processing!"**
This **Natural language processing** has been implemented for the sake of getting the in-game bot to execute actions based on what the user says, it is separate from the language model. However I intend to achieve a sort of "synchronisation" which will keep the language model informed of what is going on in-game.
Also I have added block and nearby entity detection.
The bot can now detect if there is a block in front of it, simply ask it using the sendAMessage command!
There's **99%** chance that the bot will understand the intention and context of your message. Hope to achieve 100% soon.
Initially when you spawn the bot, it takes a minute or so for it to face you correctly, since it's spawn position will be fixed by the game by teleporting it somewhere near you after spawning is done (**This is not the same as seen in game when you spawn the bot and instantly teleports to you**).
After that the bot will accurately face the nearest entity in front of it. The range is 5 blocks in the X, Y and Z axes. To make it more realistic, I have made it so that the bot can't detect entites behind it.
Click on the view source button, keep scrolling till you find the XZ pathfinding video.
This version of the mod includes a pathfinding algorithm on the XZ axis for the bot.
It is recommended to test the pathfinding on a superflat world with no mobs spawning.
Try to keep the destination coordinates relatively under or equals to 50 on the XZ axes, any more than that will take some time to calculate and the game might appear frozen, hence the tag **alpha** given to this version
Also the commands system has been fully revamped
I uploaded this alpha version just to prove that I did not give up on this project lol.
Expect periodic releases.
- Main command**
/bot- Sub commands**:
spawm <botName> This command is used to spawn a bot with the desired name. ==For testing purposes, please keep the bot name to Steve==.walk <botName> <till> This command will make the bot walk forward for a specific amount of seconds./goTo <botName> <x> <y> <z> This command is supposed to make the bot go to the specified co-ordinates, by finding the shortest path to it. It is still a work in progress as of the moment./sendAMessage <botName> <message> This command will help you to talk to the bot./teleportForward <botName> This command will teleport the bot forward by 1 positive block/testChatMessage <botName> A test command to make sure that the bot can send messages.- Example Usage:**
/bot spawn SteveAnd a lot more bug-fixes.
Built and tested only on 1.20.4
Fixed **MAJOR** bugs