Check out our latest project ✨ OpenChapter.io: free ebooks the way its meant to be 📖

Mind Game

An asset by AbnormalMapStudio
The page banner background of a mountain and forest
Mind Game thumbnail image
Mind Game thumbnail image
Mind Game hero image

Quick Information

0 ratings
Mind Game icon image
AbnormalMapStudio
Mind Game

Mind Game is a C# plugin based on the LLamaSharp library that allows the user to run Large Language Models (LLM) in-game on local hardware. Features:* Local inference of popular language models like Llama, Mistral, and Phi (.gguf filetype)* Easy configuration with the ability to save different settings* A MindAgent node that can be added anywhere in your scene to interact with the MindManager autoload* 3D example scene with a MindAgent3D (CharacterBody3D + MindAgent)* CPU or CUDA-accelerated inferenceFuture features:* Batched/parallel conversation processing with forking and rewinding* Function calling* Graph RAG with memories* Sensor-based interaction for MindAgent3D nodesCheck out the README on the GitHub page for model download links and more information.

Supported Engine Version
4.3
Version String
v0.2.1
License Version
MIT
Support Level
community
Modified Date
1 year ago
Git URL
Issue URL

This is a plugin for the Godot game engine that allows the user to load and run a local Large Language Model (LLM) in-engine using the LLamaSharp (v0.12.0) C# library.

Current Mind Game features

Fast, local chat models in your games

README mindgame_inference

Easy configuration

README mindgame_config

Run Mind Game stand-alone

  1. Install CUDA Toolkit 12.1 if you haven't already (12.1 recommended for compatibility with other projects like Unsloth).
  2. Download the latest Mind Game release for your platform and run the executable
  3. Download a .gguf model of the Llama, Phi, or Mistral families
  4. Load your model and have fun!

Smallest well-performing model: Phi-3

Larger, high-quality model: Llama3-8B-Instruct

Another 7B model: Mistral-7B-Instruct-v0.2

Run Mind Game as a Godot plug-in

  1. Install CUDA Toolkit 12.1 if you haven't already (12.1 recommended for compatibility with other projects like Unsloth).
  2. Download and extract Godot 4.3 dev6 (.NET version)
  3. Download/install .NET8
  4. Clone/download this repo (or the most recent dev branch to have the most current features) and open it with Godot 4.3 .NET,
  5. Click Project > Project Settings > Plugins > Enabled (Mind Game). Go to the Autoload tab and make sure MindManager is enabled.
  6. Load a .gguf file of the Llama, Mistral, Mixtral, or Phi families to get going!

The lower quantization (q), the smaller the model is to run but at the cost of accuracy. Llama-3-8B-Instruct.Q4_K_M is a great middle-ground for those with 8GB of VRAM. The absolute smallest model Phi-3-mini-4k-instruct.IQ1_S.gguf can run on less than 1GB of VRAM.

Architecture of Mind Game

This plugin revolves around the MindManager autoload, which handles all backend model loading and allows every scene to access it. The user does not have to ever interact with the MindManager directly, as the configurations are handled on their own screens.

To send/receive input to the model, you add a MindAgent node to your scene, which talks with the MindManager node. It can signal out the text it receives so that you can connect it to a Label3D, as in the example. By attaching a MindAgent to a CharacterBody3D (or anything else that moves), you can give the agent a body (example scene is MindAgent3D). When I transition to the BatchedExecutor, the user will be able to have n-conversations simultaneously (limited only by the user's hardware).

Future steps

  • Implement LLaVa support (including viewport analysis)
  • Make Download Manager functional
  • Make a singleton to be able to access currently loaded model in-game Complete 0.2.0
  • Transition to BatchedExecutor and add conversation forking/rewinding
  • Add network graph generation
  • Add project script crawling
  • Expose LLamaSharp methods like quantization
  • Integrate Kernel Memory for document ingestion

Version History

0.2.0:

  • MindManager is now an autoload
  • Model configurations can be saved/loaded
  • MindAgent nodes can be added in the inspector
  • 3D chat example with MindAgent3D

0.1.3:

  • First release, model loading and chat enabled in engine bottom bar

Mind Game is a C# plugin based on the LLamaSharp library that allows the user to run Large Language Models (LLM) in-game on local hardware.

Features:
* Local inference of popular language models like Llama, Mistral, and Phi (.gguf filetype)
* Easy configuration with the ability to save different settings
* A MindAgent node that can be added anywhere in your scene to interact with the MindManager autoload
* 3D example scene with a MindAgent3D (CharacterBody3D + MindAgent)
* CPU or CUDA-accelerated inference

Future features:
* Batched/parallel conversation processing with forking and rewinding
* Function calling
* Graph RAG with memories
* Sensor-based interaction for MindAgent3D nodes

Check out the README on the GitHub page for model download links and more information.

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
Mind Game icon image
AbnormalMapStudio
Mind Game

Mind Game is a C# plugin based on the LLamaSharp library that allows the user to run Large Language Models (LLM) in-game on local hardware. Features:* Local inference of popular language models like Llama, Mistral, and Phi (.gguf filetype)* Easy configuration with the ability to save different settings* A MindAgent node that can be added anywhere in your scene to interact with the MindManager autoload* 3D example scene with a MindAgent3D (CharacterBody3D + MindAgent)* CPU or CUDA-accelerated inferenceFuture features:* Batched/parallel conversation processing with forking and rewinding* Function calling* Graph RAG with memories* Sensor-based interaction for MindAgent3D nodesCheck out the README on the GitHub page for model download links and more information.

Supported Engine Version
4.3
Version String
v0.2.1
License Version
MIT
Support Level
community
Modified Date
1 year ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers