Major investment in artificial intelligence is set to transform the UK’s future, including the south Wales M4 corridor.