Competition and cooperation in neural nets