llama-simulator
Llama Simulator (llama-simulator) is a framework within the LlamaSearch AI ecosystem for running simulations. It allows defining simulation environments and agents that interact within those environments, useful for testing algorithms, reinforcement learning, or modeling complex systems.
Key Features
- Simulation Environments: Provides or allows defining various simulation environments (
environments/). - Agent Definitions: Supports creating agents with specific behaviors to operate within environments (
agents/). - Simulation Core: Manages the simulation loop, agent interactions, and environment updates (
core.py). - Command-Line Interface: Offers tools to configure and run simulations via CLI (
cli.py). - Configurable: Allows setting up simulation parameters, environments, agents, and logging (
config.py).
Installation
pip install llama-simulator
# Or install directly from GitHub for the latest version:
# pip install git+https://github.com/llamasearchai/llama-simulator.git
Usage
Command-Line Interface (CLI)
(CLI usage examples for running specific simulations will be added here.)
llama-simulator run --config simulation_config.yaml --environment TradingEnv --agent QLearningAgent
Python Client / Embedding
(Python usage examples for programmatically setting up and running simulations will be added here.)
# Placeholder for Python client usage
# from llama_simulator import SimulationRunner, SimulationConfig
# from my_envs import CustomEnvironment
# from my_agents import HeuristicAgent
# config = SimulationConfig.load("config.yaml")
# runner = SimulationRunner(config)
# # Setup simulation
# environment = CustomEnvironment()
# agent = HeuristicAgent()
# runner.setup(environment, [agent])
# # Run the simulation
# results = runner.run_simulation(steps=1000)
# print(f"Simulation finished. Final score: {results['final_score']}")
Architecture Overview
graph TD
A[User / CLI (cli.py)] --> B{Simulation Core (core.py)};
B -- Loads --> C{Simulation Environment (environments/)};
B -- Loads --> D{Agent(s) (agents/)};
B -- Manages --> E[Simulation Loop];
E -- Updates --> C;
E -- Gets Actions --> D;
D -- Acts On --> C;
C -- Provides State/Reward --> D;
E --> F[Simulation Results / Logs];
G[Configuration (config.py)] -- Configures --> B;
G -- Configures --> C;
G -- Configures --> D;
style B fill:#f9f,stroke:#333,stroke-width:2px
style C fill:#ccf,stroke:#333,stroke-width:1px
style D fill:#ccf,stroke:#333,stroke-width:1px
- Interface: User configures and starts the simulation via the CLI or programmatically.
- Core: Loads the specified environment and agent(s) based on configuration.
- Simulation Loop: The core manages the main loop, stepping through time.
- Interaction: In each step, agents perceive the environment state, decide on actions, and act upon the environment.
- Environment Update: The environment state changes based on agent actions and internal dynamics.
- Results: The simulation produces logs, metrics, or final state information.
- Configuration: Defines the environment, agents, simulation length, parameters, etc.
Configuration
(Details on configuring simulation environments, agent parameters, simulation runtime settings, logging, etc., will be added here.)
Development
Setup
# Clone the repository
git clone https://github.com/llamasearchai/llama-simulator.git
cd llama-simulator
# Install in editable mode with development dependencies
pip install -e ".[dev]"
Testing
pytest tests/
Contributing
Contributions are welcome! Please refer to CONTRIBUTING.md and submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for llama-simulation 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llama_simulation-0.1.0.tar.gz | 52.9 kB | Without provenance | Details for llama_simulation-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llama_simulation-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for llama_simulation-0.1.0-py3-none-any.whl |
Total release size: 78.2 kB
Release files / llama_simulation-0.1.0.tar.gz
| Download URL | llama_simulation-0.1.0.tar.gz |
|---|---|
| Size | 52.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3a8c1b8299aef4d56fdece5ea6f5b2bf0b39790a35d95669e35e267680ad49d4
|
|
BLAKE2b-256 checksum How to use checksums |
fe4ea7e0d47c5c3ff752795b858d7ac53dbf432348b083f4928e513dac64b20f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / llama_simulation-0.1.0-py3-none-any.whl
| Download URL | llama_simulation-0.1.0-py3-none-any.whl |
|---|---|
| Size | 25.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b1324930f82c694a98fbec1454d96123603a152647fb57eb1891a7724b664a8c
|
|
BLAKE2b-256 checksum How to use checksums |
a1cf37a6378255cf243121768d663534476ad85803f7d8c22689f584c5a19761
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Security for llama-simulation 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.