[dev] bird rules « Tidepool News

Coding in Tidepool is a mostly declarative affair, where players define rules for agents to follow. The design comes from my own Gravity environment from the early 90s, which itself was influenced by Prolog and Smalltalk. A more modern sibling might be SPARQL or Wolfram Language. Unlike these others, I’ve decided not to name the Tidepool language, since I want there to be many dialects that do the same things.

As of now, Tidepool rules are too syntax-laden for most kids to use. This will change in the next milestone when I make the cognitive agent’s natural language interface. For example, this current clunker:

  • #adv-bird.1 when “get” nearby(#adv-rod.1) or holding(#adv-rod.1), say “The bird is frightened…”

could be written in any of these ways:

  • bird, when I say “get” and the rod is nearby or I’m holding the rod, say “The bird is frightened…”
  • bird, instead of get say “The bird is frightened…” if I have the rod or it’s nearby
  • don’t get the bird if I have the rod or it’s in the room, say “The bird is frightened” instead.

Tidepool’s current coding UI is also more complicated than I’d like. Instead of typing the rule above, you can also use the Rule Box.

The puzzle I’m currently working on is defined like this:

This basically says, “Bird, when I type “get”, if I’m holding the rod or the rod is nearby, say ‘The bird is frightened’.  If the rod isn’t nearby and I’m not holding it but I’m not holding the cage, say ‘You can catch the bird, but you cannot carry it’.  If you are holding the cage and the rod isn’t near and you’re not holding it, then get the bird.”

There are many ways to express conditionals like these, and yes, this is too complex for kids. The structure above is merely the boiled down version of a much fuzzier future. I’m hoping you can use real language to write rules by March or April.

In Java/C/etc, this would be written:

if ( holding(aRod) || nearby(aRod) ) say( "Bird is frightened");
 else if ( !holding(aCage) ) say( "Cannot carry it" );
 else get(aBird)

Yes, a programmer will think this is so much easier. Good luck teaching this to a seven year old. Besides, declarative rule-based languages have deeper strengths that static procedural if-else chains can’t touch.


| Main |

Leave a Reply

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