How sri200723/gridmind works
RL Grid World Studio is an interactive learning lab: users configure a grid and reward model, train or evaluate Q-Learning, SARSA, or a planning baseline, then inspect policies, compare runs, and analyze or save results. The app shell coordinates these workflows; the training engine owns episode execution and uses agent, environment, and seeded-randomness logic. Separate workspaces cover environment editing, learning guidance, analytics, comparisons, experiment export, and persistent agent memory. Edges reflect the README and shown imports/calls; unsampled implementation details are not inferred.
Main entry points: App.tsx Studio shell · training.ts Training and evaluation · EnvironmentStudioView.tsx Environment studio · agents.ts Agents and planner
Components 19
Studio interface
- Studio shell
src/App.tsx - Grid canvas
src/components/GridCanvas.tsx - UI states
src/components/UIStates.tsx
Learning engine
- RL data types
src/types/rl.ts - Grid environment
src/engine/environment.ts - Agents and planner
src/engine/agents.ts - Training and evaluation
src/engine/training.ts - Seeded randomness
src/engine/prng.ts - Learning analytics
src/engine/analytics.ts
Learning workspaces
- Environment studio
src/components/EnvironmentStudioView.tsx - Policy and Q-table
src/components/PolicyQTableView.tsx - Comparison lab
src/components/ComparisonLabView.tsx - Analytics view
src/components/AnalyticsView.tsx - Learning guide
src/components/LearningGuideView.tsx - Experiments and tests
src/components/ExperimentsAndTestsView.tsx - Brain memory view
src/components/BrainMemoryView.tsx
Results and memory
- Experiment utilities
src/engine/experiments.ts - Brain persistence
src/engine/brainPersistence.ts
Other components
- Learner
Connections 29
- Learner → Studio shell: uses
README.md - Studio shell → Environment studio: opens
README.md - Studio shell → Training and evaluation: runs
README.md - Studio shell → Comparison lab: coordinates
README.md - Studio shell → Analytics view: shows
README.md - Studio shell → Policy and Q-table: shows
README.md - Studio shell → Experiments and tests: shows
README.md - Studio shell → Learning guide: shows
README.md - Studio shell → Brain memory view: shows
src/App.tsx - Environment studio → Grid environment: validates
src/components/EnvironmentStudioView.tsx - Environment studio → Agents and planner: previews plan
src/components/EnvironmentStudioView.tsx - Environment studio → Grid canvas: edits via
README.md - Training and evaluation → Agents and planner: selects actions
src/engine/training.ts - Training and evaluation → Grid environment: steps through
src/engine/training.ts - Training and evaluation → Seeded randomness: seeds runs
src/engine/training.ts - Agents and planner → Grid environment: simulates routes
src/engine/agents.ts - Agents and planner → Seeded randomness: breaks ties
README.md - Analytics view → Learning analytics: derives metrics
src/components/AnalyticsView.tsx - Comparison lab → Learning analytics: analyzes results
src/components/ComparisonLabView.tsx - Comparison lab → Grid canvas: visualizes runs
src/components/ComparisonLabView.tsx - Policy and Q-table → Grid canvas: renders policy
src/components/PolicyQTableView.tsx - Experiments and tests → Experiment utilities: exports results
src/components/ExperimentsAndTestsView.tsx - Studio shell → Experiment utilities: persists registry
src/App.tsx - Studio shell → Brain persistence: saves brains
src/App.tsx - Brain memory view → Brain persistence: manages memory
README.md - Brain persistence → RL data types: stores states
src/engine/brainPersistence.ts - Grid environment → RL data types: uses definitions
src/engine/environment.ts - Training and evaluation → RL data types: produces records
src/engine/training.ts - Learning analytics → RL data types: reads episodes
src/engine/analytics.ts