# thalath/python_pyqt6 architecture

> Architecture diagram of the GitHub repository thalath/python_pyqt6, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/thalath/python_pyqt6
- Repository: https://github.com/thalath/python_pyqt6

## Overview

This repository is a collection of standalone PyQt learning applications, not one integrated product. Users interact with small tools for square calculation, agent decisions, maze and grid search, Sudoku, color matching, troubleshooting, and Khmer–English dictionary work. The graph keeps each app’s workflow separate and includes the dictionary’s profile/statistics and storage concerns. Source excerpts show several internal calls, but README documentation is absent and some files are partial; unverified connections are omitted.

Main entry points: [`chapter8_CPS.py`](https://github.com/thalath/python_pyqt6/blob/main/chapter8_CPS.py) (Dictionary App), [`chapter9_completeDic.py`](https://github.com/thalath/python_pyqt6/blob/main/chapter9_completeDic.py) (Search and Learning UI), [`chapter2_AIAgent.py`](https://github.com/thalath/python_pyqt6/blob/main/chapter2_AIAgent.py) (Agent Simulator), [`chapter7_ExpertSystem.py`](https://github.com/thalath/python_pyqt6/blob/main/chapter7_ExpertSystem.py) (Troubleshooting App)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_basics["Interactive Basics"]
  node_square["Square Calculator"]
  node_agent_ui["Agent Simulator"]
  node_simple_agent["Rule Agent"]
end

subgraph group_search["Search Puzzles"]
  node_maze["Maze Solver"]
  node_path_app["Pathfinding Visualizer"]
  node_path_grid["Path Grid"]
end

subgraph group_games["Constraint Games"]
  node_sudoku["Sudoku Solver"]
  node_color_game["Color Matching Game"]
  node_color_cell["Color Cell"]
  node_troubleshooting_app["Troubleshooting App"]
  node_rule_store[("Rules and Cases")]
  node_inference["Inference Engine"]
end

subgraph group_dictionary["Dictionary Tools"]
  node_cps_app["Dictionary App<br/>[chapter8_CPS.py]"]
  node_cps_editor["Dictionary Editor<br/>[chapter8_CPS.py]"]
  node_cps_stats["Dictionary Statistics<br/>[chapter8_CPS.py]"]
  node_cps_db[("Dictionary Database<br/>[chapter8_CPS.py]")]
  node_complete_dictionary["Learning Dictionary"]
  node_complete_search["Search and Learning UI"]
  node_complete_profile["User Profile"]
  node_complete_stats["Learning Statistics"]
  node_complete_db[("Dictionary Storage")]
end

node_user(("User"))

node_user -->|"enters number"| node_square
node_square -->|"shows square"| node_user
node_user -->|"sets price"| node_agent_ui
node_agent_ui -->|"requests decision"| node_simple_agent
node_agent_ui -->|"shows action"| node_user
node_user -->|"edits and solves"| node_maze
node_maze -->|"shows route"| node_user
node_user -->|"runs search"| node_path_app
node_path_app -->|"searches grid"| node_path_grid
node_user -->|"solves or requests hint"| node_sudoku
node_sudoku -->|"displays solution"| node_user
node_user -->|"matches colors"| node_color_game
node_color_game -->|"creates cells"| node_color_cell
node_user -->|"enters symptoms"| node_troubleshooting_app
node_troubleshooting_app -->|"creates engine"| node_inference
node_troubleshooting_app -->|"creates manager"| node_rule_store
node_user -->|"uses dictionary"| node_cps_app
node_cps_app -->|"initializes database"| node_cps_db
node_cps_app -.->|"offers editing"| node_cps_editor
node_cps_app -.->|"offers statistics"| node_cps_stats
node_user -->|"searches words"| node_complete_search
node_complete_search -->|"reads user facts"| node_complete_profile
node_complete_search -->|"gets random words"| node_complete_db
node_complete_stats -->|"reads user facts"| node_complete_profile
node_complete_stats -->|"generates insights"| node_complete_dictionary
node_complete_search -.->|"uses learning services"| node_complete_dictionary

click node_square "https://github.com/thalath/python_pyqt6/blob/main/chapter1_squareroof.py"
click node_agent_ui "https://github.com/thalath/python_pyqt6/blob/main/chapter2_AIAgent.py"
click node_simple_agent "https://github.com/thalath/python_pyqt6/blob/main/chapter2_AIAgent.py"
click node_maze "https://github.com/thalath/python_pyqt6/blob/main/chapter3_MazeSolver.py"
click node_path_app "https://github.com/thalath/python_pyqt6/blob/main/chapter4_pathfinding.py"
click node_path_grid "https://github.com/thalath/python_pyqt6/blob/main/chapter4_pathfinding.py"
click node_sudoku "https://github.com/thalath/python_pyqt6/blob/main/chapter5_Sudoku_app.py"
click node_color_game "https://github.com/thalath/python_pyqt6/blob/main/chapter6_colorMatching.py"
click node_color_cell "https://github.com/thalath/python_pyqt6/blob/main/chapter6_colorMatching.py"
click node_troubleshooting_app "https://github.com/thalath/python_pyqt6/blob/main/chapter7_ExpertSystem.py"
click node_rule_store "https://github.com/thalath/python_pyqt6/blob/main/chapter7_ExpertSystem.py"
click node_inference "https://github.com/thalath/python_pyqt6/blob/main/chapter7_ExpertSystem.py"
click node_cps_app "https://github.com/thalath/python_pyqt6/blob/main/chapter8_CPS.py"
click node_cps_editor "https://github.com/thalath/python_pyqt6/blob/main/chapter8_CPS.py"
click node_cps_stats "https://github.com/thalath/python_pyqt6/blob/main/chapter8_CPS.py"
click node_cps_db "https://github.com/thalath/python_pyqt6/blob/main/chapter8_CPS.py"
click node_complete_dictionary "https://github.com/thalath/python_pyqt6/blob/main/chapter9_completeDic.py"
click node_complete_search "https://github.com/thalath/python_pyqt6/blob/main/chapter9_completeDic.py"
click node_complete_profile "https://github.com/thalath/python_pyqt6/blob/main/chapter9_completeDic.py"
click node_complete_stats "https://github.com/thalath/python_pyqt6/blob/main/chapter9_completeDic.py"
click node_complete_db "https://github.com/thalath/python_pyqt6/blob/main/chapter9_completeDic.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_square,node_agent_ui,node_simple_agent,node_user toneBlue
class node_maze,node_path_app,node_path_grid toneAmber
class node_sudoku,node_color_game,node_color_cell,node_troubleshooting_app,node_rule_store,node_inference toneMint
class node_cps_app,node_cps_editor,node_cps_stats,node_cps_db,node_complete_dictionary,node_complete_search,node_complete_profile,node_complete_stats,node_complete_db toneRose
```

## Components

### Interactive Basics

- [Square Calculator](https://github.com/thalath/python_pyqt6/blob/main/chapter1_squareroof.py): `chapter1_squareroof.py`
- [Agent Simulator](https://github.com/thalath/python_pyqt6/blob/main/chapter2_AIAgent.py): `chapter2_AIAgent.py`
- [Rule Agent](https://github.com/thalath/python_pyqt6/blob/main/chapter2_AIAgent.py): `chapter2_AIAgent.py`

### Search Puzzles

- [Maze Solver](https://github.com/thalath/python_pyqt6/blob/main/chapter3_MazeSolver.py): `chapter3_MazeSolver.py`
- [Pathfinding Visualizer](https://github.com/thalath/python_pyqt6/blob/main/chapter4_pathfinding.py): `chapter4_pathfinding.py`
- [Path Grid](https://github.com/thalath/python_pyqt6/blob/main/chapter4_pathfinding.py): `chapter4_pathfinding.py`

### Constraint Games

- [Sudoku Solver](https://github.com/thalath/python_pyqt6/blob/main/chapter5_Sudoku_app.py): `chapter5_Sudoku_app.py`
- [Color Matching Game](https://github.com/thalath/python_pyqt6/blob/main/chapter6_colorMatching.py): `chapter6_colorMatching.py`
- [Color Cell](https://github.com/thalath/python_pyqt6/blob/main/chapter6_colorMatching.py): `chapter6_colorMatching.py`
- [Troubleshooting App](https://github.com/thalath/python_pyqt6/blob/main/chapter7_ExpertSystem.py): `chapter7_ExpertSystem.py`
- [Rules and Cases](https://github.com/thalath/python_pyqt6/blob/main/chapter7_ExpertSystem.py): `chapter7_ExpertSystem.py`
- [Inference Engine](https://github.com/thalath/python_pyqt6/blob/main/chapter7_ExpertSystem.py): `chapter7_ExpertSystem.py`

### Dictionary Tools

- [Dictionary App](https://github.com/thalath/python_pyqt6/blob/main/chapter8_CPS.py): `chapter8_CPS.py`
- [Dictionary Editor](https://github.com/thalath/python_pyqt6/blob/main/chapter8_CPS.py): `chapter8_CPS.py`
- [Dictionary Statistics](https://github.com/thalath/python_pyqt6/blob/main/chapter8_CPS.py): `chapter8_CPS.py`
- [Dictionary Database](https://github.com/thalath/python_pyqt6/blob/main/chapter8_CPS.py): `chapter8_CPS.py`
- [Learning Dictionary](https://github.com/thalath/python_pyqt6/blob/main/chapter9_completeDic.py): `chapter9_completeDic.py`
- [Search and Learning UI](https://github.com/thalath/python_pyqt6/blob/main/chapter9_completeDic.py): `chapter9_completeDic.py`
- [User Profile](https://github.com/thalath/python_pyqt6/blob/main/chapter9_completeDic.py): `chapter9_completeDic.py`
- [Learning Statistics](https://github.com/thalath/python_pyqt6/blob/main/chapter9_completeDic.py): `chapter9_completeDic.py`
- [Dictionary Storage](https://github.com/thalath/python_pyqt6/blob/main/chapter9_completeDic.py): `chapter9_completeDic.py`

### Other components

- **User**

## Connections

- User → Square Calculator: enters number (evidence: `chapter1_squareroof.py`)
- Square Calculator → User: shows square (evidence: `chapter1_squareroof.py`)
- User → Agent Simulator: sets price (evidence: `chapter2_AIAgent.py`)
- Agent Simulator → Rule Agent: requests decision (evidence: `chapter2_AIAgent.py`)
- Agent Simulator → User: shows action (evidence: `chapter2_AIAgent.py`)
- User → Maze Solver: edits and solves (evidence: `chapter3_MazeSolver.py`)
- Maze Solver → User: shows route (evidence: `chapter3_MazeSolver.py`)
- User → Pathfinding Visualizer: runs search (evidence: `chapter4_pathfinding.py`)
- Pathfinding Visualizer → Path Grid: searches grid (evidence: `chapter4_pathfinding.py`)
- User → Sudoku Solver: solves or requests hint (evidence: `chapter5_Sudoku_app.py`)
- Sudoku Solver → User: displays solution (evidence: `chapter5_Sudoku_app.py`)
- User → Color Matching Game: matches colors (evidence: `chapter6_colorMatching.py`)
- Color Matching Game → Color Cell: creates cells (evidence: `chapter6_colorMatching.py`)
- User → Troubleshooting App: enters symptoms (evidence: `chapter7_ExpertSystem.py`)
- Troubleshooting App → Inference Engine: creates engine (evidence: `chapter7_ExpertSystem.py`)
- Troubleshooting App → Rules and Cases: creates manager (evidence: `chapter7_ExpertSystem.py`)
- User → Dictionary App: uses dictionary (evidence: `chapter8_CPS.py`)
- Dictionary App → Dictionary Database: initializes database (evidence: `chapter8_CPS.py`)
- Dictionary App → Dictionary Editor: offers editing (evidence: `chapter8_CPS.py`)
- Dictionary App → Dictionary Statistics: offers statistics (evidence: `chapter8_CPS.py`)
- User → Search and Learning UI: searches words (evidence: `chapter9_completeDic.py`)
- Search and Learning UI → User Profile: reads user facts (evidence: `chapter9_completeDic.py`)
- Search and Learning UI → Dictionary Storage: gets random words (evidence: `chapter9_completeDic.py`)
- Learning Statistics → User Profile: reads user facts (evidence: `chapter9_completeDic.py`)
- Learning Statistics → Learning Dictionary: generates insights (evidence: `chapter9_completeDic.py`)
- Search and Learning UI → Learning Dictionary: uses learning services (evidence: `chapter9_completeDic.py`)
