Date: Mon, 27 Mar 2017 18:10:38 -0700
From: Toby Schachman
Subject: Re: Logic Circuit Jam
I started by making a bunch of cards and trying to arrange them like the eToys example,

Inline image 1

but I didn't like moving the wires like this. So then I tried drawing a circuit,

Inline image 2

but I was worried that specifying how to recognize the components would maybe be too tricky.

So I then explored a hybrid approach.

The premise is you have a stack of unique framecodes that you can grab and start drawing on to represent your components.

Inline image 3

You can then photocopy these to make more of them.

Inline image 4

Then you use these in tandem with drawn wires on a whiteboard.

Inline image 5

I presume that we have a whiteboard "mark" recognizer that's running on the image of the whiteboard. This would filter out other recognized objects (e.g. the framecodes), then would background subtract the white of the whiteboard. It then filters the remaining pixels into a set of distinct colors (maybe 4-6 standardized colors). It then does a connected component analysis on these. So the above marks would be recognized as a red mark (the dot) and a black mark (the "tail" of the wire).

We then recognize a wire as any red mark connected to a black mark.

Inline image 6

The nice thing about this is that we can then address the parts of this compound object. Inform 7 uses this "part of" relationship powerfully. It's how you build objects with complicated mechanisms.

This also gives us eToys' "color sees color" power.

I didn't think through the components too much, but here is a rule for the AND object.

Inline image 7

That's where I got.


I think the key ideas are:

- You have a stack of framecodes. You photocopy the framecodes to duplicate them. Photocopying and cutting out is perhaps too tedious. On the other hand it is very flexible.

- Framecodes have a built-in orientation so you can refer to their left side, top side, etc.

- We have a recognizer for marks on the whiteboard with a few standardized colors.

- You can recognize compound objects out of smaller objects.

- We have a "part of" relationship and use this like Inform 7 and eToys.

- We exploit the built-in "highlighted" (Bret called this "lit") adjective which comes with a visualization for free (it's lit up).

I think an alternative to the colors and part of solution for wires would be to have a built-in arrow recognizer and use this for wires. Then you could talk about the object closest to the head of the arrow or closest to the tail of the arrow. Having a built-in arrow recognizer would probably be pretty useful to have. But it is less flexible than recognizing generic connected components.

You could also assume wires only transmit in one direction, but then you can't do cycles.