Investing in AI stocks could be the key to capitalizing on the next transformative technological wave. They can generate long term gains.