A method of recognizing or classifying patterns is based on an artificial immune system (AIS), which includes an algorithm and a computational model of nonlinear dynamics inspired by the behavior of a biological immune system. The method has been proposed as the theoretical basis of the computational portion of a star-tracking system aboard a spacecraft. In that system, a newly acquired star image would be treated as an antigen that would be matched by an appropriate antibody (an entry in a star catalog). The method would enable rapid convergence, would afford robustness in the face of noise in the star sensors, would enable recognition of star images acquired in any sensor or spacecraft orientation, and would not make an excessive demand on the computational resources of a typical spacecraft. Going beyond the star-tracking application, the AIS-based pattern-recognition method is potentially applicable to pattern- recognition and -classification processes for diverse purposes — for example, reconnaissance, detecting intruders, and mining data.