but viruses are not alive. its pure chance, and yes the more replications the more mutations. This is why biologic drugs use master calls and are very careful to grow the drug molecule producing cells a limited number of times.
Its not a formula though. its just pure chance like rolling a dice.
Something doesn't have to be alive to be under the same pressures of evolution.
If you had self replicating robots they would be faced with evolution too... If a zero flipped to a one in their machine code and it harmed them they would possibly malfunction, if it helped them they build more robots quicker they would become the dominant robot type.
"Life" isn't required.for evolution.

