Medical marijuana patients don't have to find the best strains for their conditions through trial and error anymore. Thanks to the new app Potbot, they can get expert advice instantly in the palm of their hand.

Potbot uses artificial intelligence to sift through journal articles on cannabinoids to figure out which strain has the right amount of CBD and THC to treat symptoms like insomnia, nausea and chronic pain. It also offers recommendations on consumption methods (e.g. smoking, vaping, edibles) based on the patient's preferences.

The new app is the brainchild of father and son ganjapreneurs Baruch and David Goldstein, who hope the sophistication and ease of using Potbot will win over patients who aren't convinced that marijuana is a credible medicine. "There are great applications like Leafly and Weedmaps," David told CNBC. "We didn't feel like there was something that helps hit that medical patient."

Baruch created Potbot's cannabis algorithm using his PhD in mathematics, which shows just how brainy cannabis culture has become after decades of being marginalized by stoner stereotypes.

Right now, the Potbot app only serves patients in New England. But the Goldsteins plan to expand the service nationwide after crowdfunding their project. You can download the app right now for free on the Apple App Store and Google Play.