Making creatures

i’m very interested in learning to program creatures and enviroments but i’m not the most talented coder and i haven’t been able to find any suitable tutorials in this particular direction.

i wanted to start with something simple like a food gathering insect.
to do this i’d like to script a ant that sits in his nest, when the user clicks somewhere a apple is spawned at that spot which encourages the ant to go out, find the most direct route to the apple and take a bite (basically touch the apple to become loaded with food)

once the ant is loaded it goes right back to the nest to unload, repeat untill the apple is gone, for example the apple could take 4 bites from the ant before the movieclip disappears.

i have a fair idea on how to make the apple decrease in size but i have no clue on how to code a ant to sit tight, find his way around or transport bits of apple to the nest.

does anyone know any basic tutorials on how to make things move with a purpose?