Skip to main content

A Python library to interact with the MindSpawner agent server

Project description

MindSpawner

PyPI version License Python Versions

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_data is any data that will be provided to the game AI.
  • action stores 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)
  • score is 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."

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mindspawner-0.3.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mindspawner-0.3.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file mindspawner-0.3.1.tar.gz.

File metadata

  • Download URL: mindspawner-0.3.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.4

File hashes

Hashes for mindspawner-0.3.1.tar.gz
Algorithm Hash digest
SHA256 1da1f5b11a8525b28a5e5084b3d0992972931a3e30128d2d818f2760464c63cd
MD5 d7733363db9fb921631cc0fe393ace06
BLAKE2b-256 f2e6d96eea30dca49c9c59b9a7493095c2a930de955e36f802d90f07e2353eb7

See more details on using hashes here.

File details

Details for the file mindspawner-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: mindspawner-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.4

File hashes

Hashes for mindspawner-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5d047aa386bbcbdb03c0b06dcc4045c7ed67a160cbdf883c730bce2e21863e85
MD5 a75d32cafd1c119fac31ed837ca8a7e8
BLAKE2b-256 5e158ed8625cdf4e97f66c546f798e83efbc8bb9cbb6a577ab16ae668056d7d0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page