D3.js visualization of a lambda calculus
chorasimilarity.github.io
chorasimilarity.github.io
The closest thing I can think about are L-systems, but I couldn't understand even Fibonacci numbers (http://chorasimilarity.github.io/chemlambda-gui/dynamic/fibo...).
For shinier stuff, see the demoscene eg https://www.youtube.com/user/Annikras . Demoscene programmers love generative systems, especially when targetting the 4 kilobyte executable category. For example this one, which looks like a distorted Menger sponge: https://www.youtube.com/watch?v=E3qn1RsJlUM
Sauerbraten in JS, called Bananabread¹, and jor1k an OpenRISC emulator running Linux². Although the latter uses a relay for networking.
1: https://developer.cdn.mozilla.net/media/uploads/demos/a/z/az...
here are demonstrations of the graph rewrite rules:
http://chorasimilarity.github.io/chemlambda-gui/dynamic/move...
the front page is a better start: http://chorasimilarity.github.io/chemlambda-gui/index.html
as is the FAQ: https://chorasimilarity.wordpress.com/2015/02/19/what-can-i-...
i propose a new practice of putting (DJS) at the end of a link which might cause problem, like we do now with PDF file links. D stands for dangerous or danger or something. half joking here.
var step = -1;
function nextval() {
step++;
return 3000 + (20*step);
}
setTimeout(function() {
graph.removeLink("31", "31_1");
keepNodesOnTop();
}, nextval());
There are 9687 setTimeout on that page.:(
The 'lambda' being referenced is the 'graphical lambda calculus' which is Marius's own invention of a family of graphs and graph rewrite rules that can act as a notation for the untyped lambda calculus. Chemlambda is a chemically themed specialisation of his graphical lambda calculus used as an artificial chemistry.
Artificial chemistries, in turn, are used to understand properties of chemical systems in the abstract, without the fiendish difficulties and complexities of actual chemical soups. Much as artificial evolution can be used to understand the dynamics of evolution without the long-time scales and messiness of actual organisms. Stuart Kauffman used the same technique in the 70s, shuffling punch card programs to show the presence of attractors in networks of chemical interactions. This sheds light on behavior such as 'autocatalytic sets': sets of chemicals that can catalyse their own production, which is a necessary condition of life.
For artificial chemistries, it isn't always essential to say what each element 'corresponds to' in real world chemistry. Hence some of the ambiguity between whether the nodes in the graph represent atoms, molecules, or in some cases bonds.
Marius's artificial chemistry is turing complete in an interesting way: it stores information in topology as well as linear sequences of discrete elements (though it isn't the only 'graph computation' approach). This makes it a good analog for biochemistry, which is also structural as well as linear. He is using this system to look at models of decentralised chemical computation.
As for many scientists who create a formalism, he is also evangelising it as a useful tool for others to work with in looking at chemical computation in the abstract. Take up is small so far, with only one other cited researcher to date.
The animations are very stylised, they illustrate simple underlying processes with a lots of visual action. The actual 'moves' are very discrete: they happen at regular intervals and rewrite parts of the graph in one go. When nodes in the graph are removed by a move, they float around in the animation for a while then disappear. Similarly when new nodes are about to be rewritten into the graph they appear and float around in the animation a little before they'll be incorporated. When a move takes place the graph is simply connected to new nodes, wherever they are on the canvas, and D3 is used to then relax the graph. Hence the violent pulsing of the simulation as moves take place.
Hope that helps. It's not my area of research interest (though I worked with Prof S. Kauffman in the late 90s), so feel free to correct my understanding if I'm off.
(An addition to sago's comment is that the rewrites are done randomly; there is a cycle in the algorithm where rewrite patterns are identified, then coins are flipped and as a result some of them are done. The chemical analogy is that there are invisible "enzymes" which do the rewrites, and they roam around randomly. Alternatively one can make another version of the algorithm, for example one where these enzymes are produced and they choose randomly their preferred patterns. This is a way to erase the visual impression that there are global steps in time when the graph is updated.)
Graphic lambda calculus is the ancestor of chemlambda. Actually both formalisms don't have a lot in common with lambda calculus, in the sense that there is an algorithm to produce a graph from a term in untyped lambda beta calculus, such that the lambda calculus rewrites correspond to moves in these graphical formalism. But chemlambda works with a family of graphs which is much larger than the ones which represent lambda terms.
However, you can see in the demos page some classical computation problems: Ackermann function, factorial, predecessor. There are also some demos which can't be qualified as related to lambda calculus.
Chemlambda resembles most with the ALCHEMY of Fontana and Buss, which is also based on lambda calculus, with the main difference being that in ALCHEMY application is a chemical reaction and abstraction is a reactive site (very sketchy description), while in chemlambda the application and abstraction are, on equal footing, just nodes in a graph.
It's a nice concept