Using artificial intelligence to mitigate cyber-risks