Slight exaggeration there.
They change over time and can be [insert buzzword verb here] so that the programs get better and better at solving some particular problem, or approach closer and closer to an extremum (see also Lagrange multipliers)...
but in the strict sense, they don't write "themselves" ab initio.
Cheers!