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

View File

@@ -0,0 +1,36 @@
import asyncio
from dotenv import load_dotenv
from mathema.core.population_monitor import init_population
from mathema.utils.logging_config import setup_logging
setup_logging()
import logging
log = logging.getLogger(__name__)
async def run_car_test(
pop_id: str = "car_pop",
gens: int = 200
):
monitor = await init_population((
pop_id,
[{"morphology": "car_racing_features", "neural_afs": ["tanh"]}],
"gt",
"competition"
))
for _ in range(gens):
await monitor.gen_ended.wait()
s = monitor.state
best = await monitor._best_fitness_in_population(s.population_id)
log.info(f"[car] gen={s.pop_gen} best_fitness={best:.6f} eval_acc={s.eval_acc}")
await monitor.stop("normal")
if __name__ == "__main__":
asyncio.run(run_car_test())