Lifelib

For general discussion about Conway's Game of Life.
User avatar
pzq_alex
Posts: 793
Joined: May 1st, 2021, 9:00 pm
Location: tell me if you know

Re: Lifelib

Post by pzq_alex » October 15th, 2022, 1:55 am

yoleo wrote:
October 14th, 2022, 9:54 pm
Compiling on a Linux-based cloud machine with clang++-11, this works just fine. But if I try the same code on my MacBook Air, I get a boatload of errors. Seems like it's related to compiler versions...is there anyone who has gotten C++ Lifelib working on a Mac? If so, what compiler did you use?
What errors specifically?
\sum_{n=1}^\infty H_n/n^2 = \zeta(3)

How much of current CA technology can I redevelop "on a desert island"?

yoleo
Posts: 127
Joined: October 26th, 2021, 11:48 pm

Re: Lifelib

Post by yoleo » October 15th, 2022, 10:43 pm

I edited my original post to add an attachment, the output upon running

Code: Select all

gcc lifelib_test.cpp

User avatar
pzq_alex
Posts: 793
Joined: May 1st, 2021, 9:00 pm
Location: tell me if you know

Re: Lifelib

Post by pzq_alex » October 16th, 2022, 1:08 am

yoleo wrote:
October 15th, 2022, 10:43 pm
I edited my original post to add an attachment, the output upon running

Code: Select all

gcc lifelib_test.cpp
Try passing -std=c++2a to the compiler?
\sum_{n=1}^\infty H_n/n^2 = \zeta(3)

How much of current CA technology can I redevelop "on a desert island"?

yoleo
Posts: 127
Joined: October 26th, 2021, 11:48 pm

Re: Lifelib

Post by yoleo » October 16th, 2022, 12:10 pm

Thank you!! That fixes it.

Another question: reading the source code for lifelib, what's the use case for handles and ihandles? The hypertree.h says "maps symbol to a node in the hypertree," but there's nothing in the code that explicitly creates any ihandles or handles.

Edit: never mind, figured it out. They're used, it's just obscured by a few layers of function calls in pattern2.h. The data of a pattern is stored in a hypernode, so creating or modifying a pattern turns into calls to the gethandle/sethandle/newihandle functions. It's just mostly done via calling the basepattern constructor or changehnode, which then manipulates the handles.

edit: I decided to type up some of my notes on the code and post them, in case anyone else finds them useful. They're incomplete, not necessarily accurate, etc. just some notes about what's-what. (I find templates really confusing and hard to parse.) Points of confusion are marked with (???)
Attachments
lifelib_notes.txt
(5.03 KiB) Downloaded 28 times
Last edited by yoleo on October 26th, 2022, 12:15 am, edited 2 times in total.

User avatar
calcyman
Moderator
Posts: 2936
Joined: June 1st, 2009, 4:32 pm

Re: Lifelib

Post by calcyman » October 16th, 2022, 4:01 pm

yoleo wrote:
October 16th, 2022, 12:10 pm
Thank you!! That fixes it.

Another question: reading the source code for lifelib, what's the use case for handles and ihandles? The hypertree.h says "maps symbol to a node in the hypertree," but there's nothing in the code that explicitly creates any ihandles or handles.
To further clarify, the purpose is so that the hypertree knows which nodes are being used elsewhere in the program. This is necessary because otherwise it wouldn't know which nodes can be cleared during hashlife's garbage-collection phase. The string handles aren't used anywhere; they were originally planned for a 'VLSI editor' built on top of lifelib where you can define increasingly complex components in terms of simpler components and assign human-readable names to them. I later added the integer handles (ihandles) and abstracted them away into the pattern class, so they're an implementation detail.
What do you do with ill crystallographers? Take them to the mono-clinic!

User avatar
snowman
Posts: 82
Joined: March 4th, 2023, 3:27 am

Re: Lifelib

Post by snowman » July 6th, 2023, 11:41 am

Is there yet a way to delete pattern objects in python-lifelib? I find my programs take up a lot of RAM, seemingly full of patterns that I only need to access once.

User avatar
snowman
Posts: 82
Joined: March 4th, 2023, 3:27 am

Re: Lifelib

Post by snowman » September 9th, 2023, 6:33 am

Is it possible to have python-lifelib take advantage of GPU processing? My friend wanted to help me run a search program using CUDA, but it appears there's only a dedicated branch on regular lifelib.

Post Reply