KEJ is bang on - keep everything clean.
However once upon a time I lived in, well, basically a shack, in Thialand - the floor was always full of exploring ants until the guy I was sharing with had an idea. We located where the ants where coming in and provided them with a new food source, to whit one bowl sugar and water. After that, all ants were v busy going backward and forward from this food source and no more ants in the house as all their food needs were being met. They even protected it (and us) from other ants.
The problem I can see with happy well-fed ants though is more ants colonnies springing up. We weren't around the next year to monitor results but it absolutely worked and no ants were harmed in the process.