https://github.com/charles-hsiao/python-vacuum-cleaner-robot
Python Vacuum Cleaner Robot Algorithm and Demo
https://github.com/charles-hsiao/python-vacuum-cleaner-robot
bfs-algorithm dfs-algorithm dijkstra-algorithm lambda nodejs python robot vacuum-cleaner
Last synced: about 2 months ago
JSON representation
Python Vacuum Cleaner Robot Algorithm and Demo
- Host: GitHub
- URL: https://github.com/charles-hsiao/python-vacuum-cleaner-robot
- Owner: charles-hsiao
- Created: 2018-09-28T12:57:00.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-14T13:59:59.000Z (over 6 years ago)
- Last Synced: 2025-04-05T10:01:39.936Z (2 months ago)
- Topics: bfs-algorithm, dfs-algorithm, dijkstra-algorithm, lambda, nodejs, python, robot, vacuum-cleaner
- Language: HTML
- Size: 12.8 MB
- Stars: 10
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# python-vacuum-cleaner-robot
Python Vacuum Cleaner Robot Algorithm and DemoWork In Process
## Map Definition
### Matrix
```
Two-dimensional array, 1st-dimensional as Row, 2nd-dimensional as Column
```### Floor Definition
| Floor Type | Code | Draw Out | Able to Cross | Clean Mode (Code) | Clean Strength (Value)
| ---------------- | ---- | -------- | ------------- | --------------------------- | --------------------
| Empty | -2 | X | X | - (0) | None (0)
| Obstacle | -1 | O | X | - (0) | None (0)
| Normal Floor | 0 | O | O | Vacuum Cleaner - Weak (1) | Weak (1)
| Wet Floor | 1 | O | O | Mop (2) | None (0)
| Carpet | 2 | O | O | Vacuum Cleaner - Strong (1) | Strong (3)
| Dirty Floor | 3 | O | O | Vacuum Cleaner - Medium(1) | Medium (2)
| Floor with Trash | 4 | O | O | Broom (3) | None (0)### Example
#### Example 1:
```
map_matrix = [[0, -1, 0], [0, 0, 0], [0, 0, -1]]
```#### Example 2:
```
map_matrix = [[1, 0, -1], [0, 0, 2], [0, 0, 2]]
```#### Example 3:
```
map_matrix = [[2, 2, 2, 2, 2], [0, -1, -1, -1, -1], [0, 0, 0, 0, 0], [0, 0, 0, 1, 1], [0, 0, 0, 1, 1]]
```![]()