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
bonsai-ai-2.2.8.tar.gz
(36.9 kB
view details)
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.2.8.tar.gz.
File metadata
- Download URL: bonsai-ai-2.2.8.tar.gz
- Upload date:
- Size: 36.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ab27c78725f1566ff08a16c568b7df6a20b74a733ef444fb37e24b34343ce87
|
|
| MD5 |
8a5030320aa1bd9c8daec8a647bb38f5
|
|
| BLAKE2b-256 |
872e9aa33054df72503d2166a555ddfeedfffb202feb70ac61eb233c66030988
|
File details
Details for the file bonsai_ai-2.2.8-py2.py3-none-any.whl.
File metadata
- Download URL: bonsai_ai-2.2.8-py2.py3-none-any.whl
- Upload date:
- Size: 93.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44c5d494299c2cae1937f4a13e5494dea7d65eb35548f5cbf59f0b0e852c1eec
|
|
| MD5 |
877a27eadeae616f85aeb9e3d1fc1833
|
|
| BLAKE2b-256 |
2f3028e80fb6d0f0de7b5d11b2bb2890047bd14e3059d9bcc08d6134cac7bab0
|