harshvinay752 /
RangeSlider
Python tkinter widget for range selection in slider widget structure with two handles
Loading repository data…
Khanggolder / repository
Python/Tkinter Sliding Puzzle solver using AI search algorithms (BFS, DFS, Greedy, A*).
Ứng dụng giải trò chơi xếp hình trượt (Sliding Puzzle) sử dụng các thuật toán tìm kiếm trong Trí tuệ Nhân tạo, được xây dựng bằng Python với giao diện đồ họa Tkinter.
https://github.com/user-attachments/assets/e1b253ec-a112-4d5e-bfc6-c8eb4a407cec
Chương trình cho phép người dùng:
N x M (mặc định 3×3).| Thuật toán | Loại | Heuristic | Đảm bảo tối ưu |
|---|---|---|---|
| BFS (Breadth-First Search) | Tìm kiếm mù | Không | ✅ Có (theo số bước) |
| DFS (Depth-First Search) | Tìm kiếm mù | Không | ❌ Không |
| Greedy Best-First Search | Tìm kiếm có thông tin | Manhattan Distance | ❌ Không |
| A* (A-Star) | Tìm kiếm có thông tin | Manhattan Distance | ✅ Có |
Khoảng cách Manhattan được tính bằng tổng khoảng cách di chuyển (theo hàng và cột) của mỗi ô từ vị trí hiện tại đến vị trí đích:
h(state) = Σ |row_current(i) - row_goal(i)| + |col_current(i) - col_goal(i)|
pip install Pillow
python program.py
BTL_AI/
├── program.py # Mã nguồn chính (PuzzleSolver + PuzzleApp)
├── 1.jpg # Ảnh mẫu để chơi puzzle
└── README.md # Tài liệu hướng dẫn
python program.py.... hoặc nhập đường dẫn ảnh vào ô "Đường dẫn ảnh" (có thể dùng file 1.jpg kèm theo).PuzzleSolverLớp chứa logic giải puzzle, bao gồm:
get_neighbors() — Sinh các trạng thái kề bằng cách di chuyển ô trống (U/D/L/R).manhattan() — Tính hàm heuristic Manhattan Distance.solve_bfs() — Giải bằng BFS (dùng hàng đợi deque).solve_dfs() — Giải bằng DFS có giới hạn độ sâu (mặc định 50).solve_greedy() — Giải bằng Greedy Best-First (dùng heapq).solve_astar() — Giải bằng A* (dùng heapq).PuzzleAppLớp xây dựng giao diện Tkinter, bao gồm:
is_solvable) dựa trên số nghịch thế (inversion count).Treeview ghi lại lịch sử và thống kê thuật toán.Selected from shared topics, language and repository description—not editorial ratings.
harshvinay752 /
Python tkinter widget for range selection in slider widget structure with two handles
ParasKumarGupta /
Sliding Puzzle Game using Python Tkinter GUI and SQL Database for Login And Registering aaaaaaccount Details
sempedia /
Music Slider and Song Indicator Python/Tkinter
Create Map With Slider And Look Up Form Python Tkinter GUI
dphdmn /
GUI application, written in Python/Tkinter to track session stats for sliding puzzle simulator slidysim.com
RoboticsExpert1 /
2-Axis Robot Arm Simulator by SUCHEOL LEE. Real-time FK/IK simulation using Python Tkinter. Featuring interactive joystick/slider modes and workspace visualization. A prime example of "Vibe Coding"—leveraging Gemini AI to accelerate mechanical engineering workflows and GUI development.