Warren Buffett doesn't invest in what he doesn't understand, and he has readily admitted that he doesn't understand artificial intelligence (AI). So does that mean the legendary investor doesn't have any AI stocks in his portfolio? Nope.

Granted, Berkshire Hathaway (BRK.A -0.76%) (BRK.B -0.69%) only owns a few AI stocks. However, Berkshire's subsidiary, New England Asset Management (NEAM), features quite a few stocks with solid AI connections among its holdings. 

Even though Buffett didn't personally pick all of these stocks, he nonetheless owns them. Here are all of his AI stocks, ranked from best to worst (in my calculated opinion). 

1. Alphabet

Alphabet (GOOG 9.96%) (GOOGL 10.22%) is one of those stocks in NEAM's portfolio rather than Berkshire Hathaway's. The company's Google DeepMind unit has made several important AI breakthroughs. 

Some believe that AI presents a huge threat to Alphabet. I disagree. Instead, I think that AI will provide a massive tailwind for the company -- especially its Google Cloud unit. With the stock trading at a price/earnings-to-growth (PEG) ratio of around 1.2, Alphabet stands as one of the most attractively valued AI stocks on the market.

2. Amazon

Berkshire does directly own a stake in Amazon (AMZN 3.43%). Although one of its two investment managers made the decision to buy the stock, Buffett has referred to himself as "an idiot" for not doing so himself earlier.

The company incorporates AI throughout its operations. Its Amazon Web Services cloud platform should enjoy tremendous growth over the next decade and beyond due to the surge in AI adoption.

3. Apple

Buffett likes Apple (AAPL -0.35%) so much that it's by far the largest position in Berkshire's portfolio. The company hasn't been in the AI spotlight as much as other companies this year, but market researcher PitchBook ranks it as the top buyer of AI and machine-learning companies since 2017. 

I think it's possible that some of the AI stocks that are lower on my list could deliver greater gains than Apple over the next few years. But the company's moat (namely, its impressive iPhone-centered ecosystem) and the opportunities for its services and new products to generate growth make it worthy of the No. 3 spot, in my opinion.

4. Microsoft

Microsoft (MSFT 1.82%) is a NEAM holding that has profited from the interest in generative AI this year. The company's partnership with and investment in ChatGPT developer OpenAI appears to be a game changer. 

AI should make nearly all of Microsoft's software products more valuable to users. The company's Azure cloud service platform also stands to grow robustly for years to come just as Google Cloud and Amazon Web Services likely will.

5. Snowflake

Berkshire invested in Snowflake's (SNOW 3.69%) initial public offering in 2020. It was a surprising move, but one that appears to have been made by investment manager Todd Combs rather than Buffett himself. 

I don't like the stock's sky-high valuation or the company's hefty level of stock-based compensation. However, I think that Snowflake should have a big opportunity as it integrates AI into its cloud-based data platform. 

6. Taiwan Semiconductor Manufacturing

Taiwan Semiconductor Manufacturing (TSM 1.26%) is a NEAM-owned stock with an enviable business model. The company had a market share of 58.5% in the semiconductor foundry market at the end of 2022, according to Statista. 

I'd rank Taiwan Semi even higher on the list were it not for a couple of concerns. First, the stock is valued at a premium. Second, the threat that China presents to Taiwan is a dark cloud for the company.

7. Qualcomm

Qualcomm (QCOM 1.45%) isn't the kind of stock you'd expect to see in Berkshire's portfolio -- and it isn't. However, NEAM has a position in the chip stock.

There's good news and bad news for Qualcomm. The good news is that the company has emerged as a leader in AI chips for mobile devices. Its stock is also cheap, with a PEG ratio of 1.06.

The bad news is that the smartphone market's growth has tapered off. Also, Qualcomm is heavily dependent on Apple, which wants to develop its chips in-house in the future. 

8. Broadcom

NEAM holding Broadcom (AVGO 3.84%) is a key supplier of AI chips for Google and other companies. Rumors circulated recently that Google was seeking to replace Broadcom or design its own chips internally. However, Google publicly reaffirmed its ongoing relationship with Broadcom.

Broadcom is arguably the second-biggest winner after Nvidia from the generative AI explosion. Unlike Nvidia, though, its stock isn't priced at a steep premium. My main reservation about it is the possibility that Google could change its tune down the road.

9. NXP Semiconductors

As you might guess, NXP Semiconductors (NXPI 1.94%) is in NEAM's portfolio but not Berkshire's. The company is a leading provider of chips for automakers.

NXP is another stock that could arguably merit a higher place on the list of Buffett AI stocks. Self-driving cars in particular could be a huge growth market for the company.

10. Cisco Systems

Cisco Systems (CSCO -0.50%) is a NEAM holding that is betting in a major way on AI. The networking equipment company's CEO, Chuck Robbins, stated recently that AI "is a huge opportunity for Cisco."

Some Wall Street analysts think that it's going to take a while before Cisco really benefits from its AI initiatives. I suspect they're right. 

11. IBM

Berkshire directly owned shares of IBM (IBM -1.05%) in the past but eventually exited the position. However, Big Blue remains a Buffett stock of sorts because of its inclusion in NEAM's portfolio. IBM also remains one of the leaders in AI with its Watson platform. 

I don't expect IBM to deliver jaw-dropping growth. The main pluses for the stock, in my view, are its attractive valuation and juicy dividend yield.

12. Texas Instruments

Texas Instruments (TXN 1.27%) comes in last on my list because there are several problems for the technology pioneer. Its revenue fell year over year in the second quarter of 2023. The company even posted negative free cash flow for the first time in 19 years. 

I do think that Texas Instruments has growth opportunities ahead thanks to AI, but it's the weakest Buffett AI stock for now, in my view.