Need to be able to compute “rabbits” without going over 900,000 squares in the cache. Some options:
Roll your own weak references. They act like squares, but don’t remember results
Cache results but not squares, you can GC a bunch of results, which would discard a bunch of squares not currently ‘pinned’ by the current computation.
Figure out a ‘pinned’ vs. ‘unpinned’ flag for the cache, such that the current square is always pinned, and so are the initial rules, but other squares can be discarded. Critical to be able to force that any pinned square also pins its components, but nothing else is pinned. This allows for temporary results to be subject to GC.
Need to be able to compute “rabbits” without going over 900,000 squares in the cache. Some options: