1. A method for clustering of nodes for a task, comprising automatically partitioning a set of nodes into a branched hierarchy of subsets as nodes join and leave the set, using a genetic algorithm and based at least on a relative distance according to at least one node characteristic distance metric, each subset having a communication node, each node within the subset being adapted to communicate control information with the communication node, and the communication node of respective subnets which are hierarchically linked being configured to communicate control information with each other; and outputting a set of preferred nodes for allocation of portions of a task, wherein the output set of preferred nodes is dependent on both the hierarchy and the task.