One Stroke Puzzle

Trace every line of the figure without lifting your pen and without going over any line twice. There are also grids where you pass through every square once, and a quiz where you guess whether a figure can be drawn at all.

Choose your settings and press “Start”

Mode

Puzzles

Difficulty

Report a bug

Only the site operators can read your report. It will not appear in public comments.

Do not include your name, school, address, contact details, or links. The game version and browser type are attached automatically. Privacy

ver 1.0.0 · Updated

Release notes
  1. · ver 1.0.0Added the version label and release notes.
  2. Added the English version.
  3. First published.

How to play the One Stroke Puzzle

A one stroke puzzle asks a simple question: can you draw a figure in a single continuous stroke, without lifting your pen and without going over any line twice? You may pass through the same point as often as you like, but every line has to be used exactly once. People also call this drawing a figure “without lifting the pencil”, and mathematicians call such a route an Euler path.

This game has three modes. In Trace the lines you trace every line of a dot-and-line figure. In Visit every square you walk through a grid and pass through every open square exactly once. In Can it be drawn? you look at a figure and decide whether it can be drawn in one stroke at all. New puzzles are generated every time you play, and in the first two modes every puzzle is guaranteed to have a solution.

Trace the lines

A dot-and-line figure. Tracing started at the green point, and five traced lines are thick and blue. The current point is filled in blue, and the untraced lines leaving it have a pale band
1 Starting point · 2 Traced lines · 3 Where you are now · 4 Lines you can take next

Press any point to start. From there, drag your finger or mouse along a line to the next point, and the line you traced turns thick and blue. You can also just press the neighboring point. A traced line can’t be used again. The bar above the puzzle shows how many lines are left, and when it reaches zero the puzzle is solved.

If you run into a dead end, trace back along the line you came from and that line is erased. Pressing a traced line takes you back to just before it in one move. The “Back 1 line” button and the Backspace key undo one line at a time, and “Restart” clears everything so you can pick a new starting point. On a keyboard, the arrow keys move along the line in that direction, and Q, E, Z and C take diagonal lines.

Visit every square

A 4 by 4 grid. The bottom-right square is the green Start square, and two squares marked with an × are blocked. A blue line runs from the start to the left and then up, and the visited squares are pale blue
1 Start · 2 Squares with × are blocked · 3 Visited squares · 4 Where you are now

This mode is a grid path puzzle. Begin on the green Start square and trace into a neighboring square, up, down, left or right. Squares marked with an × are blocked. You can’t enter the same square twice, so the path you draw grows square by square until every open square is covered. The path can end anywhere. Press a square you have already visited to go back to it.

Can it be drawn?

This is a quick five-question quiz. For each figure, choose “Yes” if you think it can be drawn in one stroke and “No” if you think it can’t. After you answer, every point shows how many lines meet there, and a short note explains why the figure works or fails. For figures that can be drawn, “Show how to draw it” plays the route with numbered lines.

Hints, answers and the daily puzzle

Stuck? Press “Hint”. Before you start, it puts an orange ring on the points you can safely start from. Partway through, it shows the next line (or square) that still leads to a full solution. If the puzzle can no longer be finished from where you are, a red dashed line shows how far to go back. Pressing “Show answer” twice in a row plays a full solution step by step. The daily puzzle is fixed by the date, so everyone who plays on the same day gets the same puzzle.

One stroke puzzle rules: which figures can be drawn?

A figure shaped like two stacked squares. Each point shows its number of lines. The two middle points have 3 lines and are red, and the other four points have 2 lines. The three lines at the left red point have orange marks
Count the lines that meet at each point. Points with 3 lines are odd points.

There is a neat rule that tells you at a glance whether a figure can be drawn in one stroke. Count the lines that meet at each point. A point with 1, 3, 5 or any odd number of lines is an odd point, and a point with 2, 4 or 6 lines is an even point. If the figure is connected, it can be drawn in one stroke exactly when it has zero or two odd points.

Three figures compared. A five-pointed star has no odd points and can be drawn from anywhere. A house shape with an envelope cross has two odd points at the bottom corners and can be drawn from either of them. A two-by-two grid has four odd points and can’t be drawn
Zero or two odd points: it can be drawn. Four or more: it can’t.
Odd pointsOne stroke?Start and finish
0YesStart anywhere; you end where you began
2YesStart at one odd point, finish at the other
4 or moreNoA line is always left over
On the left, a point with 4 lines: arrows show two pairs of lines going in and out, so the path passes through. On the right, a point with 3 lines: one pair goes in and out and one line is left over, so this point must be the start or the end
Every time the path passes through a point, it uses one line in and one line out.

Why does this work? Think about what happens when your pen passes through a point in the middle of the drawing. It arrives along one line and leaves along another, so each visit uses up two lines. However many times you pass through, a point you only pass through must have an even number of lines. At a point with an odd number of lines, one line is always left over, so that point has to be where the drawing starts or where it ends. A drawing has only one start and one end, so a figure with four or more odd points is impossible.

You will also never see a figure with exactly one or three odd points. Every line has two ends, so if you add up the line counts of all the points you always get an even number, and that forces the number of odd points to be even as well.

Difficulty levels

