An artificial intelligence approach to language instruction