I started by making a bunch of cards and trying to arrange them like the eToys example,
but I didn't like moving the wires like this. So then I tried drawing a circuit,
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.
You can then photocopy these to make more of them.
Then you use these in tandem with drawn wires on a whiteboard.
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.
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.
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.