Skip to content

Commit 87f0e6d

Browse files
committed
Improve Lenia kernel
1 parent e3d91c0 commit 87f0e6d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/cax/cs/lenia/kernel.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ def polynomial_kernel_core(radius, alpha=4):
6363

6464
def rectangular_kernel_core(radius):
6565
"""Rectangular kernel core."""
66-
return jnp.where((radius >= 1 / 4) & (radius <= 3 / 4), 1, 0)
66+
return jnp.where((radius >= 1 / 4) & (radius <= 3 / 4), 1.0, 0.0)
6767

6868

69-
def gaussian_kernel_core(radius):
69+
def gaussian_kernel_core(radius, std=0.15):
7070
"""Gaussian kernel core."""
71-
return bell(radius, 0.5, 0.15)
71+
return bell(radius, 0.5, std)
7272

7373

7474
# Kernel shells

0 commit comments

Comments
 (0)