leniax.lenia package
- class leniax.lenia.LeniaIndividual(config, rng_key, params=[])[source]
A Lenia individual used by QD algorithms
Note
The philosophy of the lib is to have parameters sampled from the same domain And then scaled by custom functions before being used in the evaluation function To sum up:
All parameters are generated in the sampling_domain
the dimension parameter is the number of parameter
- in the eval function:
You scale those parameters
You create the configuration from those parameters
You evaluate the configuration
you set fitness and features
- Parameters
config (Dict) –
rng_key (jax._src.prng.PRNGKeyArray) –
params (List) –
- fitness
QD fitness value
- Type
float
- features
List of QD behaviour values
- Type
List[float]
- qd_config
QD configuration
- Type
Dict
- rng_key
JAX PRNG key
- Type
jax._src.prng.PRNGKeyArray
- params
A list of parameters to be updated by QD
- Type
List
- leniax.lenia.get_update_config(genotype, raw_values)[source]
Update the QD configuration using raw_values
- Parameters
genotype (Dict) – A dictionnary of genotype value to be updated
raw_values (List) – Raw values for the update
- Returns
A dictionnary mapping keys with updated values
- Return type
Dict