A Python library to use MindSpawner Game AI
Project description
MindSpawner
MindSpawner is a Python library that enables developers to create and control AI-powered agents for games and interactive environments. It provides an easy-to-use interface for managing AI behavior and real-time learning.
🚀 Features
- Simple API for integrating AI-driven agents
- WebSocket-based real-time communication
- Lightweight and efficient
- Easy to integrate with game engines and simulations
📦 Installation
To install MindSpawner, run the following command:
pip install mindspawner
Then, import it in your Python script:
from mindspawner import MindSpawner
🎮 Adding a Game AI
To create and add a game AI, use the following code:
USER_ID = "" # Copy your "USER ID"
GAMEAI_ID = "" # Copy your "GAMEAI ID"
gameai = MindSpawner(USER_ID, GAMEAI_ID)
🤖 Running an AI Agent
To send input data to a specific agent and retrieve its output:
AGENT_ID = "" # Copy your "AGENT ID"
input_data = { "input1": 100 }
action = gameai.agent(AGENT_ID, input_data)
print(action)
🔹 Key Points:
input_datais any data that will be provided to the game AI.actionstores the AI's response based on the given input.
📈 Updating the Game AI
🔹 Enhancing AI Performance
If you want to improve the AI's performance, evaluate it numerically and update it as follows:
AGENT_ID = "" # Copy your "AGENT ID"
score = 100 # Example: number of defeated enemies or goals scored
gameai.update_agent(AGENT_ID, score)
scoreis an integer that evaluates the AI's performance.- Use game-specific metrics (e.g., enemy defeats, successful actions) to assign a meaningful score.
🔹 Adjusting AI Behavior
If you want to fine-tune the AI’s behavior, use the web interface and click the "Instruct" button for the agent. You can specify behavior rules such as:
- "Avoid enemies when they get too close."
- "Maintain an aggressive playstyle."
📜 License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mindspawner-0.3.2.tar.gz.
File metadata
- Download URL: mindspawner-0.3.2.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea7a004e1342f40ea979265b311864d48e9498363b83546a483d54e4ddc5d9a9
|
|
| MD5 |
b70496310414e0e58d4b82cb3f874ebb
|
|
| BLAKE2b-256 |
9ecaf6c155b8eb0a7f6a321bd6e04a953d67a77333ff0395e4e8fecf799798d1
|
File details
Details for the file mindspawner-0.3.2-py3-none-any.whl.
File metadata
- Download URL: mindspawner-0.3.2-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd549ef67abe435385c26b72cb253a6b3708a34cdda65eabb1e0fd729a9559e8
|
|
| MD5 |
0437a96a33a6a1829ccb8a73dfc69daf
|
|
| BLAKE2b-256 |
7a62257941640c7d38a0860ae4fb05a1dba334b6087ef09e0b68ffcddf25dc7b
|