the prototype for a simple AI