neat / neat\base_ne.py
eyad-silx's picture
Upload neat\base_ne.py with huggingface_hub
05e7a95 verified
raw
history blame
437 Bytes
import jax.numpy as jnp
class NEAlgorithm:
"""Base class for neuroevolution algorithms"""
def __init__(self):
self.gen = 0
self.pop = []
def ask(self) -> jnp.ndarray:
"""Return current population parameters"""
raise NotImplementedError
def tell(self, fitness_array: jnp.ndarray) -> None:
"""Update population based on fitness values"""
raise NotImplementedError