change a lot

This commit is contained in:
wls2002
2023-07-17 17:39:12 +08:00
parent a0a1ef6c58
commit f4763ebcea
21 changed files with 1060 additions and 4 deletions

16
examples/xor_test.py Normal file
View File

@@ -0,0 +1,16 @@
import jax
from algorithm.config import Configer
from algorithm.neat import NEAT
from algorithm.neat.genome import create_mutate
if __name__ == '__main__':
config = Configer.load_config()
neat = NEAT(config)
randkey = jax.random.PRNGKey(42)
state = neat.setup(randkey)
mutate_func = jax.jit(create_mutate(config, neat.gene_type))
state = mutate_func(state)
print(state)