leniax.growth_functions package

Leniax growth functions

leniax.growth_functions.poly_quad4(params, X)[source]

Quadratic polynomial growth function

\[y = 2 * \max{ \left[ 1 - \left(\frac{X - m}{3s}\right)^2, 0 \right] }^4 - 1\]

(Source code, png, hires.png, pdf)

_images/leniax-growth_functions-1.png
Parameters
  • params (jax._src.numpy.ndarray.ndarray) – parameters of the growth function

  • X (jax._src.numpy.ndarray.ndarray) – potential

Returns

A field

leniax.growth_functions.gaussian(params, X)[source]

Gaussian growth function

\[y = 2 * e^{-\frac{1}{2} \left(\frac{X - m}{s}\right)^2} - 1\]

(Source code, png, hires.png, pdf)

_images/leniax-growth_functions-2.png
Parameters
  • params (jax._src.numpy.ndarray.ndarray) – parameters of the growth function

  • X (jax._src.numpy.ndarray.ndarray) – potential

Returns

A field

leniax.growth_functions.gaussian_target(params, X)[source]

Gaussian growth function for aymptotic Lenia

\[y = e^{-\frac{1}{2} \left(\frac{X - m}{s}\right)^2}\]

(Source code, png, hires.png, pdf)

_images/leniax-growth_functions-3.png
Parameters
  • params (jax._src.numpy.ndarray.ndarray) – parameters of the growth function

  • X (jax._src.numpy.ndarray.ndarray) – potential

Returns

A field

leniax.growth_functions.step(params, X)[source]

Step growth function

\[\begin{split}y = \begin{cases} 1 ,& \text{if } |X - m| \leq s\\ -1,& \text{otherwise} \end{cases}\end{split}\]

(Source code, png, hires.png, pdf)

_images/leniax-growth_functions-4.png
Parameters
  • params (jax._src.numpy.ndarray.ndarray) – parameters of the growth function

  • X (jax._src.numpy.ndarray.ndarray) – potential

Returns

A field

leniax.growth_functions.staircase(params, X)[source]

Staircase function

\[\begin{split}y = \begin{cases} 0.5 ,& \text{if } X \geq m - s \text{ and } X < m - \frac{s}{2}\\ 1 ,& \text{if } X \geq m - \frac{s}{2} \text{ and } X \leq m + \frac{s}{2}\\ 0.5 ,& \text{if } X > m + \frac{s}{2} \text{ and } X \leq m + s\\ 0 ,& \text{otherwise} \end{cases}\end{split}\]

(Source code, png, hires.png, pdf)

_images/leniax-growth_functions-5.png
Parameters
  • params (jax._src.numpy.ndarray.ndarray) – Kernel function parameters

  • X (jax._src.numpy.ndarray.ndarray) – Raw kernel

leniax.growth_functions.triangle(params, X)[source]

Gauss function

\[\begin{split}y = \begin{cases} \frac{X - (m - s)}{m - (m - s)} ,& \text{if } X \geq m - s \text{ and } X < m\\ \frac{X - (m + s)}{m - (m + s)} ,& \text{if } X \geq m \text{ and } X \leq m + s\\ 0 ,& \text{otherwise} \end{cases}\end{split}\]

(Source code, png, hires.png, pdf)

_images/leniax-growth_functions-6.png
Parameters
  • params (jax._src.numpy.ndarray.ndarray) – Kernel function parameters

  • X (jax._src.numpy.ndarray.ndarray) – Raw kernel