Reasons to do MS before applying for US PhD? I'm a Software Engineering (BS) graduate with first class honors, and I want to attend a US PhD program on artificial intelligence (international applicant).  I know MS is not a prerequisite for a PhD in the U.S.

However, I'm considering doing MS at a local university (not in US) for the following reasons:


Publish some papers under my name during that time  
Get recommendations from good professors (Currently I don't have anyone who is aware of my work)
Obtain good mathematical background
As sneak peek on doing "independent research"


Do you think the above given reasons are good reasons for me to follow MS or do you think that is a waste of time? 

Appreciate your opinion as I'm confused on making a decision.
I think you have already listed many good reasons for completing an MS before a PhD.

For one, it can give you an introduction to a field of study on a graduate level. That allows you to be introduced to many of the more prominent people in the field, some of which you might find out are worth studying under. In that case, it would only help you when it comes time to apply.

If you publish and then subsequently present at a conference, then you can meet with a lot of other faculty from schools you're interested in, and you can strike up a conversation. In turn, you can stay in touch with that person and visit them later when it comes time to apply for the program. They may in turn vouch for you during the admissions review. 

It is common for PhD students to have already completed an MS, even if its at another school. And, virtually all programs will take that into consideration and credit you 30 hours of coursework towards a PhD completion, so long as the courses are directly relevant to the PhD program. 

I learned halfway through my first year of PhD studies that as far as my university is considered, there is no differentiation between a MS and a PhD student, we are all part of the Graduate College. So all of the MS hours are in effect graduate hours, and thusly they are also PhD hours.