Even a modest circuit has an enormous number of valid stripboard arrangements. Ten components alone can be ordered and rotated in nearly four trillion ways. Trying them one by one is out of the question, and there is no formula that produces the best one directly ( yet :) ).
So the layouter searches. It describes a board in a compact form, scores it, changes the description a little, scores it again, and repeats this hundreds of thousands of times slowly creating a better and better layout. The method is called simulated annealing, after the way slowly cooled metal settles into an orderly crystal, and it is the heart of the whole thing.
This page explains how the algorithm used by this website works. First what annealing is, by demonstrating it on a simplified version of the problem. Then what a problem needs so that annealing works on it. Then what a good board is, how a stripboard layout is written down and changed, how the written form turns back into a board and a score, and how a run is put together and finished. It assumes an interest in how things work and nothing else.
Stripboard, also called veroboard, is a sheet of insulating board drilled with a grid of holes a tenth of an inch apart, with parallel strips of copper glued to the back, one strip per row of holes. Every hole in a row is already connected to every other hole in that row. Nothing else is connected to anything.

Building on it means pushing component legs through holes and soldering them to the copper underneath. Two legs in the same row are connected, which is how you make a connection and also how you make a mistake. So the board is shaped in two more ways. Where one strip would join two things that must stay apart, the copper is broken by drilling the copper away at a spare hole or cutting it with a knife. Where two rows must be joined, a short piece of wire is soldered from a hole in one row to a hole in the other, which is called a link wire.
So a stripboard layout is three decisions at once: where each component sits, where the strips are cut, and where the link wires run. They depend on each other, and doing them by hand is a puzzle.
Start with a much smaller problem that has the same flavour as a stripboard. Eight blocks of different sizes have to be placed on a small grid. Some pairs of blocks are connected by wires. A placement is good when the blocks sit in a small rectangle and the connections are short, so its score is the area of the rectangle around all blocks plus one and a half times the total connection wire length. Lower is better. Blocks may not overlap and may not leave the grid.
The most obvious search is this: take the current placement, change it a little (shift one block by one cell, or swap two blocks), and keep the change if the score got better or stayed the same, otherwise throw it away. Repeat. Press play below and watch what happens.
It improves quickly at first and then stops dead, usually well short of the best possible placement. The reason is easy to see once it has frozen: every single small change makes the score worse, so nothing is ever accepted again, even though a few changes in a row would lead somewhere much better. Two blocks may need to trade places through a temporarily wider board, or a block has to make room for another before it can move itself. The search is stuck in what is called a local minimum: a placement better than all its neighbours, but not the best overall. Press New start a few times and you will see it freeze in a different place with a different score each time.
Simulated annealing changes exactly one thing about this rule. A change that makes the score worse is not always rejected. It is kept with a probability that depends on two numbers: how much worse it makes the score, and a control value called the temperature. Small setbacks are kept often, large ones rarely, and the temperature scales what counts as small. At a high temperature almost anything is kept and the search wanders freely. At a low temperature only tiny setbacks pass and the search behaves like the improvements-only rule. The run starts hot and cools slowly.
Here is the same problem, from the same starting placement, with that one change. Early in the run the search happily makes the board worse, and the score chart is a jagged mess. As the temperature falls the "bad" moves get accepted less often, the chart calms down, and the search settles on one arrangement and polishes it. The green line is the best placement seen so far, which is what a run returns at the end.
Why does this work? Early in the run a setback costs almost nothing, so the search climbs straight back out of the local minima that trapped the improvements-only rule, and it keeps moving between placements that are quite unlike each other. Improvements are still always kept, so the wandering is not aimless: it spends its time where good placements are common. As the temperature falls the larger setbacks stop passing, the search can no longer leave the arrangement it has arrived at, and the rest of the run goes into refining that one. If the cooling is slow enough, what it commits to is very likely one of the good arrangements. Cool too fast and it commits early, to whatever it happened to be holding. Cool forever and it finds the best placement there is, which is a theorem and also useless, because forever is a long time. Real runs choose a length and accept that they end at a good placement rather than the best one.
The name comes from metallurgy. Metal that is cooled quickly ends up with its atoms frozen in a disordered jumble, full of internal stress. Metal that is heated and then cooled slowly gives the atoms time to find their way into an orderly crystal, the arrangement of lowest energy. Annealing is the slow cooling, and the search borrows the word, the temperature and even the formula for how often a setback is accepted.
The method has nothing to do with circuit boards in particular, and can be used to tackle a whole lot of different problems. My own first contact with it was a fantastic video by AlphaPhoenix I saw a few years ago, drawing congressional district maps of North Carolina, gerrymandered or fair as you please. Same concept. If you want to see another fascinating and very entertaining use case of simulated annealing, I highly recommend you watch that video.
Annealing is a general idea, but it only works well on a problem that has been prepared for it. Four things have to be true, and most of the engineering in the layouter is about making them true for stripboards.
A run makes a great many proposals and every one has to be scored. In the toy above a score is a few simple additions, incredibly fast on a modern processor. For a stripboard, the scoring is much more complicated and it will include more than calculating the area of the board. The layouter needs a way to score a board in a fraction of a millisecond.
Annealing walks through neighbouring states. That only helps if neighbours usually have similar scores, so that a step in a good direction is recognisable as such. Picture the score as a landscape over all possible states. Annealing copes well with a landscape of broad valleys and ridges. It copes badly with one that looks like a saw blade, where the state next door is as likely to be terrible as excellent, because then no step carries information about where to go.
Sadly few real problems can be written down so that they turn into the rolling hills on the left, and stripboards are not among them (as far as I know as of writing this anyway). But luckily it turns out they do not have to be. A landscape anneals well as long as it has structure of the right kind, picture a river valley: steep walls on most sides, but between the walls a floor that keeps going downhill. A hot search crosses the walls freely and stumbles into different valleys. A cooling one is caught by one valley, and once it is in that valley it can follow the valley downstream. Such a landscape takes more effort to walk than rolling hills, since most directions from any point are walls and the annealer cannot see the channel, it has to blindly try moves slowly stumbling downhill. But it anneals.
The toy rejects overlapping placements outright, which is fine for eight blocks where most moves are valid. For a real board that would waste most of the run on rejected proposals. Better is a description in which every possible value is a real, overlap-free board, so no proposal is ever wasted.
The search can only ever find boards that its description can write down. That sounds obvious, but as a description gets smaller and safer it sometimes cannot say certain things. Every board it cannot say is a board the search will never see, however long it runs. If the best board needs a resistor placed horizontally and the description only knows vertical resistors, the run can never find it. So the description has to be able to express every arrangement worth finding while still ruling out nonsense.
Before the search itself, a word on what it searches for. A stripboard layout is good when a person is happy to build it. I consider the following properties most relevant:
A huge portion of the effort has gone into fighting this. Wires that are off axis (also referred to as slanted in this text) or cross a component create visual mess and make it much harder to solder up a result. The pictures below demonstrate it. Both are the same circuit, laid out automatically:

