We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.
User:Aadenboy/QuineInvoking(x, y)
QuineInvoking(x, y) is a function which returns y if x is returned, and returns y if and only if y does not invoke a different result. For the purposes of this, strings which do not invoke another string are said to invoke null, or nothing.
A traditional quine would be QI(x, x), and a quine-avoiding language is QI(x, y) QI(y, x). Further cycles use a chain of quine invocations, such as QI(x, y) QI(y, z) QI(z, x) for a period-3 cycle, so we shall define QuineCycling(x, y, z, ...) as a shorthand for such an expression, excluding the last term.
QI languages can be reframed in terms of a directed graph, where each recognized string is a node and invocations are directed connections between each node. By means of concatenation, user input can control how such a graph is traversed, which will be marked as ConcatenativeQuine(x). Since an initial node is also beneficial, we can add DefaultQuine(x).
An example of a truth machine would be as such:
DefaultQuine("start")
ConcatenativeQuine("start")
QuineInvoking("start0", "0")
QuineInvoking("0", null)
QuineInvoking("start1", "1")
QuineInvoking("1", "1")