Neural networks and physical systems with emergent collective computational abilities