A reasonably intelligent MonkeyQueen implementation