Talk:Wireworld: Difference between revisions

(→‎Common Lisp Formatting: Could have done with some separation between each frame?)
Line 19:
 
Many years ago, I built an implementation of this task in [[Pascal]] (specifically Turbo Pascal) that used a number of tricks to go much faster. The source to that code is now long lost, but IIRC it used a ring-buffer of cell coordinates so that scans through the set of cells only needed to handle those cells with potential to change. This meant that the code could rapidly (15-20fps) process problems up to about the 300k cell mark (i.e., 640x480) which was a size capable of performing interesting calculations. Not bad for a 16MHz 386SX computer with less than 640kB available memory. :-) I do ''not'' remember all the details, but I presume that someone will be able to use this sort of hint/memory to come up with something equally amazing. —[[User:Dkf|Donal Fellows]] 19:45, 10 September 2009 (UTC)
 
: Well, for a start You only ever need to keep track of the positions of electron heads and tails. You can implement the whole thing quite efficiently with just two lists, swapping their purpose every time. Mark all electron tails as wire and empty the list. Scan around the electron heads for wire to change it to electron head, note each position you do this in in the first list and change the original electron head to tail. Then swap the two lists. Iirc a WW simulator implemented in C I've seen worked like this. —[[User:Hypftier|Johannes Rössel]] 21:10, 14 July 2010 (UTC)
 
== Common Lisp Formatting ==
Anonymous user