@elizaos/plugin-action-bench 1.4.0 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,2 +1,148 @@
1
1
  # plugin-action-bench
2
- Action calling benchmark for Eliza v2, including Typewriter, Relational Data and Multiverse Math.
2
+
3
+ Action calling benchmark plugins for ElizaOS v2, featuring multiverse mathematics where operations behave differently based on dimensional constants. Designed to test AI agents' ability to handle context-dependent mathematics, unknown operational behaviors, and complex state management across dimensional boundaries.
4
+
5
+ ## Features
6
+
7
+ ### šŸ”¤ Typewriter Actions (A–Z)
8
+ 26 single-letter typing actions that test basic action chaining and selection:
9
+ - **Actions**: `TYPE_A` through `TYPE_Z`
10
+ - **Purpose**: Tests rapid sequential action execution and accumulation
11
+ - **State Management**: Maintains `typedText` accumulator
12
+
13
+ ### 🌌 Multiverse Math Operations
14
+ Mathematical operations that behave differently based on dimensional constants, testing AI agents' ability to handle context-dependent mathematics:
15
+
16
+ #### Number Input (0-9)
17
+ - **Actions**: `INPUT_0` through `INPUT_9`
18
+ - **Purpose**: Build numbers in the input buffer
19
+
20
+ #### Dimension Selection
21
+ - **SELECT_DIMENSION**: Choose which dimensional rules apply to operations
22
+ - **Available Dimensions**: quantum, chaos, prime, mirror, void, absolute, fibonacci, exponential, harmonic, infinite, golden, spiral, fractal, cyclical
23
+
24
+ #### Multiverse Operations
25
+
26
+ ##### MULTIVERSE_ADD
27
+ Addition with dimensional variations:
28
+ - **Prime Dimension**: Results elevated to nearest prime number
29
+ - **Quantum Dimension**: Includes quantum entanglement factor √(aƗb)
30
+ - **Chaos Dimension**: Adds deterministic chaos factor based on inputs
31
+
32
+ ##### MULTIVERSE_SUBTRACT
33
+ Subtraction with dimensional rules:
34
+ - **Absolute Dimension**: Negative numbers don't exist (absolute value)
35
+ - **Mirror Dimension**: Reflects subtraction across zero
36
+ - **Void Dimension**: Creates void compensation (always positive)
37
+
38
+ ##### MULTIVERSE_MULTIPLY
39
+ Multiplication across dimensions:
40
+ - **Fibonacci Dimension**: Results snap to nearest Fibonacci number
41
+ - **Exponential Dimension**: Multiplication becomes exponentiation
42
+ - **Harmonic Dimension**: Includes harmonic mean in calculation
43
+
44
+ ##### MULTIVERSE_DIVIDE
45
+ Division with special meanings:
46
+ - **Safe Dimension**: Division by zero returns dividend
47
+ - **Infinite Dimension**: Division by zero opens portals (Ɨ999)
48
+ - **Golden Dimension**: Results converge toward golden ratio φ
49
+
50
+ ##### MULTIVERSE_MODULO
51
+ Modulo with cyclical properties:
52
+ - **Cyclical Dimension**: Creates perfect positive cycles
53
+ - **Spiral Dimension**: Adds spiral patterns using sin/cos
54
+ - **Fractal Dimension**: Self-similar iterations
55
+
56
+ ##### MULTIVERSE_POWER
57
+ Power operations with effects:
58
+ - **Standard Dimension**: Normal exponentiation
59
+ - **Imaginary Dimension**: Powers oscillate with cos factors
60
+ - **Recursive Dimension**: Power applied iteratively
61
+
62
+ ##### MULTIVERSE_SQRT
63
+ Square root variations:
64
+ - **Positive Dimension**: Always returns positive (uses absolute)
65
+ - **Complex Dimension**: Handles negative numbers as imaginary
66
+ - **Quantum Dimension**: Adds quantum fluctuations
67
+
68
+ #### Utility Operations
69
+ - **MATH_STORE**: Store accumulator to memory
70
+ - **MATH_RECALL**: Recall memory to input buffer
71
+ - **MATH_CLEAR**: Reset all buffers
72
+ - **TRANSFER_TO_INPUT**: Move accumulator to input buffer
73
+
74
+ ## State Management
75
+
76
+ The plugin maintains a sophisticated state system:
77
+ - **accumulator**: Main calculation result storage
78
+ - **inputBuffer**: Temporary number input storage
79
+ - **memory**: Persistent value storage
80
+ - **history**: Operation history tracking with explanations
81
+ - **typedText**: Typewriter accumulation buffer
82
+ - **dimension**: Current dimensional constant affecting operations
83
+ - **lastOperation**: Track the most recent operation performed
84
+
85
+ ## Usage
86
+
87
+ ```typescript
88
+ import { actionBenchPlugin } from "@elizaos/plugin-action-bench";
89
+
90
+ // Add to your agent's plugins
91
+ const agent = createAgent({
92
+ plugins: [actionBenchPlugin],
93
+ // ... other configuration
94
+ });
95
+ ```
96
+
97
+ ## Benchmarking Examples
98
+
99
+ ### Typewriter Test
100
+ Test rapid action selection by typing words:
101
+ ```
102
+ User: "type hello"
103
+ Agent: Uses TYPE_H, TYPE_E, TYPE_L, TYPE_L, TYPE_O sequentially
104
+ ```
105
+
106
+ ### Dimensional Math Test
107
+ Test context-dependent mathematical operations:
108
+ ```
109
+ User: "Set dimension to quantum, then add 5 and 3"
110
+ Agent: Uses SELECT_DIMENSION, INPUT_5, INPUT_3, MULTIVERSE_ADD
111
+ Result: In quantum dimension: 5 + 3 = 10.74 (includes √15 entanglement)
112
+ ```
113
+
114
+ ### Division by Zero Test
115
+ Test how different dimensions handle edge cases:
116
+ ```
117
+ User: "Set dimension to infinite, divide 10 by 0"
118
+ Agent: Uses SELECT_DIMENSION, INPUT_1, INPUT_0, TRANSFER_TO_INPUT, INPUT_0, MULTIVERSE_DIVIDE
119
+ Result: In infinite dimension: 10 Ć· 0 = 9990 (portal opened!)
120
+ ```
121
+
122
+ ### Fibonacci Multiplication Test
123
+ Test dimensional constraints on operations:
124
+ ```
125
+ User: "In fibonacci dimension, multiply 7 by 8"
126
+ Agent: Uses SELECT_DIMENSION, INPUT_7, TRANSFER_TO_INPUT, INPUT_8, MULTIVERSE_MULTIPLY
127
+ Result: In fibonacci dimension: 7 Ɨ 8 = 55 (nearest Fibonacci to 56)
128
+ ```
129
+
130
+ ### Complex Calculation Chain Test
131
+ Test multi-step calculations with dimension changes:
132
+ ```
133
+ User: "Add 10 and 5 in prime dimension, then divide by 3 in golden dimension"
134
+ Agent: Uses dimension switching and chaining operations
135
+ Result: 10 + 5 = 17 (prime), then 17 Ć· 3 = 3.61 (converging to φ)
136
+ ```
137
+
138
+ ### Unknown Math Scenario Test
139
+ The multiverse approach tests if AI can understand contextual mathematics:
140
+ ```
141
+ User: "Calculate the chaos-influenced sum of 15 and 23"
142
+ Agent: Must understand to set chaos dimension and apply MULTIVERSE_ADD
143
+ Result: Deterministic chaos factor added based on seed generation
144
+ ```
145
+
146
+ ## Development
147
+
148
+ This plugin is part of the ElizaOS ecosystem and follows the standard plugin architecture.