Parallel development of social preferences in fish and machines