Zen and the Art of Pest Control
Connect with the deva of the ants and ask what their gift is to you. Our nature friends always show up to give us gifts; we just think they are pests instead of guests! Ant represents diligence, focus on the task in front of you, teamwork. Admirable qualities, all, and perhaps part of their gift to you.
While you are talking with them, explain that you appreciate them, and that it's not OK for them to be in your home. If there is a place on your land where it's OK for them to be, let them know that and give them permission to go there. Treat them as you would an honored and respected guest. Most likely, they were on the land where you reside before you were, so there is some question about who is invading whose territory!
When I've worked with "pests" in this way, they have always respected my request if I was truly coming from my heart. All of life appreciates appreciation, and simply wants to be heard. Lend them an ear, and make a clear request of them. Chances are, they will do as you ask.
If you have any other ideas or comments, let me know.