You don't have to do anything. This is a simple ant AI. The queen is in the center and with 1 worker. Once the worker gathers 2 food (green things) a new worker will be born. New food grows every few seconds. Continue infinitely. The queen walks around her nest occasionally to gather any food next to it.
I was inspired by this https://scratch.mit.edu/projects/282072771/ but I made the amazing art by myself :) If you want a game version, try this https://scratch.mit.edu/projects/350822005/ report any bugs or issues and I will fix them