Imagine treating neural networks not as magic black boxes, but as predictable functions in your code. Imagine data flowing from a camera directly to an NPU and then to a game engine without ever touching the CPU or copying memory.
It began as a simple feature request. I wanted to implement a couple of “smart” NPCs in my game project — characters that could truly perceive the player and react intelligently, rather than following a rigid behavior tree.
But I immediately hit a wall. To achieve this level of intelligence, the industry offered me two bad options:
I realized that the modern AI stack is broken for real-time engineering. We are trying to force heavy, cloud-native Python models onto efficient consumer hardware.
\
We are facing an invisible crisis in the AI revolution (or not such invisible, if you tried to buy RAM recently).
Ratio’s mission: To democratize AI not by lowering API prices, but by optimizing the runtime. I believe AI should run locally, efficiently, and privately on the device you already own.
Ratio is our answer: a tool to run complex AI on consumer hardware without burning the planet.
\
Ratio is a high-performance Domain-Specific Language (DSL) and runtime environment designed to facilitate a new paradigm of Liquid AI programming. \n It bridges the gap between high-level visual orchestration (similar toComfyUI) and low-level systems programming (similar to Protobuf). Ratio allows developers to laser-focus diverse computational units — neural networks, classical “Knuth”algorithms, and heuristic trees — into a single, optimized data processing pipeline. \n The system targets scenarios requiring extreme efficiency and determinism: from AAA Game AI, Automotive, and AR glasses to FPV/UGV drone controllers, IoT, and industrial surveillance.
\
Ratio adopts an Interface Definition Language (IDL) approach:
\
Variables in Ratio are not static values but Buffers flowing through the graph.
\
Ratio enables the precise orchestration of “Micro-Agents” Instead of one giant model, you link specialized experts:
\
Ratio uses a universal unit for data transmission between graph nodes. This is a lightweight wrapper (Smart Pointer / Handle) designed to minimize memory copying (Zero-Copy).
Primitives:
Sensory (Hardware Buffers):
Semantic:
The Ratio language can be represented visually (Node Graph) or textually. The textual representation resembles C++ with stream syntax.
Transfers ownership of data from a provider to a consumer.
// Simple Linear Pipeline MicSource() >> NoiseGate(-40dB) >> SpeechIntent(model="tiny-bert") >> GameEvent("PlayerSpoke");
A key element for optimization. The Throttle or Waiter node controls the execution frequency of expensive operations.
// Process vision every 10 frames (or every 200ms) CameraSource() >> Waiter(Frames(10)) // Blocks the stream until 10 frames have passed >> Resize(256, 256) // Prep for NPU >> VisionModel("yolo-nano") >> Filter(class="enemy", conf > 0.7) >> WidgetUpdate();
Ratio supports complex graphs with multiple inputs.
pipeline SecurityCheck { input Frame cam; input Float movement_speed; // Vision Branch (NPU) let visual_trigger = cam >> Waiter(Time(0.5s)) >> ObjectDetection("person") >> ToBool(); // Telemetry Branch (CPU, fast) let speed_trigger = movement_speed >> Threshold(Min(5.0)); // Merge (AND Gate) // Waits for valid data from both sources Merge(visual_trigger, speed_trigger) >> Zip(Policy::Latest) >> Logic(AND) >> AlarmSystem(); }
\
Ratio employs a hybrid approach to project building.
Used for core mechanics requiring maximum performance (e.g., FPV/UGV drone controller).
1. Input: Ratio Script / Visual Graph.
2. Meta-Compiler: Translates the graph into pure C++ code.
3. Result: A monolithic library linked to the engine.
Used for mods, DLCs, balance patches.
\
1. Phase 1: The Core (Data & Pipes)
Phase 2: Nodes & Math
Phase 3: The Language (DSL)
Phase 4: Visual Editor
\
This is the philosophy behind Ratio, a concept for a new Liquid AI orchestration language I am developing. It aims to solve the unpredictability of modern AI implementation in wide different types of systems.
We are at a crossroads. We can continue down the path of massive, energy-hungry data centers that centralize power in the hands of a few. Or we can optimize our code, empower the edge, and put AI back into the hands of the people, not corporate businessmen throwing hardware into the fires of problem.
Ratio is not just a language, it is a declaration of independence from the Cloud.
Thanks for reading. I tried to keep your focus and convey the message clearly.
\


