last changes
This commit is contained in:
@@ -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 agent’s 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user