29 November 2006

From Organic Design wiki
Nodal reduction algorithm updated

A difficult bug was encountered while working on the recursive rectangles milestone in which the focus of a node never receives any quanta if the node also has code. But there's no need for nodal reduction to allow a nodes executable code to "hide" the reducable structure within, so the algorithm has been changed to make reduction within unconditional.

A further efficiency is that if the recursive call to nodeReduce is unconditional, then there's no point even making it recursive because the this variable is global and when control returns to the top scope from the reduction function, the very next instruction calls reduction again. This can work because if there's no further reducable structure within, this will be set to 0 (root) again. Below is the current version of the algorithm.


[[+NR.c|]]