Bill Gates is known for being an eternal optimist. But that doesn’t mean he doesn’t worry, particularly about those issues which he believes are getting too little attention.

In a talk at TED on Wednesday, he covered about one of those concerns, namely that the world is ill-prepared for a global disease outbreak. He even set up a replica of an Ebola clinic to help attendees get a sense of the challenges health workers face.

In an interview shortly after his appearance at TED, Gates talked to Re/code about the issue, as well as another area of concern — computers with greater-than-human intelligence. Gates also shared his views on private space travel and the recent rise in measles cases in developed countries.

Here is an edited transcript of the interview:

Re/code: You talked about the dangers of the next epidemic. What should we best do to prepare? What single action is most needed?

Bill Gates: The U.S. government has some things. They haven’t been integrated together and they are not really a global solution. The U.S government does more in this space than anyone else does.

One of the things I am saying that is pretty radical — and people may disagree — I’m saying the military should be cross-trained not just for military action but for natural disasters and epidemics.

What kind of epidemics or disasters should they be trained to handle?

I didn’t talk a lot about bioterrorism. Over time, that one is pretty scary. Why would you train the military to respond to bioterrorism but you wouldn’t train them to respond to a natural epidemic when the idea of quarantine and diagnosis and drugs and vaccines — it’s all pretty much the same no matter where it comes from.

Can you leverage the huge investments we take in the military? They are people that know they are hired and they might be in harm’s way. They have logistics training. If you pair them with this so-called medical corps, you get something pretty dramatic without spending.

Yesterday there was a lot of talk here on machine intelligence and I know you had expressed some concerns about how machines are making leaps in processing ability. What do you think we should be doing?

There are two different threat models for AI. One is simply the labor substitution problem. That, in a certain way, seems like it should be solvable because what you are really talking about is an embarrassment of riches. But it is happening so quickly. It does raise some very interesting questions given the speed with which it happens.

Then you have the issue of greater-than-human intelligence. That one, I’ll be very interested to spend time with people who think they know how we avoid that. I know Elon [Musk] just gave some money. A guy at Microsoft, Eric Horvitz, gave some money to Stanford. I think there are some serious efforts to look into could you avoid that problem.

What did you think of all the space travel talk at TED?

It’s not an area that I work on. It’s pretty expensive stuff. It’s cool technology. Some of the people I work with think, “Okay, Mars would be a pretty cool place to live.”

How frustrating is it, as someone who spends a lot of money on vaccines and finding vaccines, to see something like measles, for which we do have a vaccine, making such a large comeback?

It’s not making such a large comeback. It’s making a comeback, but as a percentage of the population, it’s not that high.

It is good for people to be reminded why they should vaccinate their children and for people to look at systems that most people would say have made it too easy not to vaccinate. The pro-vaccine crowd, in the last four months, has gotten more visibility, more endorsement and they have made more progress than in the previous two years. There were voices out there but their warnings were unheeded.