How sparkdroidwastaken/cartpole-tda works
This repository is a CartPole reinforcement-learning comparison: JavaScript implements regular and symmetry-informed DQN agents, while Python analyzes run performance and policy topology. The documented workflow trains agents in the CartPole environment, uses a custom neural network, then evaluates rewards and applies persistent-homology analysis to state/action batches. The simulation HTML is present in the tree but was not excerpted, so its internal control flow and data wiring cannot be verified; the analysis scripts were only partially excerpted.
Main entry points: Cartpole geo.html CartPole environment · TDA Analysis.py State/action batches · NeuralNetwork.js Neural network · Analysis.py Performance statistics
Components 11
CartPole simulation
- CartPole environment
Simulation/Cartpole geo.html - DQN agents
Simulation/Cartpole geo.html - Mirror augmentation
Simulation/Cartpole geo.html - Neural network
Simulation/NeuralNetwork.js - Canvas visualization
Simulation/Cartpole geo.html
Results analysis
- Performance statistics
Analysis/Analysis.py
Topology analysis
- State/action batches
Analysis/TDA Analysis.py - Persistent homology
Analysis/TDA Analysis.py - Topology comparisons
Analysis/TDA Analysis.py
Other components
- Researcher
- Run data
Connections 10
- Researcher → CartPole environment: runs experiment
README.md - DQN agents → CartPole environment: acts in
README.md - DQN agents → Neural network: uses network
README.md - Mirror augmentation → DQN agents: augments learning
README.md - CartPole environment → Canvas visualization: visualizes on canvas
README.md - CartPole environment → Run data: produces runs
README.md - Run data → Performance statistics: analyzes rewards
README.md - Run data → State/action batches: provides batches
Analysis/TDA Analysis.py - State/action batches → Persistent homology: computes signatures
Analysis/TDA Analysis.py - Persistent homology → Topology comparisons: compares diagrams
Analysis/TDA Analysis.py