3 ms·
> Placement is probably the big issue that needs to be solved now. Would some sort of constraint-solving algorithm help with that? Something like (but not nece
by ElFitz 4mo ago
> Placement is probably the big issue that needs to be solved now.
Would some sort of constraint-solving algorithm help with that? Something like (but not necessarily) Cassowary[0]? Maybe I'm misunderstanding what is meant by placement though; I don't have much domain knowledge in PCBs / electronics.
[0]: https://news.ycombinator.com/item?id=43362528 https://news.ycombinator.com/item?id=43362528
- lambdaone 4mo agoI've written my own autoplacer/autorouter. Placement is where you put the components on the board, routing is how you shape the traces to interconnect them. It does a pretty decent job on small hobby-project boards of ~40 components (which is my use case at the moment), and I'm working part-time in the background on scaling it further. The resulting designs pass all the KiCad electrical and geometry checks. Granted, I've spent about a year working on this problem, and it's hard, but not that hard a problem, providing you can avoid falling off the exponential cliff by decomposing it into hierarchical subproblems. Quick-and-dirty unsupervised whole-board synthesis from schematic takes about 5 minutes, longer if you want cleaner output with nicer-looking better-routed traces. As others here have said, placing is the real problem to solve, and that's where the magic happens. Place the components right, and routing is a relatively easy loosely-coupled constraint programming problem, place them wrongly, and you will have to get used to seeing the word UNFEASIBLE in your log output.
- throwaway2037 4mo agoThis project sounds very cool. Is it open source? If yes, can you share a link to the repo?
- ElFitz 4mo agoThat is fascinating. Thanks!
- seveibar 4mo agoWe work on this a lot at tscircuit, and we've used cassowary (i.e. flexbox-style) constraint solvers. The issue with cassowary/flexbox is PCBs are not as uniform as webpages w.r.t. alignment, and often have a much less nested structure (3 layers) vs web pages which have many many nested layers. CSS grid-style constraints are a much better fit IMO, but we eventually settled on sequential optimal packing[1] for "seeding" a placement so that AI can get initial positions before working in a feedback loop. I like sequential optimal packing because it's very very deterministic and the constraints are specified pretty close to how a human would specify them [1] https://blog.autorouting.com/p/sequential-optimal-packing-for-pcb https://blog.autorouting.com/p/sequential-optimal-packing-fo...
- ElFitz 4mo agoThe first thing that came to mind reading it was "backtracking". Which I guess is the recursive pathfinder piece?