LevelTrace the linesVisit every square
Easy7–9 lines4×4 (1–2 ×)
Normal11–14 lines5×5 (2–3 ×)
Hard16–20 lines6×6 (3–4 ×)
Very hard22–27 lines7×7 (4–6 ×)

In Trace the lines, higher levels add more lines, more points where several lines meet, and curved lines that join the same two points as a straight one. The game picks figures where tracing without a plan tends to end in a dead end. In Visit every square, higher levels use bigger grids with fewer possible routes. The quiz figures also get bigger with the level, and the daily puzzle is always Normal.

Tips and strategy for one stroke drawing

1. Start from an odd point

The first thing to do in any line puzzle is count the lines at each point. If there are two odd points, you must start at one of them. Start at an even point instead and, however carefully you trace, a line will be left over at the end. If there are no odd points, any starting point works.

2. Cross a lone bridge last

Two triangles joined by a single line. On the left, the joining line was crossed first and the right triangle traced, so there is no way back to the left triangle. On the right, the left triangle is traced first, then the joining line, and all lines are traced in the order 1 to 7
Some lines leave you no way back once you cross them.

When a single line is the only link between two parts of a figure, crossing it is a one-way trip. Finish every line on your side before you cross. When you reach a fork, ask yourself: “If I take this line, will the lines I haven’t traced split into two separate groups?” If the answer is yes, take a different line first. This idea is the heart of Fleury’s method, a classic step-by-step way to find an Euler path by hand.

3. Don’t reach the finish too early

With two odd points, the one you didn’t start from is your finishing point. Passing through it along the way is fine, but make sure you don’t get stuck there while other lines are still waiting.

4. On grids, start with the tight spots

In Visit every square, the corners and the squares squeezed between blocked squares decide everything. A square with only one open neighbor can only be the end of your path. If you ever have two such squares ahead of you, the route you are on can no longer work. Visit awkward squares early so they don’t turn into dead ends later.

5. Color the grid like a checkerboard

A 3 by 3 grid colored like a checkerboard: five squares marked orange and four white. Starting in the top-left corner (orange), every square can be visited. Starting in the middle of the top edge (white), it can’t
If one color has more squares, you have to start on that color.

Imagine the grid colored in two alternating colors, like a chessboard. Every step moves you to a square of the other color, so your path alternates colors. If one color has more open squares than the other, the path has to start and end on that color. Counting the colors of the remaining squares is also a quick way to notice a wrong turn before you get stuck.

6. Don’t leave small pockets behind

If the squares you haven’t visited split into two separate areas, you can never reach one of them. Hugging the walls and blocked squares while keeping the unvisited squares in one connected area avoids most mistakes.

One Stroke Puzzle FAQ

Is a place where two lines cross a point?

No. Some quiz figures, like the star, have lines that cross each other, but a crossing is not a point. You can’t turn there; you just go straight through. Only the white circles are points.

What if two lines join the same two points?

A curved line and a straight line between the same two points are separate lines, and both have to be traced. When you drag, the game picks the one your finger follows.

Is there only one answer?

Most puzzles have many solutions. The hints and “Show answer” show just one of them. Any order that uses every line (or visits every square) exactly once counts as solved.

How are my records kept?

The clock starts when you make your first move. For each mode and level, the game records how many puzzles you solved, how many you solved without hints, your best time and your average time. Only solves without hints or answers count toward your best time. Records are saved in your browser on this device only, and “Continue” lets you pick up an unfinished puzzle.

Does the game have sound?

Sound is off at first. Press “Sound: off” below the puzzle to hear a sound as you trace and when you solve a puzzle.

What is the difference between an Euler path and a Hamiltonian path?

An Euler path uses every line exactly once, which is what Trace the lines asks for. A Hamiltonian path visits every point exactly once, which is what Visit every square asks for, if you think of each square as a point. They sound alike, but they behave very differently, as the next section explains.

History: the Seven Bridges of Königsberg

On the left, a map where a river surrounds an island and seven bridges join the north bank, the island, the south bank and the land to the east. On the right, the same map drawn as four points for the land and seven lines for the bridges; the line counts are 5, 3, 3 and 3, all odd
Turn each area of land into a point and each bridge into a line, and you get a one stroke puzzle.

The most famous one stroke puzzle comes from the Prussian city of Königsberg, today Kaliningrad in Russia. In the 18th century the city had seven bridges linking an island in the river with the banks and the land around it, and people are said to have wondered whether they could take a walk that crossed every bridge exactly once. In 1736 the mathematician Leonhard Euler showed that no such walk exists. He replaced each area of land with a point and each bridge with a line, and noticed that the four points have 5, 3, 3 and 3 lines. With four odd points, the walk is impossible.

Looking only at how points are connected, and ignoring distances and shapes, is regarded as the beginning of graph theory, a whole branch of mathematics. Routes that use every line once are called Euler paths in his honor. Routes that visit every point once, like the grid mode, are called Hamiltonian paths, after the 19th-century mathematician William Rowan Hamilton and his puzzle about traveling around the corners of a dodecahedron. Euler paths have the simple odd-point test described above, but no equally simple test is known for Hamiltonian paths. That is exactly why the grid puzzles reward careful trial and error.