last changes

This commit is contained in:
2026-02-21 10:58:05 +01:00
parent 841bc7c805
commit 0902732f60
136 changed files with 10387 additions and 2015 deletions

View File

@@ -1,3 +1,18 @@
"""
Replay utility for visualizing the best evolved CarRacing agent.
This module loads the best-performing agent from a given population stored
in Neo4j, reconstructs its policy from a genotype snapshot, and replays the
agent in a human-rendered CarRacing environment using pygame.
High-level workflow:
1. Query Neo4j for the agent with the highest recorded fitness in a population.
2. Load the agents genotype snapshot.
3. Build an executable policy from the snapshot.
4. Run the policy in the CarRacing environment, step by step.
5. Render the environment in real time and automatically handle episode resets.
"""
import numpy as np
import pygame