last workig state.

This commit is contained in:
2025-12-13 14:12:35 +01:00
parent 1761de8acb
commit 841bc7c805
227 changed files with 694550 additions and 251 deletions

34
mathema/xor_main.py Normal file
View File

@@ -0,0 +1,34 @@
import asyncio
from dotenv import load_dotenv
from mathema.core.population_monitor import init_population, continue_
from mathema.utils.logging_config import setup_logging
setup_logging()
import logging
log = logging.getLogger(__name__)
async def run_xor_test(
pop_id: str = "xor_pop",
gens: int = 1000,
):
monitor = await init_population((
pop_id,
[{"morphology": "xor_mimic", "neural_afs": ["tanh"]}],
"gt",
"competition",
))
for _ in range(gens):
await monitor.gen_ended.wait()
s = monitor.state
await monitor._best_fitness_in_population(s.population_id)
await monitor.stop("normal")
if __name__ == "__main__":
asyncio.run(run_xor_test())