autopoietic-sdk
v1.0.2
Published
A universal SDK for institutional logic simulations.
Downloads
5
Readme
Autopoietic-SDK
Autopoietic-SDK is a universal library for modeling and simulating complex systems and institutional logic. It empowers developers to create autonomous components, link them, and coordinate their interactions dynamically.
Beyond the Rule of Law
Autopoietic-SDK encapsulates a universal institutional logic applicable across various domains. It uses the foundational principles of the Optimus Method to model diverse systems, from legal frameworks to economic microcosms. The SDK operates based on four core rules:
The Four Rules of the Optimus Method
Functional Differentiation Institutions are divided into distinct, autonomous units, each serving a specific function. For example, legislative, judicial, and executive branches operate as independent parts essential to the coherence of the entire system.
Autopoiesis Each unit self-regulates according to its own binary logic. The legal system, for instance, operates on valid/invalid distinctions, while the political system is driven by legitimate/illegitimate decisions. This internal regulation ensures stability and consistency.
Structural Coupling Although each unit remains autonomous, they interact through stable, flexible mechanisms. These interactions enable the institution to evolve cohesively, allowing separate units to maintain independence while staying interdependent.
Society (Central Orchestrator) A central orchestrator ensures that all units function in harmony, iterating over time to adapt and refine the system. This is the core of societal evolution, where interactions between units are monitored and dynamically adjusted.
Installation
Install the SDK via npm:
npm install autopoietic-sdkQuick Start Example
Here's an example of how to use Autopoietic-SDK to model and simulate a system:
// Import components from the SDK
const { SystemUnit, Connector, Coordinator } = require("autopoietic-sdk");
// Define individual units with specific behaviors
const unit1 = new SystemUnit("Increment", (x) => x + 1); // Adds 1 to input
const unit2 = new SystemUnit("Double", (x) => x * 2); // Multiplies input by 2
// Connect the units to define their interaction
const connector = new Connector(unit1, unit2);
// Use the coordinator to simulate the system
const coordinator = new Coordinator(connector);
coordinator.simulate(3, 5); // Simulate 5 cycles with an initial input of 3Expected Output
When running the above code, the output will simulate the system across 5 cycles:
Cycle 1: Input = 3
Output = { Increment: 4, Double: 6 }
Cycle 2: Input = 10
Output = { Increment: 11, Double: 20 }
Cycle 3: Input = 31
Output = { Increment: 32, Double: 62 }
Cycle 4: Input = 94
Output = { Increment: 95, Double: 188 }
Cycle 5: Input = 283
Output = { Increment: 284, Double: 566 }Features
SystemUnit: Define autonomous components with specific logic.
Connector: Establish dynamic connections between components.
Coordinator: Simulate interactions and manage cycles of execution.
Why Choose Autopoietic-SDK?
Modularity: Easily extendable with reusable components.
Scalability: Handle complex systems with multiple interlinked units.
Flexibility: Adaptable to various fields like institutional modeling, AI, and simulations.
License
This project is licensed under the MIT License. Feel free to use, modify, and distribute it.
