In general, communicating with an IR transceiver is not difficult. The issues with the self-ordering hat network will surely be establishing a system so that many hats talking at the same time will not interfere with each other.
In addition to that "collision" problem, self ordering will not always be as easy as finding out which nodes are on either side of a given node. What if two nodes detect the same node to the left of them? The communication protocol will need to have a system for solving that based on all detected nodes.