Identifying and modelling decision making and collective behaviour in multi-agent human and artificial systems