# aknn/prac architecture

> Architecture diagram of the GitHub repository aknn/prac, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aknn/prac
- Repository: https://github.com/aknn/prac

## Overview

##### Main Component Organization

a) Network Analysis Module
- Components for Steiner Tree algorithms
- Connected Components analysis algorithms

b) Reinforcement Learning (RL) Module
- SGD vs Lookup implementation
- Game-based RL implementations (Tic-tac-toe, Chess)

c) Time Series Analysis Module
- AR and MA Models subsystem
- Autocorrelation and Cross-correlation subsystem

**Top Level:**
**[Project Root]**

- [Network Analysis]
- [RL]
- [Time Series]

##### Detailed Component Representation

For each major module, create detailed subcomponents:

Time Series Module (Most Complex):
- Relationship between AR/MA models and their dependencies
- Flow from basic components (gaussian_white.py) to more complex analyses
- Connections to supporting documentation (NOTES.md)

##### Key Relationships to Highlight

a) Time Series Analysis:
- Progression from basic concepts (gaussian_white.py) to advanced models
- Related components (AR models → MA models)
- Link documentation to implementation

b) RL Components:
- Relationship between different game implementations
- Learning algorithms (SGD vs Lookup) to their applications

c) Network Analysis:
- Relationship between graph theory components

##### Implementation Details

Technical aspects:
- Python implementation indicators
- File relationships
- Documentation connections
- Data flow directions

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Project
        Root["Project Root"]:::root
        click Root "https://github.com/aknn/prac/blob/master/README.md"

        subgraph NA["Network Analysis"]
            ST["Steiner Tree"]:::implementation
            click ST "https://github.com/aknn/prac/blob/master/Network Analysis/Steiner_tree.py"
            CC["Connected Components"]:::implementation
            click CC "https://github.com/aknn/prac/blob/master/Network Analysis/connected_components_count.py"
        end

        subgraph RL["Reinforcement Learning"]
            SL["SGD vs Lookup"]:::implementation
            click SL "https://github.com/aknn/prac/blob/master/RL/SGDvsLookup.py"
            TTT["Tic-tac-toe"]:::implementation
            click TTT "https://github.com/aknn/prac/blob/master/RL/Tic_tac_toe_RL.py"
            Chess["Chess"]:::implementation
            click Chess "https://github.com/aknn/prac/blob/master/RL/chess_RL.py"
        end

        subgraph TS["Time Series Analysis"]
            click TS "https://github.com/aknn/prac/blob/master/Time Series/README.md"

            subgraph ARMA["AR and MA Models"]
                AR["AR Model"]:::implementation
                click AR "https://github.com/aknn/prac/blob/master/Time Series/AR and MA/ar1_model.py"
                MA["MA Model"]:::implementation
                click MA "https://github.com/aknn/prac/blob/master/Time Series/AR and MA/ma1_model.py"
                ACF["ACF Example"]:::implementation
                click ACF "https://github.com/aknn/prac/blob/master/Time Series/AR and MA/eg_ACF.py"
                ARMANotes["ARMA Notes"]:::documentation
                click ARMANotes "https://github.com/aknn/prac/blob/master/Time Series/AR and MA/NOTES.md"
            end

            subgraph ACC["Autocorrelation & Cross-correlation"]
                GW["Gaussian White"]:::implementation
                click GW "https://github.com/aknn/prac/blob/master/Time Series/Autocorrelation and Crosscorrelation/gaussian_white.py"
                RW["Random Walk"]:::implementation
                click RW "https://github.com/aknn/prac/blob/master/Time Series/Autocorrelation and Crosscorrelation/Random_walk.py"
                Diff["Differencing"]:::implementation
                click Diff "https://github.com/aknn/prac/blob/master/Time Series/Autocorrelation and Crosscorrelation/Differencing.py"
                ACCNotes["ACC Notes"]:::documentation
                click ACCNotes "https://github.com/aknn/prac/blob/master/Time Series/Autocorrelation and Crosscorrelation/NOTES.md"
            end
        end

        %% Relationships
        Root --> NA
        Root --> RL
        Root --> TS

        %% ARMA Relationships
        AR --> MA
        MA --> ACF
        AR --> ARMANotes
        MA --> ARMANotes
        ACF --> ARMANotes

        %% ACC Relationships
        GW --> RW
        RW --> Diff
        GW --> ACCNotes
        RW --> ACCNotes
        Diff --> ACCNotes

        %% RL Relationships
        SL --> TTT
        SL --> Chess

    end

    %% Style Definitions
    classDef root fill:#f9f,stroke:#333,stroke-width:2px
    classDef implementation fill:#90EE90,stroke:#333
    classDef documentation fill:#FFE5CC,stroke:#333
    
    %% Legend
    subgraph Legend
        L1["Main Component"]:::root
        L2["Implementation"]:::implementation
        L3["Documentation"]:::documentation
    end
```
