Determination of genes to be modified in epigenetics
Mutations are not performed targeting a specific new phenotype. There is no way an organism can "know" the impact of a specific future mutation anyway. A mutation is just a mistake in the replication process. As a consequence the majority of mutations are deleterious and only a handful of mutations are beneficial.

It is true though that the mutation rate can be affected by the environment or the stress induced by an individual (Agrawal 2002). It seems more intuitive that these are just a consequences of the cost of the DNA replication machinery and DNA repair machinery but it is not impossible that such changes in mutation rate could eventually evolve as a bet-hedging strategy. In the extreme case where the same types of environmental change happen over and over again, it is not impossible that a lineage could evolve the ability to modify the mutation rate at a particular locus. However, to my knowledge this has never been found.

You might want to follow an introductory course to evolutionary biology. You might also want to read this post too that gives a mixture of related information