Simulator interface library for Bonsai AI platform v2
Project description
A python library for integrating data sources with Bonsai BRAIN.
Installation
- To install the current release version:
$ pip install bonsai-ai
Usage
Clients will subclass bonsai.Simulator and implement the required methods.
Example:
#!/usr/bin/env python3
import sys
from bonsai_ai import Simulator, Brain, Config
class MySim(Simulator):
def episode_start(self, parameters):
initial = {"value": 1.0}
return initial
def simulate(self, action, objective):
terminal = True
state = {"value": 1.0}
return (state, 1.0, terminal)
Then, the simulator is configured and assigned a BRAIN and run.
def example():
config = Config(sys.argv)
brain = Brain(config)
sim = MySim(brain, 'example_simulator')
while sim.run():
continue
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 bonsai-ai-2.0.10.tar.gz.
File metadata
- Download URL: bonsai-ai-2.0.10.tar.gz
- Upload date:
- Size: 25.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f863d87fe4785e8205014566e2f1a0a44790e8c96ddd707ba134e0cef8bc524b
|
|
| MD5 |
9076dbe0e01bcbbf4b680e6342b6b2d3
|
|
| BLAKE2b-256 |
aa7cb93738bbf9fad09a384f96122850466f524d0320655092c663f83bffb4e5
|
File details
Details for the file bonsai_ai-2.0.10-py2.py3-none-any.whl.
File metadata
- Download URL: bonsai_ai-2.0.10-py2.py3-none-any.whl
- Upload date:
- Size: 33.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cac907ef314f5337b050cf6b98a560b0b094844087931f2e20ac7d0b64e608ec
|
|
| MD5 |
8d12703e31debd51686d6b89462c3be7
|
|
| BLAKE2b-256 |
86d2588e49a53d9de6ee18b9f6a8401515f9b1872eb61475a9bb5f88b004ed4c
|