An attempt at artificial intelligence