Cooperation among functional units of a cluster of smart devices is programmed by a user using a spreadsheet. The user authors spreadsheet formulas to calculate target states of active units of the cluster according to the contents of spreadsheet cells that include current states of functional units of the cluster. Programming messages based on the spreadsheet formulas are received by the smart devices of the cluster and program those smart devices for autonomous operation. Processors of the smart devices then receive updated current states of functional units of the cluster, calculate the target states of the active units according to the received updated current states, and control the active units toward reaching their calculated target states.