Laserbrain API
Reference and code examples for building with the weather field.
Installation
Core API
Laserbrain()
Create a new weather field.
step()
Advance the weather simulation one tick.
absorb(word: str)
Feed a word into the field (heats it).
generate(n: int) → List[str]
Generate words from the language layer.
hear(text: str) → str
Full conversational loop: absorb input, generate reply.
Use Case: Weather-regulated System
Feed sensor data, read a control signal 0–1.
Use Case: Language Field
Feed text, read temperature-modulated output.
Fields Reference
T (temperature) — 0–1. Drives intensity and speed. High T → fast generation, strong convection.
Q (humidity) — 0–1. Drives creativity. High Q → wild language, condensation. Low Q → dry, literal.
P (pressure) — unbounded. Drives wind (advection). High P compresses and heats.
R (rain) — 0–1. Precipitation. Forms when Q > saturation. Carves terrain permanently.
V (vitality) — 0–1. Accumulates when T > 0.4. Measures aliveness.
terrain — Permanent. Rain carves basins. Shapes future moisture flow. Persists across steps.
Learn more
Guide — full explanation of how it works
GitHub — source code, full implementation
Teach — book a live session to build something