<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:#333333">comonadic-style: WAS: stygmergy, CA's, and [biological] development<br><br>Comonads, like trees or stacks, are data structures which guide a computation<br>along a chosen line and imply a mode of reasoning. That they first arose in the<br>context of category theory should not make them lesser citizens.<br><br>What the comonad captures is the essence of locality[◊], like it's dual captures<br>the essence of encapsulation. The comonadic cellular automata, assigns to each<br>cell a world with that cell at its center (subjectivity?). That this assignment<br>can be done *naturally* (via the natural lifting δ: W -> W²) and progressed (via<br>the composition W_β ○ δ) means that one can handle many of the implementation<br>details in the coalgebra, which a language's compiler can be tuned to exploit.<br>Two points of exploitation that come immediately to mind being:<br><br>1. parallelization (especially wrt adaptive chunking)<br>2. algebrao-functional reduction (I'm not sure what to technically call this)<br><br>Beyond this, I rather like not having to build in the topological constraints<br>in the low level details. Instead, as in my implementation[!], one can allow<br>computation over doubly unbounded lists and lists of lists while only making<br>the judicious choice of board size and it's accompanying details later. In<br>practice, I like this style of implementation because it generalizes nicely<br>while remaining structured (maintainability) and suggests a clearer perspective<br>from which to understand cellular automata, that of a naturally localized<br>computation.<br><br>The reason I mention this is that the comonadic-style walls-off each cell, in a<br>sense, much like David Lewis' counterparts. To write a shuffle in this style is<br>easy, but I suspect that to purely write a sort this way is impossible. I would<br>love to know whether this is, in fact, true.<br><br>[□] Yes, I know that his theory is less popular than Kripke's, but hey.<br><a href="https://en.wikipedia.org/wiki/Counterpart_theory">https://en.wikipedia.org/wiki/Counterpart_theory</a><br><br>[◊] Arguably, this "essence of locality" is an expression of *possible worlds*,<br>via the adjunction: X -> □Y iff X -> Y, or ◊ ⊣ □. More on this can be read here:<br><a href="https://ncatlab.org/nlab/show/necessity+and+possibility#:~:text=3.-,Possible%20worlds%20via%20first-order%20logic%20and%20type%20theory,-One%20common%20philosophical">https://ncatlab.org/nlab/show/necessity+and+possibility#:~:text=3.-,Possible%20worlds%20via%20first-order%20logic%20and%20type%20theory,-One%20common%20philosophical</a><br><br>[!] But the original idea here isn't mine, I followed up on ideas written here:<br><a href="http://blog.sigfpe.com/2006/12/evaluating-cellular-automata-is.html">http://blog.sigfpe.com/2006/12/evaluating-cellular-automata-is.html</a><br></div></div>