A key problem in executing performance critical applications on distributed computing environments (e.g. the Grid) is the resource selection. Research related to rdquoautomatic resource selectionrdquo aims to select suitable resources on behalf of users to optimize the execution performance. However, most of current approaches are based on the static principle (i.e. resource selection is performed prior to execution) and need detailed application-specific information. In the paper, we introduce a novel on-line automatic resource selection approach. This approach is based on a simple control theory: the application continuously reports the execution satisfaction degree (ESD) to the middleware application agent (AA), which relies on the reported ESD values to learn the execution behavior and tune the execution environment by adding/replacing/deleting resources at runtime in order to satisfy users' performance requirements. We use a utility-based learning and tuning algorithm to enable the automatic resource tuning/selection. A typical 2-D heat equation application is used to validate the approach. Results show that without resource or application knowledge being provided in advance, the approach is able to find the best-effort resources to satisfy users' execution requirements, and classify resources according to their contribution made to the application.