CASTLE is a software framework that links various types of cognitive models to various virtual environment simulators, such as those used for military training. It supplies cognitive models with perceptual information about the virtual environment, and simulates the effects in the virtual environment of actions invoked by cognitive models, while imposing human-like limitations on perception and action.