A few weeks ago I started to think of ways to make knitting patterns with randomly generated content. It was quite a random thought.

If a knitting pattern has random content, then the finished objects made from that pattern are unlikely to be the same. Of course there is an astronomical chance that two knitters could generate exactly the same random numbers and use the same yarn in the same colors. But essentially a random factor in a knitting pattern would lead to some unique objects.

I had a few ideas, but to start my random explorations I knitted this beanie hat. The stripes in the hat are knitted in a randomly determined number of rows. It’s a very simple pattern and an even simpler concept, so it’s ideal to share in a blog post.

I decided to knit the hat in sock yarn because I live somewhere warm, so big woolly hats are useless to me. I also like the idea of the smallest possible stripe being only one twelfth of an inch tall. This particular hat was knitted in Knit Picks Stroll Sock yarn in Dusk and Cork.

## Random Factor Hat

**Tools and Materials**

US size 1 (2.25 mm) double pointed needles

Approx 100 yds of sock yarn in 2 solid colors (50 yds of each color)

A random number generator or a die

**Gauge**

8 sts and 12 rows = 1″

**Finished Size**

22″ diameter

The hat can be resized to 20″ (CO 160 sts, K50 st st rnds before decreasing and repeat decreases 10 times)

or 24″ (CO 192 sts, K 62 st st rnds before decreasing, and repeat decreases 12 times)

**To Knit the Random Factor Hat**

First, set the parameters of your random number generator. If you’re using a die, this is already done for you. I used a random number generator and set the parameters between 1 and 10.

Make a list of random numbers, the sum of which adds to around 80. Each of these random numbers is the number of rows you will knit to make a stripe.

CO 176 sts in the round using yarn color 1

K1, P1 for 12 rows

Still using yarn color 1, K the first randomly generated number of rows

Join yarn color 2, K the second randomly generated number of rows

Alternate between yarn colors 1 and 2 until you have knitted approx 56 rows since the end of the rib (68 rows in total)

(Don’t cheat and move those random numbers around. They’re supposed to be random, that’s the point!)

**Start Decreasing**

Continue working the random number stripes as you decrease. The decreases are worked over 30 rows, the last stripe should be made in yarn color 1, extend the number of rows in the final stripe if necessary.

(K14, K2tog) x 11 (165 sts)

K1 rnd

(K13, K2tog) x11 (154 sts)

K1 rnd

Continue decreasing 11 sts each rnd until you have 11 sts left.

K 1 rnd

K2tog x 5, K1 (6 sts)

Cut yarn, thread through the live sts, pull tight and secure on the inside

Lovely idea. Can we have random stripy socks next please!

Interestingly, this technique is easy to apply to any simple patterns including ones for socks and scarves.

Love that. Each one unique.

A bad random number generator: 1, 1, 1, 1, 1, 4.33e+67, 1, 1, 1…

Seriously though, that’s a neat idea for a hat for a man or woman. The colors you chose are very subtle yet nice.

Parameters. It’s all in the parameters. 🙂

Never have I thought of such a thing! What a brilliantly simple idea! I always think so logically, that I balance the colors when I try to do random in my mind as I knit. But a number generator would force me to be truly random.