https://github.com/samsmithnz/puzzlesorter
Can we write an algorithm to sort jigsaw and Lego pieces into piles by color?
https://github.com/samsmithnz/puzzlesorter
lego poc puzzle sorter
Last synced: 2 months ago
JSON representation
Can we write an algorithm to sort jigsaw and Lego pieces into piles by color?
- Host: GitHub
- URL: https://github.com/samsmithnz/puzzlesorter
- Owner: samsmithnz
- Created: 2022-11-24T00:02:48.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-07-19T15:20:28.000Z (3 months ago)
- Last Synced: 2025-07-19T19:13:26.206Z (3 months ago)
- Topics: lego, poc, puzzle, sorter
- Language: C#
- Homepage:
- Size: 40.3 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PuzzleSorter
[](https://github.com/samsmithnz/PuzzleSorter/actions/workflows/workflow.yml)Question: With software, can we sort jigsaw puzzle pieces and/or Lego?
Some early prototypes:
- Unity3d: 
- WinForms: # How it currently works
Based on the number of robots (agents that complete work), a timeline is created with the number of turns required.
- Each turn enables each robot to run one action, either a move from adjacent tile to another tile, pickup a piece, or a dropoff a piece.There are jobs:
```mermaid
flowchart TD
id0[Start] --> id1[Looking for new job]
id1[Looking for new job] --> idLook[Are there jobs]
idLook[Are there jobs?] --yes--> id2[Moving to pick up location]
id2[Moving to pick up location] --> id3[Picking up package]
id3[Picking up package] --> id4[Moving to delivery location]
id4[Moving to delivery location] --> id5[delivering package]
id5[Delivering package] --> id1[Looking for new job]
idLook[Are there jobs?] --no--> idEnd[End]
```# How it needs to work in the future
Based on the number of robots (agents that complete work), each robot follows an algorithm to find work, if there is still work to complete.```mermaid
flowchart TD
id0[Start] --> id1[Are there unsorted pieces remaining?]
id1 --yes--> id2[Are there free agents?]
id2 --no--> idWait[Wait] --> id1
id2 --yes--> id3[Move free agent to pickup location]
id3 --> id4[Pick up package]
id4 --> id5[Analyze package]
id5 --> id6[Find delivery location]
id6 --> id7[Find route to delivery location]
id7 --> id8[Carry package to delivery location]
id8 --> id9[Drop package at delivery location]
id9 --> id1
id1 --no--> idEnd[Done]
```