AI Evolution: Resource Competition and Cooperation Dynamics