.png)
Section 2 asked for a description in which a small change has a small effect. Writing a board down as a list of coordinates (this component at row 4 and column 7, that one at row 9 and column 2) at first look sounds good. It is not, because a component on a stripboard is not defined by where it sits but by which strips its pins touch. Move it one row and every one of its pins lands on a different strip: nets that shared a strip are torn apart, other nets are suddenly shorted together, the cuts and wires belong somewhere else. The board after such a step has little in common with the board before it, and its score is a fresh draw rather than a small change. That is the saw blade.
This section describes the alternative the layouter uses instead: a way of writing a board down in which every value is a board, every good board can still be expressed, and the landscape resembles the river valleys instead of a saw blade.
To achieve this the layouter never records where a component is. Instead it records how the components relate to each other, and lets the positions follow from that. The core of the description is a pair of orderings: two lists of component names.
Start from a finished packing of rectangles and read it in a peculiar way. For each component, draw a line: from its lower-left corner walk down to the bottom of the board, and whenever another component is in the way, slide left along that component's top edge until you can go down again; from its upper-right corner walk up to the top the same way, sliding right along the bottom edge of anything in the way. Join the two halves through the component. Because these lines all climb from lower-left to upper-right and slide around obstacles in the same direction, no two of them ever cross, and that means they can be read from left to right. Their left-to-right order is the first order of the components. Now draw the mirror image, lines that climb from lower-right to upper-left, and read those from left to right too: that is the second order. Press play to watch the lines being drawn one by one.
Positive step-line: from the component's lower-left corner go down, sliding left along the top of anything in the way, until the bottom edge. From its upper-right corner go up, sliding right along the bottom of anything in the way, until the top edge. Join the two through the component.
The lines never cross, so they can be read from left to right. That reading is the first order.
The two orders are the whole description of the packing. Take any two components, A and B. If A comes before B in both orders, A is left of B. If A comes before B in the first order but after B in the second, A is above B. Hover a component in the figure and check it against the drawing. Every pair of components gets exactly one of the four relations left, right, above, below, and because they were read off a real packing they are consistent with each other.
The trick is that this also works the other way round, from any two orders at all. Write the components down in some order, then again in another order, apply the rule above to every pair, and push each component as far up and as far left as its relations allow. The result is a packing with no overlaps, whatever the two orders were. Try it: swap entries and watch the packing follow.
Click two components in one row to swap them. Hover a component to read its relations.
This pair of orders is a classic trick from chip floorplanning, where it was introduced by Murata and colleagues in 1995 under the name sequence pair. Its virtues are exactly the four requirements from section 2. Turning two orders into positions is a short computation, so scoring stays fast. Swapping two entries is a small change that usually produces a small change in the packing. Every pair of orders is a valid packing, so no move is wasted on nonsense. And every compact packing can be written as a pair of orders, so nothing good is out of reach.
Unfortunately a stripboard needs more than a packing of rectangles. Stripboard has a useful property: once the components are placed, almost everything else is forced. Which strips carry which nets, where the cuts have to go and which segments need a link wire all follow from the pin positions. But that also means the packing alone decides the electrical quality of the board, and a packing of bare rectangles knows nothing about it. Two pins of one net land on the same strip or on different strips by accident, and a small change to the packing can turn one into the other and one link wire into three. That is the jagged landscape of section 2 again, and the two orders alone do not fix it. Their real strength is that they can be combined with further entries. The electrical choices then stop being accidents of the packing and become explicit parts of the description.
Here are the other descriptions used alongside the 2 orderings:
Together this is a description made of a few hundred small choices for a typical circuit, and any combination of choices is a board. That is the state the annealer walks through.
To make that concrete, here is one complete description, the one the next sections work with. The circuit is a 555 timer blinking a load: the timer in its one-resistor astable form, a capacitor and a resistor setting the pace, a second resistor feeding a transistor that switches whatever hangs on the connector. Six components, six nets.

