PyBHV icon indicating copy to clipboard operation
PyBHV copied to clipboard

Gif export

Open ethol opened this issue 2 years ago • 2 comments

Using pillow to export gol to gif

ethol avatar Sep 25 '23 15:09 ethol

Played with Pillow and made it work for me, there is this odd thing happening with the output where the gliders im not sure it’s a problem with how things are displayed, or something internal in BHV. Feel free to check it out.

ethol avatar Sep 25 '23 15:09 ethol

Hi! This has raised a few warts. While this works for some implementations, it doesn't for others for some very nasty reasons: there are three different orders going on, resulting in the weird patterns: Order of bits of byte, order of byte of word, and order of words. In one implementation, all three align, and dumping the hypervector to a file format works. In the other implementations, you'd need to reverse some of the words.

Since this only matters for visualization purposes (i.e., all implementations are self-consistent), I haven't pushed my changes (that built on this PR). I don't want to sacrifice performance (e.g., using a non-native byte order) for this purity.

While I'm enthusiastic about the CA use case, fast GIFs are in direct opposition to a fast implementation. Therefore, I'll try and write a fast and correct "bits/bitstring" function, that converts to the "logical" representation (move bits in the directions of the roll), which will have to be specialized for each implementation.

Adam-Vandervorst avatar Nov 08 '23 12:11 Adam-Vandervorst