[FUN] A dataflow game: TIS-100

18 views
Skip to first unread message

ern0

unread,
Jan 23, 2017, 3:14:46 PM1/23/17
to Flow Based Programming
If you have too much spare time, but you don't want to bridge jump or
take a trip to Mount Everest, why don't you try the game which is a
kind of dataflow stuff:

http://www.zachtronics.com/tis-100/

I don't have Steam account, even I don't play too often at all, but a
colleague of mine showed me this game, he's crazy about it, and he's
right.

In the game, you have to solve data processing problems, puzzles. E.g.
you get an array of number pairs, and the result should be an array of
single elements, which contain the higher value of the pairs. You
always get the desired result array next to input arrays, so you can
see how things are going.

You have a bunch of computing units, called "nodes", which are
arranged to a simple "grid", in a bit different arrangement on
different levels. Each node runs the same, very simple machine code,
instruction set is cca.:
- pull a value from an adjacent node (L, R, U, D) to accumulator,
- push the accumulator to an adjacent node (L, R, U, D),
- copy the accumulator's value to a spare register,
- copy the spare register's value to the accumulator,
- add, sub to accumulator,
- branch on condition;
- also, a label is occupying one row of the 15 available.

You can write code in node's box, step, run. The length of program is
very limited, cca. 15 steps per node, it fits in the node's box on the
screen. One of the nodes, usually the upper-left can pull data from
the input arrays, using "pull left" instruction, and the result must
be presented at another node, usually at the center-bottom one by the
"push down" instruction.

The nodes run parallel, synchronized. If two adjacent node is
connected, they can pass data if they're both in the desired state,
else they hangs on the exchange instruction. E.g. when the producer
node executes a "push right" instruction, but the node at right side
is still computing, it will be blocked. When the right node steps on a
"pull left" instruction, both node will perform its instruction.

Solving a task is okay, you'll unlock next level, but you can invite
your friends and see who can build an app which solve it faster, with
fewer steps. For example, there's a "push" instruction, which pushes
the data in random direction, whichever direction have a "pull"
instruction just waiting, so you can build a kind of load balancer.

I always said, dataflow is fun.
--
ern0
dataflow evangelist
Reply all
Reply to author
Forward
0 new messages