Below is everything the annealer knows about the board: two orders, the rotation of the rigid components, the choices for the flexible ones, the strip groups and the reserved blank lines.
components
nets
description
The description is settled, so the next question is what a step of the search looks like. In section 1 a step nudged a block by one cell. Here a step edits the description: it changes one or two of its entries. Each step proposes one of these changes, chosen at random with fixed odds:
Try them on the example. Each button proposes one random change of that kind and marks what changed in the description. The two boards are what the description stood for before and after: how the layouter gets from the description to a board is the subject of the next section, so for now take them as given. Keep a change or undo it, as the annealer does at every step.
Be warned that most buttons will make the score jump by several hundred points (But there is at least one good move to discover : ) ). That is the consequence of the landscape. A change that leaves a pin without a free hole for its wire, or lays a wire across a component, is priced far above any saving in area. Most single edits of a decent description do exactly that. Those are the steep walls at the edges of the river valleys. Finding the few moves that travel down the river valley is what the annealer is spending its time on in the ending phase of each run. While at the start it accepts those big jumps in the score to find a valley to settle into.
before, score 88.3
after
One thing the demo quietly assumes is the whole problem of the next section. A move changes an entry or two of the description, and the annealer has to judge whether the board got better. But the description has no area, no wires and no cuts; it is far too abstract to score. So every single step, the description has to be turned back into a board first, so that it can be measured.
Decoding turns a description into positions, strips, cuts and wires by the rules of section 4 and some bookkeeping. It has to come close to the finished board, since a score based on a rough guess might lead the search into a wrong direction. It is also the most time-critical piece of the layouter, because it runs once per step, so wherever a small simplification buys a large speedup that trade is worth it. For example the last refinement of cuts and wires is left to the finishing pass of section 9 while this decoder only gets close to that.
The figures below are recordings of the layouter's own decoder at work on the example description from the end of section 4. Use the arrows, or press play.
First the two orders become relations. For every pair of components: before in both orders means left of, before in the first order and after in the second means above.
The two orders, and nothing else.
Rows come first, because the strips run along the rows: which row a pin lands on is the electrical decision, and the columns only decide how much space lies between. Every above-relation becomes an arrow from the upper component to the lower one that says at least so many rows apart, the upper component's height plus the clearance between them. Pins that a strip group asks to share a strip tie their components together at a fixed distance, so from then on they move as one. Then the arrows are checked one after the other, in the sequence of the first order, and every arrow that does not hold pushes its target down. After a few sweeps nothing moves any more, and those are the rows.
Sometimes the ties and the arrows ask for the impossible: the orders put one component above another, but a strip group wants pins of the two on the same strip. In this case the decoder splits one pin out of its strip group, writes that back into the description so the annealer state gets it as well, and starts the row solve over. The pin gets a link wire later instead.
Every part starts on row 0. Each above-relation becomes an arrow: the lower part must sit at least the upper part's height plus its clearance further down.
With the rows known the components can be drawn. Each left-of relation is now an arrow on the board, at least the left component's width plus the gap further right.
Rows are known, so the parts can be drawn. Every part starts in column 0. Each left-of relation becomes an arrow: the right part must sit at least the left part's width plus the gap further right.
Now the board is a grid: one blank line of margin on each side, a copper strip on every row. Each row is read from left to right. Where pins of two different nets sit on one strip, a cut goes between them, drilled through a spare hole if there is one and knife-cut between two holes if there is not. What remains are strip segments, each carrying one net. Rows with no pins at all are bus rows, spare copper any net may borrow to travel sideways.
The board gets one blank line of margin on every side, and every row is one copper strip. Now each row is read from left to right.
Finally every net whose pins ended up on more than one segment is joined up. For two segments the decoder looks for a column with a free hole on both, which gives a straight vertical wire; green rings mark holes that would do, red rings holes that are taken or would put the wire over a component. Where no such column exists it looks for a relay: a hop to a bus row, a hop back. Only when neither exists does it record a slanted wire, and charge for it.
VCC has pins on 3 strip segments. They have to be joined by link wires.
All of that, for a board of forty components, takes the decoder about a tenth of a millisecond. What the figures leave out is only the finishing pass of section 9, which turns the decoder's board into the one you get.
The score of a decoded board is a weighted sum. The weights were tuned by running the layouter over many boards and adjusting them until further adjustments didn't improve the results anymore (kind of like annealing the annealer) (This took many many hours of my CPU annealing boards). The exact numbers matter less than the order of magnitude between the terms.
Board 11 by 11 = 121 cells, 7 link wires of total length 23, 5 cuts, 0 messy wires, a connector away from the edge. Score 88.3.
Everything is in place now: a description that anneals well, moves that edit it, a decoder that turns it into a board and a score that judges the board. What remains is the schedule of the run itself.
The temperature falls geometrically from 150 to 0.15 over the run (the toy in section 1 ran from 6 to 0.5; a real board's scores are much larger numbers, so its temperatures are too), and the price of a slanted or crossing wire rises geometrically from 25 to 400 over the same run. Here is what a real run looks like:
Here is everything from sections 4 to 8 in one place: a random description of the example, the moves of section 5, the decoder of section 6 and the score of section 7, a falling temperature and a rising price of mess. It is the layouter's own loop, run on the example for a few thousand steps and replayed. Press play and watch a board appear.
The annealer returns a description. Its decoded board is already complete in principle, but the decoder is a fast approximation of the editor's final router, so the best few descriptions of a run are handed to that router for the final cleanup.
It enforces a few additional things: on an unlocked board, every link wire runs straight along a column or a spare strip, no wire runs over a component, and no wire crosses another. Here is the finish at work, on a run of the example like the one in section 8.
What the annealer hands over: the board its decoder scored. It is complete, but the decoder is a fast approximation, so nothing about its cuts and wires is final.
Under a locked row or column count the board cannot grow, so this stage does what it can within the limit. Locked components are treated the same way: nothing may shift.
A run ends where its channel took it, and a different random start means a different channel. Nothing marks the one a run found as the deepest there was, so the layouter does not make one run. It tries several in parallel, from different starts, and keeps the best board of the lot.
The Layouts to solve setting says how many. The runs are spread over the processor cores of your machine, one run per core in use. The finished boards are compared on completeness first (for the very rare cases where a run wasn't able to complete a board), then on a rating of area, wires and cuts. Every run uses a fixed random seed, so the same circuit with the same settings on the same machine gives the same board again; a setting starts every run from fresh random arrangements instead, for when you want to see more alternatives.
The layouter is measured against a corpus of 271 circuits that people laid out by hand in this editor, from three components up to about fifty. On every one of them, unlocked, it produces a complete board with no slanted wire and no wire crossing a component, at the default of one minute per layout. Its board is smaller than the hand layout in 199 cases, larger in 70 and the same size in 2, smaller by 30% on the median.
The margin is largest on small boards and narrows as they grow. Up to twenty components the layouter beats most hand layouts on size and on wires; between twenty and forty it is a little smaller but spends more link wires; beyond forty the hand layouts often are still a bit tighter, this is where the work continues.
Refer to the quick guide for the buttons and settings. If you build something with it, or it does something odd, the feedback page is the place to contact me if you like.
Thank you for reading this far. I hope you found it interesting!
This page describes a layouter that is work in progress. It is the current version, it changes as I find better ideas, and the numbers above are the state at the time of writing. Most of the ideas in it are not mine. Simulated annealing, the sequence pair, solving spacing constraints as a longest path and spanning trees for wiring are all well-known tools from other fields. What is new here is applying them to stripboards: the description that has the four properties of section 2, a decoder fast enough to make it work in a browser, and a score that matches what people build by hand. The sources I leaned on most:
Surprisingly little has been published on this problem. Printed circuit board tools place components and then draw tracks wherever they like on an empty copper plane, and chip floorplanning, where the sequence pair comes from, packs rectangles and measures wire length. A stripboard is neither: the copper is already there, in one direction only, and the question is where to break it. What follows is everything I have found that tackles some part of it.
The only published finished attempt at placing components automatically is a 2025 paper by Fang Li,Declarative Synthesis and Multi-Objective Optimization of Stripboard Circuit Layouts Using Answer Set Programming. It writes the placement rules down as logical constraints, hands them to a general constraint solver, and asks it first for any layout that satisfies them and then for the one that keeps the pins of each component on nearby strips on the smallest board. It comes with five benchmark circuits. Strip cuts and link wires are not part of that model, which is why in its layouts every net needs a strip of its own; the paper names both as future work. The layouter on this site solves that same guitar pedal circuit in a few seconds. The project is public, so you can open it in the viewer:
schematic.png)
.png)
The same idea, constraints handed to a general solver, appears much earlier in a 2012 blog post by Pepijn de Vos, Thoughts about generating stripboard layouts. It sketches the components as lists of pins, each pin's strip as an unknown, and the netlist as the rule that pins of one net share a strip, to be solved with a logic programming library. It is a sketch rather than a program, and its author lists the same open ends: cuts under components, and wires between strips.
Two other projects automate the other half of the job and leave placement to the person. Roger Dahl's Stripboard Autorouter takes the components as placed and searches for the cuts and wires that connect them. Its wires are bare, so every finished route blocks the space it crosses and the order in which connections are routed decides whether the last ones still fit; it searches over that order with a genetic algorithm. VeroRoute by Alex Lawrow is the most complete interactive stripboard editor I know of, with a router that redraws the tracks between the pins while you move components around; its documentation says that laying out the circuit is up to the user.
Another good tool does neither half. Fritzing can hold a piece of veroboard, but components, cuts and wires are all placed by hand. Its autorouter belongs to the printed circuit board view and does not apply here.
So each of these covers at most one half of the job. The two solver approaches place the components but don't model cuts and wires; the routing tools place cuts and wires but leave the components to the person. As far as I have been able to find, this project is the first to attempt the whole board.