King Charles will host a gathering to discuss ​how artificial intelligence could be harnessed in ways that benefit ‌society, Buckingham Palace says.