Discrimination by algorithm: scientists devise test to detect AI bias