Catching the Vibe

This is hard to say, but I feel so…unfaithful. For 35 years, Sketchpad has been my tool of choice for designing interactive mathematical models. I’ve toyed with learning programming languages like Python, p5.js, and Snap, but a lack of motivation always got in my way. Why, I thought, spend months developing new coding skills when Sketchpad met my needs?

In truth, there were times when I knew Sketchpad was an imperfect fit for what I wanted. When building games with complex mechanics and scoring systems, it felt like a slog to build all the needed logic in Sketchpad. But I could live with that extra effort because the results, even if time intensive, were quite good.

By now, you probably know where this story is going and the source of my dalliance: Several weeks ago, I met Claude, made Claude my coding buddy, and am delighted with the results.

I had my doubts about using Claude to code a game because I’d read that A.I. needed expert coding guidance to do its magic. I’m sure that’s true for complex coding tasks, but it turns out that building a math game did not require me to have anything other than a clear sense of what I want to build, a logical mind, the ability to explain all aspects of the game down to the minute details, and—most importantly—infinite patience with Claude when it failed to do what I had asked.

For my Claude project, I decided to revisit a game that my former colleague Steve Rasmussen and I had conceived over 15 years ago. The game had a strong dynamic geometry component to it: the player receives a “stretchy” quadrilateral fence that is used to enclose sheep. By dragging the vertices of the fence (which begins looking like a square), the player discovers that no matter how she might drag it, the fence is always either a general quadrilateral, a parallelogram, a rhombus, a rectangle, or a square, with the shape picked at random by the computer. Having enclosed as many sheep as possible, the player must then pick the most precise description of the fence in order to earn points for the sheep herding.

The behavior of the quadrilaterals was, of course, a cinch for Sketchpad. But the scoring mechanism of the game and all the other game mechanics made it an unappealing project for building in Sketchpad. Claude, by comparison, had no problem with counting sheep, but it did struggle mightily with constructing special quadrilaterals that behaved in the manner we all know from dynamic geometry. Claude’s quadrilaterals were twitchy when dragged, would deform from one shape into another in unexpected ways, would get “smushed” when dragged along the edge of the field, and exhibited other undesirable behaviors that left me, for a while, eager to abandon the project and A.I. along with it. But six or so hours after carefully walking Claude through the ins and out of dynamic geometry, it gave me a very reasonable model of the fence that behaved predictably and in accordance with dynamic geometry principles.

With the fence done, I thought the hard work was over, but Claude, bizarrely, could not draw a cartoonish sheep no matter how many prompts I fed it. Claude’s attempts at sheep all looked like some weird crossbreed of a sheep and a pig. Maybe this was my fault, but my advice to you is that if you’re in the market for sheep illustrations, look elsewhere.

Here is the finished game. Did Claude do the work for me? Can I take pride in ownership of this game? Even though I didn’t write a line of code, I one hundred percent feel that this game is the one that Steve and I designed, and without the careful directions and guidance I gave to the A.I., the game would not exist.

I have no intention of abandoning Sketchpad, but now I have another option when an idea of mine just isn’t right for it. If you have patience and are willing to take on the role of a project manager with a very bright but often dense co-worker, then give A.I. a try! I’m glad I took the plunge.

Daniel Scher

Daniel Scher co-directed two NSF-funded projects: the Dynamic Number project and the Forging Connections project. He has worked at EDC, Best Practices in Education, KCP Technologies, and McGraw Hill. He has taught as an adjunct at New York University and City College.

Leave a Reply

Your email address will not be published. Required fields are marked *