Abstract. Certain problems in which the environment is not well constrained do not lend themselves to a conventional open loop solution. Image understanding is such a problem domain. Image analysis programs are notoriously brittle. By using a self-adaptive approach for these problem domains we may be able to produce more robust and useful behavior. We describe an architecture that uses re ection to provide a mechanism for self-monitoring and self-modi cation and uses code synthesis as a means of modifying code dynamically in the face of changing assumptions about the environment of the computation.