Jido.Evolve.Examples.Utils (Jido Evolve v1.0.0)

Copy Markdown View Source

Shared utilities for Jido.Evolve examples.

Summary

Functions

Format a fitness value for display.

Print a demo header with key-value pairs.

Generate a random binary vector of length n.

Generate a random permutation of integers 0..n-1.

Determine if logging should occur for this generation.

Functions

format_fitness(fitness)

Format a fitness value for display.

random_binary(n)

Generate a random binary vector of length n.

random_permutation(n)

Generate a random permutation of integers 0..n-1.

should_log?(generation, print_every \\ 10)

Determine if logging should occur for this generation.