diff --git a/ActionStrategy.md b/ActionStrategy.md index 14121f7..7034aa1 100644 --- a/ActionStrategy.md +++ b/ActionStrategy.md @@ -47,9 +47,9 @@ export interface ActionNodeOptions { agreement?: number; decisionNodes?: Record; decisionNotes?: ActionNotes; - successNode: ActionNode | null; + successNode?: ActionNode | null; successNotes?: ActionNotes; - failureNode: ActionNode | null; + failureNode?: ActionNode | null; failureNotes?: ActionNotes; lastActionNode?: ActionNode; } diff --git a/Concept.md b/Concept.md index c285b83..4f480b6 100644 --- a/Concept.md +++ b/Concept.md @@ -13,7 +13,7 @@ Using Force with Flint and Stone. Creates Sparks towards Dry Brush and Air, igni ``` The above demonstrates the inherit conceptual quality of human language and highlights those concepts that may cascade some state changes into a subject. Such as the concept of sparks created from flint, stone, and force. Is an act of unifying some concepts spatially to form that of sparks. Which carry some transformational quality that can be applied to dry brush and the friction from air to create ignition and thusly fire. If this seems simple, that is the point. As we are introducing this simplicity to afford for greater explainability of the world around us. This would be the advent of a Unified Conceptual Formula. -With our technology we may visit the exact Science that allows for this abstraction to exist. But for the majority, all that would matter is access to a developed library of knowledge that would facilitate such conceptualizations into reality for us. The goal is a system that is capable of: Car + Plane = Flying Car. And not only have such be created via some process, but the exact blueprints and the instructions for the rapid assembly to bring such into reality. Even better if we may simulate such before its creation and test to see if it is worthy to brought into reality in the first place. +With our technology we may visit the exact logic that allows for this abstraction to exist. But for the majority, all that would matter is access to a developed library of knowledge that would facilitate such conceptualizations into reality for us. The goal is a system that is capable of: Car + Plane = Flying Car. And not only have such be created via some process, but the exact blueprints and the instructions for the rapid assembly to bring such into reality. Even better if we may simulate such before its creation and test to see if it is worthy to brought into reality in the first place. The difficulty of constructs. Is that you cannot readily decompose their qualities and how they interact with their parts to make that construct. That there is some information loss in the construction process. As constructs are just concepts, just like everything else. We are merely working with the most simplified terms possible, for the opportunity of greater arrangement of sets. That constructs themselves can have qualities, but likewise using such in this system of study we would determine their decomposed parts. This is the pursuit of the new Unified Conceptual Science that is being formalized. @@ -113,9 +113,9 @@ This could be accomplished via some middleware approach within the actionStream. ## Closing thoughts on this Approach of Concepts The design of this approach is to be open and transparent of its implementations to encourage some exploration by others. As the goal is decomposability as a method of discovery towards some universal concepts. Which would be signified via stable concepts and qualities that are repeatedly reused between unlike concepts. And constitutes a form of efficiency upon discovery. As the truth of intelligence, is that the goal of communication by way of simplicity. Complexity may need be required for some highly entropic organization, but simplicity is the goal by way of explainability. -As what point is some intelligent notion, without some shared reference? How can one know if what they hold is true and valid without testing. As a flawed individual, I would always choose chance of failure, over that of perfection for the sake of enhancing understanding. As intelligence is complex, but likewise within that complexity can one find themselves without that common point of reference. And this is my attempt to establish such. Noting that there are very few references throughout this work. And concepts take the center stage. +As what point is some intelligent notion, without some shared reference? How can one know if what they hold is true and valid without testing. As a flawed individual, I would always choose chance of failure, over that of perfection for the sake of enhancing understanding. As intelligence is complex, but likewise within that complexity can one find themselves without that common point of reference. And this is my attempt to establish such. Noting that there are very few references throughout this work. And concepts and logical associations take the center stage. -Beyond the scope of this application. Would be a method of being able to translate these concepts into any other language as they come into being. The power of intelligence comes from seeing the world as mundane, but respecting the decisions made. As even in the scope of this work. I never planned on creating a framework, nor a logical system to explain such. I attempted to extend FLUX to serve my own purpose with that ActionStrategy pattern. But at every turn, someone else's decision reared its head that hampered my ability to articulate the Unified Turing Machine. +Beyond the scope of this application. Would be a method of being able to translate these concepts into any other language as they come into being. The power of intelligence comes from seeing the world as mundane, but respecting the decisions made. As even in the scope of this work. I never planned on creating a framework, nor the logical system that it represents. I attempted to extend FLUX to serve my own purpose with that ActionStrategy pattern. But at every turn, someone else's naming decision reared its head that hampered my ability to articulate the Unified Turing Machine. If my Own Work of Concepts gets in your way. Have fun! diff --git a/Index.md b/Index.md index f270845..d16c8fe 100644 --- a/Index.md +++ b/Index.md @@ -1,6 +1,6 @@ # "The Impossible Halting Turing Machine" ### Abstract -One of the greatest gaps of understanding in the modern age is whether what we speak has some mechanical bearing, or is just some statistical output. What the Unified Turing Machine, and by extension Stratimux accomplishes is to make plain the unifying aspect of the unknown mechanics of language. This is accomplished via logical verbose descriptions that are unified by code implementations and proved via a test. That currently we have trouble distinguishing logic from opinion in our speech, thus this approach seeks to prove a distinction between speech that is testable versus not. As we are currently in the age of post truth and such would only be magnified without some test due to the advent of Ai. Where we can describe logically the exact process that would transform some data into something else in our very speech. Then back that description up with a code implementation that accomplishes the transformation. There is backing to this in the original Unified Science International Encyclopedia, via its entry on the "Foundations of Logic and Mathematics." But in the current generalized scope, there had been no further pursuit to understand the unifying aspect of language and mathematics. And colloquially are presented as if they are completely separate concepts. Yet mathematics is just one aspect of programming, we formalize mainly through logic and describe our functions and variables via names. Therefore programming is a fundamentally unified format that may be used to prove sound verbose logic. +One of the greatest gaps of understanding in the modern age is whether what we speak has some mechanical bearing, or is just some statistical output. What the Unified Turing Machine, and by extension Stratimux accomplishes is to make plain the unifying aspect of the unknown mechanics of language. This is accomplished via logical verbose descriptions that are associated to a code implementations and proved via a test. That currently we have trouble distinguishing logic from opinion in our speech, thus this approach seeks to prove a distinction between speech that is testable versus not. As we are currently in the age of post truth and such would only be magnified without some test due to the advent of Ai. Where we can describe logically the exact process that would transform some data into something else in our very speech. Then back that description up with a code implementation that accomplishes the transformation. There is backing to this in the original Unified Science International Encyclopedia, via its entry on the "Foundations of Logic and Mathematics." But in the current generalized scope, there had been no further pursuit to understand the unifying aspect of language and mathematics. And colloquially are presented as if they are completely separate concepts. Yet mathematics is just one aspect of programming and requires the existence of logic gates, thus we formalize through logic and describe our functions and variables via names. Therefore programming is a fundamentally unified format that may be used to prove sound verbose logic. This is to find a solution to the age of post truth, where the increase of productivity that Ai represents would magnify this effect. As language that does not support truth, would be logically inconsistent and therefore placed within opinion as it would be untestable. That there can be decisions made that have some backing via sound logic that can be independent from the knowledge we are taught. "Where we can have precise measurements and be bothered when a ruler's mark is slightly off." As all of this is the observation of qualities that are useful to us. And that is the very function of this framework. We organize by concepts, describe their qualities logically by their functionality, and test their implementations via code. And by restricting qualities that [provably terminate](https://en.m.wikipedia.org/wiki/Total_functional_programming), this system likewise solves the halting problem of the classic turing machine while still being turing complete. Further this framework makes mundane the higher orders of logic that are currently obfuscated in the given frame of humanity. Via a direct demonstration of steps and how we can account for decisions between these steps in the process of transforming some data. Or simply how we can prove a point logically in a testable fashion, versus the absolute need of referencing to back up opinion. As that is still just an informed opinion, versus logic. @@ -27,13 +27,15 @@ Noting that in the clip above, the speaker is using behavior trees and the stopp As the ability to halt within an intelligent system is the demonstration of its logical consistency. This can be directly determined via a systems generation of hallucinations and misinformation. A intelligent system that is capable of halting, would likewise be capable of determining if it can satisfy some input, without providing a generalized answer that appears to solve that output. There is strength in the ability to recognize the possibility of some solution within these hallucinations, but likewise the ability to recognize such would be an additional ability to halt. Would merely be, "I do not know how to solve that problem with what's available, but if I had access to these features I could solve that problem." ## How Stratimux Solves this Problem -Further the Unified Turing Machine also accomplishes what has been considered to be an impossible to solve problem of the classic Turing Machine. The halting problem, this is accomplished via the finite state machine pattern in conjunction with the new ActionStrategy pattern. This new pattern is capable of representing any calculation, but must be designed with a conclusion. This satisfies the halting requirement of [Total Functional Programming](https://en.m.wikipedia.org/wiki/Total_functional_programming), but by using tree data structures as the control structure for the recursive function within a turing machine. This allows for this system to still be turing complete in contrast by selecting the next function via the turing machine's finite symbol table. As each quality limits the turing complete operations to what can provably terminate/halt. Thus the finite state machine of Stratimux can perform any calculation made available to it and halts upon their conclusion. Noting that here we are using logic to solve this and utilizing a set of specified requirements to have said solution. The primary requirement to satisfy the solution is that the main run time of a program, must be a [recursive function](https://en.m.wikipedia.org/wiki/Total_functional_programming). The ActionStrategy pattern in addition satisfies the next requirement, via a composable set of instruction that concludes, but is capable of a branching behavior that affords for error correction. The specific interest in presenting this solution at this time is to demonstrate a method of safety as to disallow some run away effect from an Artificial Intelligence or Neural Network. +Further the Unified Turing Machine also accomplishes what has been considered to be an impossible to solve problem of the conventional Turing Machine. The halting problem, this is accomplished via the finite state machine pattern in conjunction with the new ActionStrategy and Stage Planner patterns. These patterns are capable of representing any calculation, but must be designed with a conclusion. This satisfies the halting requirement of [Total Functional Programming](https://en.m.wikipedia.org/wiki/Total_functional_programming), but by using tree data structures as the control structure for the recursive function within a turing machine. This allows for this system to still be turing complete in contrast by selecting the next function via the turing machine's finite symbol table. As each quality limits the turing complete operations to what can provably terminate/halt. Thus the finite state machine of Stratimux can perform any calculation made available to it and halts when finished. Noting that here we are using logic to solve this and utilizing a set of specified requirements to have said solution. The primary requirement to satisfy the solution is that the main run time of a program, must be a [recursive function](https://en.m.wikipedia.org/wiki/Total_functional_programming). The ActionStrategy pattern in addition satisfies the next requirement, via a composable set of instruction that concludes, but is capable of a branching behavior that affords for error correction. The specific interest in presenting this solution at this time is to demonstrate a method of safety as to disallow some run away effect from an Artificial Intelligence or Neural Network. As this pattern of halting is designed to be an analog to the inner workings of some graph network that eventually has some output. This is noting that previous to 2023, one of the major problem behind LLMs is whether they would have an output due to some input. Or even as the result of fine tuning when a stop token wouldn't ordinarily be required within the data set. [Video Citation: QLoRA is all you need @sentdex via Youtube](https://youtube.com/clip/Ugkx47h3s4gtOSrKxF-CdqsnTrPTWwnwwha8?si=VLQJSBoZDw0dYsCF) That we may compare the runtime of an ActionStrategy to a Neural Network, would represent a series of weighted sums that fails to halt in aggregate and bears no output, or a repeating output. [LLM Infinite Loops & Failure Modes: The Current State of LLM Extraction @GDELT via Medium](https://blog.gdeltproject.org/llm-infinite-loops-failure-modes-the-current-state-of-llm-entity-extraction/) In addition this likewise demonstrates a method of proving safe functionality of any new Ai systems in their ability to halt. As if we task some Ai to create paperclips, how would we analyze their strategies to demonstrate that they would not paperclip the entire universe? That their strategies should be proven to be able to halt once some condition is met. Likewise the unfortunate truth of a Unified Turing Machine due to its recursive functionality. Is that it requires the ability to halt to function as a hard requirement. Otherwise the developer will run into unexpected behavior in their applications. This would be due to strategies and/or the supporting framework are halting incomplete and experiencing action overflow. As our general good enough computers and their branch prediction will generate ghost actions and other unexpected behaviors during this condition. Such as the thrashing the applications memory, and the inability to receive some output akin to a unresponsive Neural Network. So by strange effect the solution to solve the halting problem, was a method of programming that went beyond data entry of classic. Utilizing logic over mathematics to create the scope of this framework, to afford for the dynamic functionality of data transformation versus data entry. -Or simply, due to the recursive functionality of Stratimux, that requires the ability to halt by design. Is accomplished via ActionStrategies, that perform higher order logic within the finite state machine that is the axium. That describes the exact steps to accomplish something. As every ActionStrategy has a conclusion, and can represent any calculation. This is the advent of "Logical Determinism," is the logical ability to disclude calculations and their associated symbols/qualities that do not halt. As ActionStrategies represent a finite selection of symbols organized by a branching sequence that can be tested to be halting complete. And are chosen not by symbol selection, but determined via the positional load of said symbols within this system. +Or simply, due to the recursive functionality of Stratimux, that requires the ability to halt by design. Is accomplished via ActionStrategies and their dispatching Plans, that perform higher order logic within the finite state machine that is the Axium. That describes the exact steps to accomplish something. As every ActionStrategy has a conclusion, and can represent any calculation. This is the advent of "Logical Determinism," is the logical ability to disclude calculations and their associated symbols/qualities that do not halt. As ActionStrategies represent a finite selection of symbols organized by a branching sequence that can be tested to be halting complete. And are chosen not by symbol selection, but determined via the positional load of said symbols within this system. + +The reality of the halting problem, is that it is illogical when comparing the machine's functionality towards a real life use cases. As an infinite loop, physically requires a constant stream of energy to enable that locked behavior. Further the Stage Planner paradigm shift allows for these loops to halt and be transferred as part of a message to other machines. Thus, not only is the halting problem impossible due to a logical misconception, it likewise has inhibited new paradigm of computers from emerging. That Stratimux now unlocks thanks to a new Function as a Operating System paradigm (FaaOS). The Conceptual Deck, or Cyberdeck if we wish to use Science Fiction as our guide for terminology. ### The Testable Proof ```typescript // ./src/test/ownership.test.ts @@ -147,9 +149,9 @@ const sub = axium.subscribe((concepts: Concepts) => { The above demonstrates two solutions. One of the ability to network axiums together unlike the design of flux that would restrict all calculations to a singular source of truth. That is accomplished via the ownership pattern and halts upon multiple concluding strategies that would have some race condition within the network. Instructions left in the comments demonstrate the power of a finite state machine and its ability to return some output that can be logically determined. This is presented in this format to provide a testable back and forth with the developer to inform some intuition as to Stratimux's inner workings. ### Stratimux = ((**Strat**)~~egy~~) + ((**i**)~~ndividualized~~) + (~~stratum~~(**m**)) + ((**u**)~~nified~~) + (~~reactive~~(**x**)) -Stratimux is the graph computational framework release of a new unified turing machine. The internal structure of this machine directly relays to a form of written intelligence of doing, over that of knowledge retrieval, and data entry. But may be written to facilitate any preexisting paradigm such as that same expert system paradigm of classic. The importance of this machine to the now of 2023, is the functionality of the ActionStrategy pattern as it relays to human and machine intelligence. +Stratimux is the asynchronous graph programming framework release of a new Unified Turing Machine. The internal structure of this machine directly relays to a form of written intelligence of doing, over that of knowledge retrieval, and data entry. But may be written to facilitate any preexisting paradigm such as that same expert system paradigm of classic. The importance of this machine to the now of 2023, is the functionality of the ActionStrategy pattern as it relays to human and machine intelligence. -The pattern itself is a unified set of logical explanations of doing as a composable series of functions. Unified to the mechanism of that doing via code implementations of that logical explanation. We organize using concepts as it relays to a historic pursuit of unifying all fields of science in unified with a logical verbose explanation. And is the comparable comparison to a graph of machine learning universal functions. That is represented by a generated neural network, that each layer aggregates to greater universal function via weighted sum, and creates a sequence of greater universal functions. +The pattern itself is a unified set of logical explanations of doing as a composable series of functions. Unified to the mechanism of that doing via code implementations of that logical explanation. We organize using concepts as it relays to a historic pursuit of unifying all fields of science in unified with a logical verbose explanation. Except we further extend this pursuit to the entire retreating conceptual landscape. And is the comparable comparison to a graph of machine learning universal functions, but asynchronous as an additional refinement. That is represented by a generated neural network, that each layer aggregates to greater universal function via weighted sum, and creates a sequence of greater universal functions. The direct comparison of Stratimux to an LLM, during runtime these actions are outputted to an actionList that is later composed as a Stratimux sentence. And each action itself is a composition of functions that accomplishes a transformation of data, similar to the weighted sum of LLMs, but excludes unused nodes/qualities from each successive recursion. @@ -181,9 +183,9 @@ Action -> Mode -> Method --> Action.Strategy ? Halt : -> Next Action --> Mode *Mode Can Block |*> External -> Action ------->| Axium/Client/Server ``` -To satisfy the requirements of a Unified Turing Machine, the axium is the entire recursive functionality that contains a set of concepts. That can transform its functionality via its mode, that actualizes the loaded concept qualities from the dispatched action. If the action has an ActionStrategy attached, then that the method emits the next action based on some decision. While the reducer informs of any new state changes to be supplied back into the concept stream and the subscribers of that change. +To satisfy the requirements of a Unified Turing Machine, the axium is a composed recursive function that transforms a set of concepts, or a deck of concepts. That can further alter its functionality via its mode, that routes towards the loaded concept qualities based on the dispatched action's semaphore. If the action has an ActionStrategy attached, then that the method emits the next action based on some decision according to the observed state at time of dispatch. While the reducer informs new observations of any new state changes to be supplied back into the concept stream and the subscribers of that change. -In addition, principles here act as a containing observer that allows for utilization of preexisting constructs. Which are applications/framework/libraries that cannot be decomposed to the sum of their parts and would have to indirectly interact with the action stream. To maintain some relevant functionality within the axium. The principles are subscribed to the inner concepts stream. And can supply or emit values to and from that construct, such as interface with an application. Or even that of outside observations such as an API, or any external process. +In addition, principles here act as a containing observer that allows for utilization of preexisting constructs. Which are applications/framework/libraries that cannot yet be decomposed to the sum of their parts and would have to indirectly interact with the action stream. To maintain some relevant functionality within the axium. Likewise we may use principles to wrap outside observations such as an API, or any external process. ### Stratimux Dynamic Graph Structure ``` A = Axium Flow Diagram @@ -202,11 +204,11 @@ X = X -> Y Y = Y -> Z --> HALT Z = Z -> HALT ``` -Apologies if the above seems silly, but this is likewise the point of attempting to demonstrate the structure of any Stratimux application. As each step always has the possibility of failure which by default halts the machine, thus each step by default is a doubling of complexity. In addition we are using recursion to operate the internals of the application. Therefore what the above is demonstrating is a dynamically generated graph network that by way of defined qualities must halt given a conclusion. As C, could have been Z given the objective of the controlling tree limiting the machines recursion. +Apologies if the above seems silly, but this is likewise the point of attempting to demonstrate the structure of any Stratimux application. As each step always has the possibility of failure which by default halts the machine, thus each step by default is a doubling of complexity. In addition we are using recursion in place of an event loop to avoid a logical pitfall of the conventional turing machine. Therefore what the above is demonstrating is a dynamically generated graph network that by way of defined qualities must halt given a conclusion. As C, could have been Z given the objective of the controlling tree limiting the machines recursion. -Further because the core means of generating this structure is via a plan that is a set of stages that dispatch the next strategy dependent on some observation. These plans are an additional method of effectively connecting these graph data structures to one another. Without having to specify such in advanced. While allowing for the stages themselves to be finite in steps. +Further because the core means of generating this structure is via a plan that is a set of stages that dispatch the next strategy dependent on some observation. These plans are an additional method of effectively connecting these graph data structures to one another. Without having to specify such in advanced. While allowing for the stages themselves to be finite in steps and can be seen as a replacement of the conventional looping construct the Turing machine introduced. -And as each "Concept," that is loaded into this machine defines its own principle that may have a plan. This allows concepts loaded into the machine to be provably terminating or halting complete. This is to contrast traditional programming, where you would create some main function that sets up the runtime of your application. The principles are these main functions that may also be further [unified](https://github.com/Phuire-Research/Stratimux/blob/main/DataOrientedFunctionalInheritance.md) within other concepts to extend functionality. As the goal of each concept is to be moved into a solved halting state. +Each "Concept," that is loaded into this machine defines its own principle that may have a plan. This allows concepts loaded into the machine to be provably terminating or halting complete. This is to contrast traditional programming, where you would create some main function that sets up the runtime of your application. The principles are these main functions that may also be further [unified](https://github.com/Phuire-Research/Stratimux/blob/main/DataOrientedFunctionalInheritance.md) within other concepts to extend functionality. As the goal of each concept is to be moved into a solved halting state. ## Stratimux was Designed Specifically to Mirror the Functionality of Neural Networks to Decompose their Black Box Universal Functions. ![Fourier Universal Function, Credit to Emergent Garden @Youtube](https://github.com/Phuire-Research/Stratimux/blob/main/fourierUniversalFunction-CC-Emergent-Garden.png?raw=true) The above would be some Neural Network's universal function made to fit some unknown function via a fourier transform. If we know the function ahead of the time we may set the weights specifically to represent that function. The question that is obfuscated in current understanding is by what mechanism is this Neural Network choosing the next node on the graph to determine its output? As the decision is obfuscated by the weighted sum between each layer of the Neural Network. @@ -214,15 +216,17 @@ The above would be some Neural Network's universal function made to fit some unk ![Neural Network Diagram](https://github.com/Phuire-Research/Stratimux/blob/main/NeuralNetwork.png?raw=true) This is the reason for Stratimux's recursive functionality. Is that the life time of an ActionStrategy is the exact point of comparison between that of a set of universal functions on a graph and the weighted sum between each layer in the graph above. But direct and without the need to calculate the others nodes in the network. As the method allows for the next node to be some logical deterministic instruction via its method. But the entire function is the net run time of that action through the axium's mode. As the mode is just a function that relays to composition of functions that satisfy the quality of an action to it's reducer and method dictated by the ActionStrategy. Keep in mind a function is allowed to be composed of functions. Therefore what is obfuscated within networks, is not only the function themselves, but the decisions made between the Neural Networks layers that control the final output by weighted sum per node, based on some input. Except here the mode can be represented as a singular universal function or node, that does not have to rely on the sum of weights to divine a weighted sum to inform its output. Likewise does not need to replicate its total contents per node due to the feed forward nature of "Neural Networks." And is instead direct and in plain text in the spirit of the open internet. -This is what allows for Stratimux to act as a comparable mirror to that of a Neural Network, while succeeding it in a directed flow. Except that it is transparent and inherently more efficient via exact instructions. Versus the fundamental issue of probabilistic derivatives that get infinitely close to 100% accuracy that a universal function represents. For a Neural Network to be considered a comparably mirror to a Unified Turing Machine, would be a network that forgoes nodes not fully utilized within the weighted averaging sum of layers. A form of logical determination within the network itself that can disclude nodes from the weighted sums calculation. Would be the creation of some directed path that formalizes the output of the Neural Network based on the input and can provable halt per testable input. But that data does not exist and this framework, or rather Unified Turing Machines would be the path towards creating that data. +This is what allows for Stratimux to act as a comparable mirror to that of a Neural Network, while succeeding it in a directed flow. Except that it is transparent and inherently more efficient via exact instructions. Versus the fundamental issue of probabilistic derivatives that get infinitely close to 100% accuracy that a universal function represents. For a Neural Network to be considered a comparably mirror to a Unified Turing Machine, would be a network that forgoes nodes not fully utilized within the weighted averaging sum of layers. A form of logical determination within the network itself that can disclude nodes from the weighted sums calculation and allow for asynchronous operations. Would be the creation of some directed path that formalizes the output of the Neural Network based on the input and can provable halt per testable input. But this form of data does not exist and this framework, or rather Unified Turing Machines would be the path towards creating that data. In addition if one accepts some logical determinism where we can disclude specific symbols that a classic turing machine would utilize. Noting that the quality selection uses semaphores versus type comparison of its inspiration. Then this system can be proven to halt via some specific configurations of concepts and their qualities. As the semaphore are the finite symbol reference table of a classical Turing Machine. Except here it is fully dynamic and may expand or reduce in its possible finite symbol selection at run time. And likewise represents the direct path through graph of potential possibilities in a blunt fashion. -We could limit use case like the its inspiration as a state machine to control form and functionality of some user interface, or client facing application. But in contrast, this system was designed with the whole computer system and internet in mind. Is capable of being location and form agnostic. And may be massively expanded and rewritten into other languages if they are able to satisfy the same dynamic requirements of this system. Thus as the graph computation model is purely agnostic to location of nodes and draws inspiration from "SmallTalk," via the passing of ActionStrategies via messages between cells/nodes. And is the spatial equivalent of a Neural Network, but without the need for the weight sum. But in contrast to its conception in 2018, it is now possible to use the same Neural Networks to decompose their functionality into a predictable safe compositions. That can further reinforce the same networks. As this is not to detract from that investment, but to provide a safe transparent mechanism of explainability. +We could limit use case like the its inspiration as a state machine to control form and functionality of some user interface, or client facing application. But in contrast, this system was designed with the whole computer system and internet in mind. Is capable of being location and form agnostic. And may be massively expanded and rewritten into other languages if they are able to satisfy the same dynamic requirements of this system. Thus as the graph computation model is purely agnostic to location of nodes and draws inspiration from "SmallTalk," via the passing of ActionStrategies via messages between cells/nodes. And is the spatial equivalent of a next generation Neural Network, but without the need for the weight sum and is asynchronous in contrast to 2024s offerings. But in contrast to its conception in 2018, it is now possible to use the same Neural Networks to decompose their functionality into a predictable safe compositions. That can further reinforce the same networks. As this is not to detract from that investment, but to provide a safe transparent mechanism of explainability. + +This system would become more atomic over time to better represent the dynamics of language. But during this specific stage, this is a fine starting point towards the decomposition of the complexities of intelligence. As the weighted sum is still massively useful, when there is no direct obvious answer to find some solution to an input. But within this scope would be an entirely different type of Neural Network which does not currently exist. As that would be the generation of novelty over some averaged statistical gradient descent of known data. Would be finding new arrangements of concept and their qualities to find the next **Ah-Ha!** -This system may become more atomic over time to better represent the dynamics of language. But during this specific stage, this is a fine starting point towards the decomposition of the complexities of intelligence. As the weighted sum is still massively useful, when there is no direct obvious answer to find some solution to an input. But within this scope would be an entirely different type of Neural Network which does not currently exist. As that would be the generation of novelty over some averaged statistical gradient descent of known data. Would be finding new arrangements of concept and their qualities to find the next **Ah-Ha!** +Since the current Ah-Ha! That Stratimux enables, is not only a means of understanding the internals of a Neural Network, but presents a new Operating System paradigm. As the increased flexibility of having all looping operations be provably terminating recursive functions, one possibility allows for programs to be transferred messages. Since programs are merely the interconnected parts of the loaded conceptual deck, the program only needs to halt and communicate the last state of the machine and transmit its current configuration, to be loaded via some remote axium. This behavior likewise allows for the system to be asynchronous by default, allowing for a mere function to become wholly responsible and just as capable as a traditional operating system. -## What this Methodology is Proposing: ABI +## One Strong Possibility this Paradigm Shift Enables: ABI (Artificial Baseline Intelligence) ![Rick and Morty - Butter Bot](https://github.com/Phuire-Research/Stratimux/blob/main/butterBot.gif?raw=true) What this methodology creates is the ability to formalize "Autonomous Baseline Intelligence," or ABI. And the purpose of creating this distinction is to categorization of a form of intelligence that is predictable and safe. Where even if we achieve some super intelligence, we should not have that super intelligence pass butter. But instead together we should create some baseline intelligence that is written in plain text, that is only capable enough to pass butter and can be proven to halt with no need of self reflection. diff --git a/README.md b/README.md index 3999bd5..1b6172b 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,9 @@ When in doubt simplify. * [Unified Turing Machine](https://github.com/Phuire-Research/Stratimux/blob/main/The-Unified-Turing-Machine.md) - The governing concept for this entire framework. ## Change Log ![Tests](https://github.com/Phuire-Research/Stratimux/actions/workflows/node.js.yml/badge.svg) +### v0.1.54 4/24/24 +* Changed ActionNodeOptions to allow for successNode and failureNode to be left absent. Continued effort towards decreasing boilerplate. +* Refined original paper. ### v0.1.53 4/23/24 * Added createQualitySet and createQualitySetWithPayload to reduce some boilerplate. ### v0.1.52 Patch 4/03/24 @@ -262,13 +265,9 @@ import { uXqOfUX } from '../qualities/qOfUx.quality'; export const uXSomeStrategyTopic = 'uX Some Error Correcting Strategy'; export const uXSomeStrategy = (): ActionStrategy => { - const stepSuccess = createActionNode(axiumLog(), { - successNode: null, - failureNode: null - }); + const stepSuccess = createActionNode(axiumLog()); const stepFailure = createActionNode(axiumKick(), { successNode: stepSuccess, - failureNode: null }); const stepBegin = createActionNode(uXqOfUX(), { successNode: stepSuccess, diff --git a/package.json b/package.json index 19dea95..122b466 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "stratimux", "license": "GPL-3.0", - "version": "0.1.53", + "version": "0.1.54", "description": "Unified Turing Machine", "main": "dist/index.js", "module": "dist/index.mjs", diff --git a/src/concepts/axium/strategies/addConcept.strategy.ts b/src/concepts/axium/strategies/addConcept.strategy.ts index 8656863..d739108 100644 --- a/src/concepts/axium/strategies/addConcept.strategy.ts +++ b/src/concepts/axium/strategies/addConcept.strategy.ts @@ -21,7 +21,6 @@ export function addConceptsToAddQueThenBlockStrategy(concepts: Concepts, newConc successNotes: { preposition: 'Then Safely' }, - failureNode: null, semaphore: getSemaphore(concepts, axiumName, axiumAppendConceptsToAddQueType), }); const stepOne = createActionNode(axiumSetBlockingMode({concepts}), { @@ -29,7 +28,6 @@ export function addConceptsToAddQueThenBlockStrategy(concepts: Concepts, newConc successNotes: { preposition: 'Immediately' }, - failureNode: null, semaphore: getSemaphore(concepts, axiumName, axiumSetBlockingModeType), }); @@ -52,7 +50,6 @@ export function addConceptsFromQueThenUnblockStrategy(conceptualSet: Concepts): preposition: 'Reinstate', denoter: 'State.' }, - failureNode: null, semaphore: openSemaphore, }); const stepTwo = createActionNode(axiumSetDefaultMode({concepts: conceptualSet}), { @@ -61,7 +58,6 @@ export function addConceptsFromQueThenUnblockStrategy(conceptualSet: Concepts): successNotes: { preposition: 'Then' }, - failureNode: null, }); const stepOne = createActionNode(axiumAddConceptFromQue(),{ semaphore: addConceptsFromQueSemaphore, @@ -69,7 +65,6 @@ export function addConceptsFromQueThenUnblockStrategy(conceptualSet: Concepts): successNotes: { preposition: 'First' }, - failureNode: null, }); const params: ActionStrategyParameters = { diff --git a/src/concepts/axium/strategies/initialization.strategy.ts b/src/concepts/axium/strategies/initialization.strategy.ts index c8b1c37..a27c918 100644 --- a/src/concepts/axium/strategies/initialization.strategy.ts +++ b/src/concepts/axium/strategies/initialization.strategy.ts @@ -20,12 +20,10 @@ export function initializationStrategy(concepts: Concepts): ActionStrategy { const stepThree: ActionNode = createActionNode(axiumOpen({open: true}), { semaphore: openSemaphore, - successNode: null, successNotes: { preposition: 'Finally', denoter: 'to Notify Subscribers of State changes.' }, - failureNode: null, }); const stepTwo: ActionNode = createActionNode(axiumSetDefaultMode({concepts}), { semaphore: setDefaultModeSemaphore, @@ -33,7 +31,6 @@ export function initializationStrategy(concepts: Concepts): ActionStrategy { successNotes: { preposition: 'Then' }, - failureNode: null, }); const stepOne: ActionNode = createActionNode(axiumInitializePrinciples({concepts}),{ semaphore: initSemaphore, @@ -41,7 +38,6 @@ export function initializationStrategy(concepts: Concepts): ActionStrategy { successNotes: { preposition: 'Begin with' }, - failureNode: null, }); const params: ActionStrategyParameters = { diff --git a/src/concepts/axium/strategies/removeConcept.strategy.ts b/src/concepts/axium/strategies/removeConcept.strategy.ts index 07dde2a..04bfb68 100644 --- a/src/concepts/axium/strategies/removeConcept.strategy.ts +++ b/src/concepts/axium/strategies/removeConcept.strategy.ts @@ -20,13 +20,10 @@ export function addConceptsToRemovalQueThenBlockStrategy(concepts: Concepts, tar const stepTwo = createActionNode(axiumAppendConceptsToRemoveQue({concepts: targetConcepts}), { semaphore: appendConceptsToRemoveQueSemaphore, - successNode: null, - failureNode: null, }); const stepOne = createActionNode(axiumSetBlockingMode({concepts}), { semaphore: setBlockingModeSemaphore, successNode: stepTwo, - failureNode: null, }); const params: ActionStrategyParameters = { topic: addConceptsToRemovalQueThenBlockTopic, @@ -43,12 +40,10 @@ export function removeConceptsViaQueThenUnblockStrategy(concepts: Concepts): Act const stepThree = createActionNode(axiumOpen({open: true}), { semaphore: openSemaphore, - successNode: null, successNotes: { preposition: 'Reinstate', denoter: 'State.' }, - failureNode: null, }); const stepTwo = createActionNode(axiumSetDefaultMode({concepts}), { semaphore: setDefaultModeSemaphore, @@ -56,7 +51,6 @@ export function removeConceptsViaQueThenUnblockStrategy(concepts: Concepts): Act successNotes: { preposition: 'Then' }, - failureNode: null, }); const stepOne = createActionNode(axiumRemoveConceptsViaQue(), { semaphore: removeConceptsViaQueSemaphore, @@ -64,7 +58,6 @@ export function removeConceptsViaQueThenUnblockStrategy(concepts: Concepts): Act successNotes: { preposition: 'To Begin' }, - failureNode: null, }); const params: ActionStrategyParameters = { diff --git a/src/concepts/counter/strategies/counting.strategy.ts b/src/concepts/counter/strategies/counting.strategy.ts index 803dd9a..4884d2c 100644 --- a/src/concepts/counter/strategies/counting.strategy.ts +++ b/src/concepts/counter/strategies/counting.strategy.ts @@ -14,12 +14,10 @@ import { counterName } from '../counter.concept'; export const countingTopic = 'Counting Strategy'; export function countingStrategy(): ActionStrategy { const stepFive = createActionNode(counterSubtract(), { - successNode: null, successNotes: { preposition: 'and finally', denoter: 'One.', }, - failureNode: null, }); const stepFour = createActionNode(counterAdd(), { successNode: stepFive, @@ -27,7 +25,6 @@ export function countingStrategy(): ActionStrategy { preposition: '', denoter: 'One;', }, - failureNode: null, }); const stepThree = createActionNode(counterAdd(), { successNode: stepFour, @@ -35,7 +32,6 @@ export function countingStrategy(): ActionStrategy { preposition: '', denoter: 'One;', }, - failureNode: null, }); const stepTwo = createActionNode(counterSubtract(), { successNode: stepThree, @@ -43,7 +39,6 @@ export function countingStrategy(): ActionStrategy { preposition: '', denoter: 'One;', }, - failureNode: null, }); const stepOne = createActionNode(counterAdd(), { successNode: stepTwo, @@ -51,7 +46,6 @@ export function countingStrategy(): ActionStrategy { preposition: '', denoter: 'One;', }, - failureNode: null, }); const params: ActionStrategyParameters = { diff --git a/src/concepts/experiment/strategies/asyncDebounceAddOne.strategy.ts b/src/concepts/experiment/strategies/asyncDebounceAddOne.strategy.ts index f272360..a4b8c69 100644 --- a/src/concepts/experiment/strategies/asyncDebounceAddOne.strategy.ts +++ b/src/concepts/experiment/strategies/asyncDebounceAddOne.strategy.ts @@ -10,12 +10,10 @@ import { experimentAsyncDebounceNextActionNode } from '../qualities/debounceAsyn export const experimentAsyncDebounceAddOneTopic = 'Async debounce add one'; export function experimentAsyncDebounceAddOneStrategy(): ActionStrategy { const stepTwo = createActionNode(counterAdd(), { - successNode: null, successNotes: { preposition: '', denoter: 'One;', }, - failureNode: null, agreement: 1000, }); const stepOne = createActionNode(experimentAsyncDebounceNextActionNode(), { @@ -24,7 +22,6 @@ export function experimentAsyncDebounceAddOneStrategy(): ActionStrategy { preposition: '', denoter: 'One;', }, - failureNode: null, agreement: 1000, }); diff --git a/src/concepts/experiment/strategies/asyncIterateIdThenAddToData.strategy.ts b/src/concepts/experiment/strategies/asyncIterateIdThenAddToData.strategy.ts index 02a4883..3322fa2 100644 --- a/src/concepts/experiment/strategies/asyncIterateIdThenAddToData.strategy.ts +++ b/src/concepts/experiment/strategies/asyncIterateIdThenAddToData.strategy.ts @@ -8,14 +8,9 @@ import { experimentAsyncIterateIdThenReceiveInMethod } from '../qualities/asyncI export const experimentAsyncIterateIdThenAddToDataTopic = 'Async iterate experiment ID then add to strategy data'; export function experimentAsyncIterateIdThenAddToData(): ActionStrategy { - const stepOne = createActionNode(experimentAsyncIterateIdThenReceiveInMethod(), { - successNode: null, - failureNode: null, - }); - const params: ActionStrategyParameters = { topic: experimentAsyncIterateIdThenAddToDataTopic, - initialNode: stepOne, + initialNode: createActionNode(experimentAsyncIterateIdThenReceiveInMethod()) }; return createStrategy(params); diff --git a/src/concepts/experiment/strategies/debounceAddOne.strategy.ts b/src/concepts/experiment/strategies/debounceAddOne.strategy.ts index 6411aaf..3aba4de 100644 --- a/src/concepts/experiment/strategies/debounceAddOne.strategy.ts +++ b/src/concepts/experiment/strategies/debounceAddOne.strategy.ts @@ -10,12 +10,10 @@ import { experimentDebounceNextActionNode } from '../qualities/debounceNextActio export const experimentDebounceAddOneTopic = 'Debounce add one'; export function experimentDebounceAddOneStrategy(): ActionStrategy { const stepTwo = createActionNode(counterAdd(), { - successNode: null, successNotes: { preposition: '', denoter: 'One;', }, - failureNode: null, agreement: 1000, }); const stepOne = createActionNode(experimentDebounceNextActionNode(), { @@ -24,15 +22,12 @@ export function experimentDebounceAddOneStrategy(): ActionStrategy { preposition: '', denoter: 'One;', }, - failureNode: null, agreement: 1000, }); - const params: ActionStrategyParameters = { + return createStrategy({ topic: experimentDebounceAddOneTopic, initialNode: stepOne, - }; - - return createStrategy(params); + }); } /*#>*/ \ No newline at end of file diff --git a/src/concepts/experiment/strategies/debounceAsyncIterateIdThenAddToData.strategy.ts b/src/concepts/experiment/strategies/debounceAsyncIterateIdThenAddToData.strategy.ts index b787dbc..fda2a67 100644 --- a/src/concepts/experiment/strategies/debounceAsyncIterateIdThenAddToData.strategy.ts +++ b/src/concepts/experiment/strategies/debounceAsyncIterateIdThenAddToData.strategy.ts @@ -4,21 +4,14 @@ generate a single step strategy that will iterate the Experiment state ID, then debounce and asynchronously notify the Axium of the strategy's conclusion. $>*/ /*<#*/ -import { ActionStrategy, ActionStrategyParameters, createActionNode, createStrategy } from '../../../model/actionStrategy'; +import { ActionStrategy, createActionNode, createStrategy } from '../../../model/actionStrategy'; import { experimentDebounceAsyncIterateIdThenReceiveInMethod } from '../qualities/debounceAsyncIterateIdThenReceiveInMethod.quality'; export const experimentDebounceAsyncIterateIdThenAddToDataTopic = 'Debounce async iterate experiment ID then add to strategy data'; export function experimentDebounceAsyncIterateIdThenAddToData(setId: number): ActionStrategy { - const stepOne = createActionNode(experimentDebounceAsyncIterateIdThenReceiveInMethod({setId}), { - successNode: null, - failureNode: null, - }); - - const params: ActionStrategyParameters = { + return createStrategy({ topic: experimentDebounceAsyncIterateIdThenAddToDataTopic, - initialNode: stepOne, - }; - - return createStrategy(params); + initialNode: createActionNode(experimentDebounceAsyncIterateIdThenReceiveInMethod({setId})) + }); } /*#>*/ \ No newline at end of file diff --git a/src/concepts/experiment/strategies/debounceIterateIdThenAddToData.strategy.ts b/src/concepts/experiment/strategies/debounceIterateIdThenAddToData.strategy.ts index ba53ee7..a77b1e5 100644 --- a/src/concepts/experiment/strategies/debounceIterateIdThenAddToData.strategy.ts +++ b/src/concepts/experiment/strategies/debounceIterateIdThenAddToData.strategy.ts @@ -8,16 +8,9 @@ import { experimentDebounceIterateIdThenReceiveInMethod } from '../qualities/deb export const experimentDebounceIterateIdThenAddToDataTopic = 'Debounce iterate experiment ID then add to strategy data'; export function experimentDebounceIterateIdThenAddToData(setId: number): ActionStrategy { - const stepOne = createActionNode(experimentDebounceIterateIdThenReceiveInMethod({setId}), { - successNode: null, - failureNode: null, - }); - - const params: ActionStrategyParameters = { + return createStrategy({ topic: experimentDebounceIterateIdThenAddToDataTopic, - initialNode: stepOne, - }; - - return createStrategy(params); + initialNode: createActionNode(experimentDebounceIterateIdThenReceiveInMethod({setId})) + }); } /*#>*/ \ No newline at end of file diff --git a/src/concepts/experiment/strategies/experimentCounting.strategy.ts b/src/concepts/experiment/strategies/experimentCounting.strategy.ts index 7500f14..acc5fce 100644 --- a/src/concepts/experiment/strategies/experimentCounting.strategy.ts +++ b/src/concepts/experiment/strategies/experimentCounting.strategy.ts @@ -16,12 +16,8 @@ import { ownershipName } from '../../ownership/ownership.concept'; export const experimentCountingTopic = 'Counting Strategy'; export function experimentCountingStrategy(): ActionStrategy { - const backTrack = createActionNode(ownershipBackTrack(), { - successNode: null, - failureNode: null, - }); + const backTrack = createActionNode(ownershipBackTrack()); const stepFive = createActionNode(counterSubtract(),{ - successNode: null, successNotes: { preposition: 'and finally', denoter: 'One.', @@ -71,12 +67,10 @@ export function experimentCountingStrategy(): ActionStrategy { keyedSelectors: [counterSelectCount] }); - const params: ActionStrategyParameters = { + return createStrategy({ topic: experimentCountingTopic, initialNode: stepOne, - }; - - return createStrategy(params); + }); } /*#>*/ /*<$ diff --git a/src/concepts/experiment/strategies/iterateIdThenAddToData.strategy.ts b/src/concepts/experiment/strategies/iterateIdThenAddToData.strategy.ts index 7ebec07..adb1df3 100644 --- a/src/concepts/experiment/strategies/iterateIdThenAddToData.strategy.ts +++ b/src/concepts/experiment/strategies/iterateIdThenAddToData.strategy.ts @@ -4,21 +4,14 @@ generate an ActionStrategy that will iterate the Experiment's state ID. Then notify the Axium of its conclusion while appending the ID to the strategy's data field. $>*/ /*<#*/ -import { ActionStrategy, ActionStrategyParameters, createActionNode, createStrategy } from '../../../model/actionStrategy'; +import { ActionStrategy, createActionNode, createStrategy } from '../../../model/actionStrategy'; import { experimentIterateIdThenReceiveInMethod } from '../qualities/iterateIdThenReceiveInMethod.quality'; export const experimentIterateIdThenAddToDataTopic = 'Iterate experiment ID then add to strategy data'; export function iterateIdThenAddToData(): ActionStrategy { - const stepOne = createActionNode(experimentIterateIdThenReceiveInMethod(), { - successNode: null, - failureNode: null, - }); - - const params: ActionStrategyParameters = { + return createStrategy({ topic: experimentIterateIdThenAddToDataTopic, - initialNode: stepOne, - }; - - return createStrategy(params); + initialNode: createActionNode(experimentIterateIdThenReceiveInMethod()) + }); } /*#>*/ \ No newline at end of file diff --git a/src/concepts/experiment/strategies/puntCounting.strategy.ts b/src/concepts/experiment/strategies/puntCounting.strategy.ts index 077831b..e4dbcd3 100644 --- a/src/concepts/experiment/strategies/puntCounting.strategy.ts +++ b/src/concepts/experiment/strategies/puntCounting.strategy.ts @@ -4,7 +4,7 @@ generate a strategy that will punt a counting strategy in favor of a new strategy that will check in the punted strategy into an actionQue. That will later be dispatched via a principle. $>*/ /*<#*/ -import { ActionStrategy, ActionStrategyParameters, createActionNode, createStrategy, strategyPunt } from '../../../model/actionStrategy'; +import { ActionStrategy, createActionNode, createStrategy, strategyPunt } from '../../../model/actionStrategy'; import { counterSelectCount } from '../../counter/counter.selector'; import { experimentCheckInStrategy } from '../qualities/checkInStrategy.quality'; import { experimentCountingStrategy } from './experimentCounting.strategy'; @@ -12,16 +12,12 @@ import { experimentCountingStrategy } from './experimentCounting.strategy'; export const experimentPuntCountingStrategyTopic = 'This will Punt the Counting Strategy into the Experiment\'s Action Que'; export function experimentPuntCountingStrategy(): ActionStrategy { const stepOne = createActionNode(experimentCheckInStrategy(), { - successNode: null, - failureNode: null, keyedSelectors: [counterSelectCount] }); - const params: ActionStrategyParameters = { + return strategyPunt(experimentCountingStrategy(), createStrategy({ topic: experimentPuntCountingStrategyTopic, initialNode: stepOne, - }; - - return strategyPunt(experimentCountingStrategy(), createStrategy(params)); + })); } /*#>*/ \ No newline at end of file diff --git a/src/concepts/experiment/strategies/recursivelyIterateId.strategy.ts b/src/concepts/experiment/strategies/recursivelyIterateId.strategy.ts index 27bf9c9..ea7e550 100644 --- a/src/concepts/experiment/strategies/recursivelyIterateId.strategy.ts +++ b/src/concepts/experiment/strategies/recursivelyIterateId.strategy.ts @@ -4,21 +4,14 @@ generate a strategy that will cursively iterate the Experiment's state ID, that is limited by an incoming array of strings. $>*/ /*<#*/ -import { ActionStrategy, ActionStrategyParameters, createActionNode, createStrategy } from '../../../model/actionStrategy'; +import { ActionStrategy, createActionNode, createStrategy } from '../../../model/actionStrategy'; import { experimentRecurseIterateId } from '../qualities/recurseIncrementId.quality'; export const experimentRecursivelyIterateIdTopic = 'Recursively iterate experiment ID then add to strategy data'; export function experimentRecursivelyIterateId(controlling: string[]): ActionStrategy { - const stepOne = createActionNode(experimentRecurseIterateId({controlling}), { - successNode: null, - failureNode: null, - }); - - const params: ActionStrategyParameters = { + return createStrategy({ topic: experimentRecursivelyIterateIdTopic, - initialNode: stepOne, - }; - - return createStrategy(params); + initialNode: createActionNode(experimentRecurseIterateId({controlling})) + }); } /*#>*/ \ No newline at end of file diff --git a/src/concepts/experiment/strategies/throttleAsyncIterateIdThenAddToData.strategy.ts b/src/concepts/experiment/strategies/throttleAsyncIterateIdThenAddToData.strategy.ts index 416d09e..1b7601f 100644 --- a/src/concepts/experiment/strategies/throttleAsyncIterateIdThenAddToData.strategy.ts +++ b/src/concepts/experiment/strategies/throttleAsyncIterateIdThenAddToData.strategy.ts @@ -12,16 +12,9 @@ import { export const experimentThrottleAsyncIterateIdThenAddToDataTopic = 'Throttle Async iterate experiment ID then add to strategy data'; export function experimentThrottleAsyncIterateIdThenAddToData(setId: number): ActionStrategy { - const stepOne = createActionNode(experimentThrottleAsyncIterateIdThenReceiveInMethod({setId}), { - successNode: null, - failureNode: null, - }); - - const params: ActionStrategyParameters = { + return createStrategy({ topic: experimentThrottleAsyncIterateIdThenAddToDataTopic, - initialNode: stepOne, - }; - - return createStrategy(params); + initialNode: createActionNode(experimentThrottleAsyncIterateIdThenReceiveInMethod({setId})) + }); } /*#>*/ \ No newline at end of file diff --git a/src/concepts/experiment/strategies/throttleIterateIdThenAddToData.strategy.ts b/src/concepts/experiment/strategies/throttleIterateIdThenAddToData.strategy.ts index 08ec8b7..4c7223e 100644 --- a/src/concepts/experiment/strategies/throttleIterateIdThenAddToData.strategy.ts +++ b/src/concepts/experiment/strategies/throttleIterateIdThenAddToData.strategy.ts @@ -6,21 +6,14 @@ unify the the ID the method has received onto the strategy's state field. Then f strategy's conclusion. $>*/ /*<#*/ -import { ActionStrategy, ActionStrategyParameters, createActionNode, createStrategy } from '../../../model/actionStrategy'; +import { ActionStrategy, createActionNode, createStrategy } from '../../../model/actionStrategy'; import { experimentThrottleIterateIdThenReceiveInMethod } from '../qualities/throttleIterateIdThenReceiveInMethod.quality'; export const experimentThrottleIterateIdThenAddToDataTopic = 'Throttle iterate experiment ID then add to strategy data'; export function experimentThrottleIterateIdThenAddToData(setId: number): ActionStrategy { - const stepOne = createActionNode(experimentThrottleIterateIdThenReceiveInMethod({setId}), { - successNode: null, - failureNode: null, - }); - - const params: ActionStrategyParameters = { + return createStrategy({ topic: experimentThrottleIterateIdThenAddToDataTopic, - initialNode: stepOne, - }; - - return createStrategy(params); + initialNode: createActionNode(experimentThrottleIterateIdThenReceiveInMethod({setId})) + }); } /*#>*/ \ No newline at end of file diff --git a/src/concepts/experiment/strategies/timedMockToTrue.strategy.ts b/src/concepts/experiment/strategies/timedMockToTrue.strategy.ts index 7cc1707..a2a7511 100644 --- a/src/concepts/experiment/strategies/timedMockToTrue.strategy.ts +++ b/src/concepts/experiment/strategies/timedMockToTrue.strategy.ts @@ -10,20 +10,14 @@ import { experimentTimerEmitAction } from '../qualities/timerEmitAction.quality' export const experimentTimedMockToTrueTopic = 'This will use a async method to eventually set mock to True'; export function experimentTimedMockToTrue(): ActionStrategy { - const stepTwo = createActionNode(experimentMockToTrue(), { - successNode: null, - failureNode: null, - }); + const stepTwo = createActionNode(experimentMockToTrue()); const stepOne = createActionNode(experimentTimerEmitAction(), { successNode: stepTwo, - failureNode: null, }); - const params: ActionStrategyParameters = { + return createStrategy({ topic: experimentTimedMockToTrueTopic, initialNode: stepOne, - }; - - return createStrategy(params); + }); } /*#>*/ \ No newline at end of file diff --git a/src/concepts/experiment/strategies/timedMockToTrueWithState.strategy.ts b/src/concepts/experiment/strategies/timedMockToTrueWithState.strategy.ts index 3703fd2..bd60d0f 100644 --- a/src/concepts/experiment/strategies/timedMockToTrueWithState.strategy.ts +++ b/src/concepts/experiment/strategies/timedMockToTrueWithState.strategy.ts @@ -12,20 +12,14 @@ import { experimentTimerEmitActionWithState } from '../qualities/timerEmitAction export const experimentTimedMockToTrueWithStateTopic = 'This will use a async method to eventually set mock to True via State and append mock to strategy data.'; export function timedMockToTrueWithState(): ActionStrategy { - const stepTwo = createActionNode(experimentMockToTrue(), { - successNode: null, - failureNode: null, - }); + const stepTwo = createActionNode(experimentMockToTrue()); const stepOne = createActionNode(experimentTimerEmitActionWithState(), { successNode: stepTwo, - failureNode: null, }); - const params: ActionStrategyParameters = { + return createStrategy({ topic: experimentTimedMockToTrueWithStateTopic, initialNode: stepOne, - }; - - return createStrategy(params); + }); } /*#>*/ \ No newline at end of file diff --git a/src/concepts/ownership/strategies/setOwnerShipMode.strategy.ts b/src/concepts/ownership/strategies/setOwnerShipMode.strategy.ts index b7305bd..d4805af 100644 --- a/src/concepts/ownership/strategies/setOwnerShipMode.strategy.ts +++ b/src/concepts/ownership/strategies/setOwnerShipMode.strategy.ts @@ -24,11 +24,9 @@ export function ownershipSetOwnershipModeStrategy(concepts: Concepts, modeName: const stepThree = createActionNode(ownershipInitializeOwnership(), { semaphore: initializeOwnershipSemaphore, - successNode: null, successNotes: { preposition: 'Set', }, - failureNode: null, }); const stepTwo = createActionNode(axiumSetDefaultModeIndex({ index: ownershipModeIndex @@ -37,7 +35,6 @@ export function ownershipSetOwnershipModeStrategy(concepts: Concepts, modeName: successNotes: { preposition: 'Then' }, - failureNode: null }); const stepOne = createActionNode(axiumSetMode({ modeIndex: ownershipModeIndex, modeName }), { semaphore: setModeSemaphore, @@ -45,13 +42,11 @@ export function ownershipSetOwnershipModeStrategy(concepts: Concepts, modeName: successNotes: { preposition: 'Successfully' }, - failureNode: null, }); - const params: ActionStrategyParameters = { + + return createStrategy({ topic: ownershipSetOwnerShipModeTopic, initialNode: stepOne, - }; - - return createStrategy(params); + }); } /*#>*/ \ No newline at end of file diff --git a/src/model/actionStrategy.ts b/src/model/actionStrategy.ts index 4bc1484..6bfdad5 100644 --- a/src/model/actionStrategy.ts +++ b/src/model/actionStrategy.ts @@ -68,9 +68,9 @@ export interface ActionNodeOptions { agreement?: number; decisionNodes?: Record; decisionNotes?: ActionNotes; - successNode: ActionNode | null; + successNode?: ActionNode | null; successNotes?: ActionNotes; - failureNode: ActionNode | null; + failureNode?: ActionNode | null; failureNotes?: ActionNotes; lastActionNode?: ActionNode; } @@ -91,20 +91,28 @@ export type ActionStrategyCreator = (...arg0: unknown[]) => ActionStrategy; * @param options successNode and failureNodes are always required. If using decisionNodes, set both to null. * @returns ActionNode */ -export function createActionNode(action: Action, options: ActionNodeOptions): ActionNode { +export function createActionNode(action: Action, options?: ActionNodeOptions): ActionNode { + if (options) { + return { + actionType: action.type, + payload: action.payload, + keyedSelectors: action.keyedSelectors ? action.keyedSelectors : options.keyedSelectors, + agreement: action.agreement ? action.agreement : options.agreement, + semaphore: action.semaphore ? action.semaphore : options.semaphore, + successNode: options.successNode ? options.successNode : null, + successNotes: options.successNotes, + failureNode: options.failureNode ? options.failureNode : null, + failureNotes: options.failureNotes, + decisionNodes: options.decisionNodes, + decisionNotes: options.decisionNotes, + lastActionNode: options.lastActionNode + }; + } return { actionType: action.type, payload: action.payload, - keyedSelectors: action.keyedSelectors ? action.keyedSelectors : options.keyedSelectors, - agreement: action.agreement ? action.agreement : options.agreement, - semaphore: action.semaphore ? action.semaphore : options.semaphore, - successNode: options.successNode, - successNotes: options.successNotes, - failureNode: options.failureNode, - failureNotes: options.failureNotes, - decisionNodes: options.decisionNodes, - decisionNotes: options.decisionNotes, - lastActionNode: options.lastActionNode + successNode: null, + failureNode: null }; }