Tensorflow based autorouter

Hello, I was wondering if it would be a good idea to start a tensorflow based auto router project. The current auto routers are not spectacular. They do seem to work. I usually manually route my PCBs because it helps look for errors but sometimes I have a huge bus or a 100 pin micro that i want to route. It takes a ton of time. From what I understand routing isn’t PNP complete. What do you guys think.

1 Like

I wonder how many users of this forum have any AI experience. It would require deep specialized knowledge both in AI and pcb routing. I just say that starting the project wouldn’t be a good idea but finishing it would be. If it would work better than the average autorouters you would be rich or famous or both.

Do you know something about existing autorouting technology?

This is interesting…

https://www.eevblog.com/forum/kicad/open-source-high-quality-autorouting-is-it-possible/

Yeah It seems pretty simple. It pretty much uses a rule based system to get the shortest tracks and least amount of vias. This is alright but it can lead to some pretty weird layouts.

Famous last words right there. Want me to hold your beer while you quickly code something that Altium and other multi million dollar budget packages fail to do in a way most professionals find satisfactory?

3 Likes

Interesting… I’ve had an idea for a while to augment a classical expansion room-based autorouter (google: Alan Finch’s paper on autorouting) where topology and via locations are picked by a neural network trained on human-drawn layouts. Except I know next to nothing about tensorflow :wink: Anybody here willing to help?

Tom

Well if they pulled it off they would no longer have a job!

Ah, so they can do it, they are just courteously waiting for someone else to put them out of a job and get all the money while doing it. Out of kindness of their hearts, I presume.

In all seriousness, I’m not bashing on the idea. Using AI probably has potential and there is a good chance that it’s not done yet because the AI only recently became widely adopted and not because it just doesn’t work well for routing.
Good luck to you, just be prepared that this is not an easy problem.

1 Like

I don’t think auto routing would put any one out of a job. I spend most of my time setting the schematic up.

Based on my experience with various autorouters and with the latest in automated manual routing (sometimes called “intelligent routing”), I think the latter approach is way more interesting to pursue. Humans are just too good at figuring out roughly how things should flow around, so the ideal tool (in my opinion) allows the humans to guide the system, and the software can fill in the details and do all the detail work.

For an example of where high-end proprietary tools are going along these lines, check out this video from Xpedition. The high-end ECAD vendors are doing a lot of R&D into these algorithms because the productivity gain and quality is way higher than with a traditional autorouter (which typically requires lots of careful tuning to get results anywhere near as good as a human could do).

2 Likes

Even simple things like smarter hug routing or gloss/retracing would be fantastic to assist hand routing - it really is a sliding scale where there is a lot more intelligent help from the software in reducing labour. (That was a cool video :slight_smile: )

If your training an AI, don’t forget you will need a very good scoring system in place, this tends to be what hurts to programmers the most,

Then there is the fact Kicad at present does not expose easy ways to define things like track current or impedance, e.g. this track is 50 ohms, this other track is very sensitive to signals, and this track is carrying a pulsed 8A signal,

Its actually quite easy to calculate structures like a 50 ohm via feed to the other side of the board, its hard if it doesnt have ways to nudge it so more stuff can fit later,

The human method will tend to be group parts into clusters with the least unique nets between them, then begin routing out those groupings, then figuring out how to nudge them to fit into the whole board, or atleast thats is how I approach it most times,

By having the least unique nets between groupings and knowing what traces are to be treated specially, its generally just nudging and rotating to make it join up with the surrounding segments

Heck if you want PM me and I can share some very cramped layouts that I would love to see how a competent auto router could manage.

This looks like a neat way:

From here https://www.altium.com/documentation/18.0/display/ADES/((ActiveRoute))_AD

1 Like

I researched the topic a bit and also concluded that interactive auto-routing tools should be the most useful ones for practice. There is a nice article about that topic:

https://www.electronicdesign.com/what-s-difference-between/what-s-difference-pcb-routing-then-and-now

Some example how the Sketch Router works for example:


I did some literature research, and it seems there are two main domains where active research in this direction is done: escape routing and length-matching routing. Basically the escape router ensures that there are no crossings of wires, and the length-matching router ensures that the two components are connected (without track crossing) and signal-delays are enforced.

I found already some literature. Be warned, many of those links are behind a paywall (unless you are at a university)

Some general literature

Specific algorithms

this is the interesting part, to gather a number of recent algorithms and look which of them are easy to implement / powerful / fast,…

Escape Routing

Length-matching Router

Layer assignment

Bus-Planner

Net ordering

Topological Router


Personally, I would like to see some bigger literature research and a classification of those algorithm, to find out which of them could be useful for inclusion when someone steps in implementing an “autorouter”.

11 Likes

Routing a design is a relatively easy job. It turns out that placing the components is much harder and a job that experienced humans are much better at than software.

4 Likes

I would love to write a sketch router for KiCad. Anybody willing to help? :smiley:

3 Likes

I love too help with my spear time.

I want to help if I can :slight_smile:

1 Like

Choosing the machine learning library you want to use (because it’s cool and shiny) before understanding the nature of the problem is a classic X-Y situation. I work every day with people who build AI systems and the hard problems are not the code, they are designing the features, scoring, training, and evaluating the results. Even using a neural net which derives its own features only addresses one aspect of the problem.

Combined with the points made above about KiCad not having information about the constraints, this would be a very challenging project.

3 Likes

Auto router is a lot like symbol and footprint libraries. Their main (but clearly not only) function is to take the stress off of newbies learning the software because it is a steep learning curve. No way around that. That isn’t an insignificant consideration though as open source projects life blood is new users. I spent way too much time figuring out how to get freeroute to work only to turn around and never use it.

In short, I’d implement a reliable, easy to use version as a first goal.

1 Like