I lost a bunch on weed stocks, too. It was one of the best lessons I ever learned on speculation.
As far as AI goes, I think the best/safest route is to stick with the big names. Google and Microsoft aren't going anywhere and I'd bet they'll be gobbling up the smaller players that make any...