Things AI Can’t Do: Knitting

Sure, there are industrial knitting machines, but can a robot design a knitting pattern?

Janell Shane of AI Weirdness gave it a shot. In a project named Operation Hilarious Knitting Disaster, she teamed up with knitters on the knitting forum Ravelry to feed her network 5,228 knitting patterns, and then instructed SkyKnit to generate knitting patterns.

Knitting patterns

Knitting patterns can’t be read as though they were normal English. Here’s an example of a simple stitch pattern, called Gull Stitch:

Cast On: Panel worked over 13 stitches on a background of reverse stockinette.

  • Row 1 (WS): K2, p9, k2
  • Row 2: P2, 1/3 LC, k1, 1/3 RC, p2
  • Row 3: K2, p9, k2
  • Row 4: P2, k9, p2

Repeat rows 1-4 until you have reached your desired length.

The code is simple if you know it: K means knit, P means purl, LC is a left cable and RC is a right cable. So the first row tells the knitter to knit 2 knit stitches, purl nine purl stitches, and then knit 2 more knit stitches.

SkyKnit’s knitting patterns

Here’s an example of one of SkyKnit’s knitting patterns:

row 1 (rs): k1, * yo, k3, sl1-k2tog-psso, k3, yo, k1, repeat from *
row 2: p1, * p4, k1, p1, k1, p2, repeat from *
row 3: * k1, yo, k1, ssk, p1, k2tog, k1, yo, repeat from * to last st, k1.
rows 4 and 8: p1, * p3, k1, p1, k1, p1, k1, p3, repeat from * to last st, p1.
row 5: k1, * k3, yo, sl1-k2tog-psso, yo, k3, repeat from *
row 6: k1, * p3, k1, p3, k1, repeat from *
row 7: * p1, k2, yo, k2, sl1-k2tog-psso, k2, yo, k3, repeat from * to last st, p1
row 9: * p1, k3, p1, k3, yo, k1, repeat from * to last st, p1

This pattern, called blocks-in-pulpit, is impossible to knit as written.

And that’s key to the patterns generated by SkyKnit. Trying to knit them as written would make them too huge to fit on any knitting needle, or cause the whole thing to unravel into yarn, or be impossible because some of the rows are missing from the pattern.

Human collaboration

The Ravelry knitters tried to interpret the patterns anyway…and succeeded. Some rewrote the patterns to make sense. Blocks-in-pulpit, for instance, was rewritten by Ravelry member HMSChicago in a way that made the math work.

The modified pattern:
row 1 (rs): * k1, yo, k3, sl1-k2tog-psso, k3, yo, k1, repeat from *
row 2: * p4, k1, p1, k1, p3, repeat from *
row 3: * k1, yo, k1, ssk, p1, k2tog, p1, k1, yo, k1, repeat from * to last st, k1.
rows 4: * p3, k1, p1, k1, p1, k1, p2, repeat from *
row 5: * k3, yo, sl1-k2tog-psso, yo, k4, repeat from *
row 6: * p2, k1, p4, k1, repeat from *
row 7: * k2, yo, k2, sl1-k2tog-psso, k2, yo, k1, repeat from *
row 8: * p3, k1, p1, k1, p1, k1, p2, repeat from *
row 9: * p1, k3, p1, k3, yo, k2tog, repeat from *

Others knitted up the patterns as closely as possible to the originals, improvising when they saw a stitch count of six thousand stitches or a lack of instructions for a row, and ended up with strangely shaped items.

The project was a fascinating example of human-AI collaboration, in which the human beings allowed the AI to take point on the project. You could say that the machinery was being creative. But you couldn’t say that it came up with any good knitting patterns.

Rexroth industrial motion control

If you use Rexroth electric industrial motion control in your facility, we can help you keep it running at its best. Call us at (479) 422-0390 for immediate assistance.

24 Hour Turnaround

Factory Repair services available with 24 hour turnaround.
customerservice@hyperdynesystems.com

Call (479) 422-0390 for immediate assistance

Support Request