Try to water a little more outside – ants come in when they are thirsty or they smell something good.
Keep clean. Wipe down kitchen counters, floors and cabinets with equal parts vinegar and water.
Place animal food bowls in shallow pans of vinegar or water (you can add a little citrus oil or something to deter ants further as long as your animals leave it alone).
Lay a line of boric acid (can be mixed with sugar) along the ants path or sprinkle (or use an old spray bottle) behind areas such as ovens, sinks, washers and toilets.
Cayenne pepper, chili pepper, cream of tartar, dried peppermint, paprika, cinnamon, salt, dried sage, cucumber peelings and boric acid all act as a barriers they will not cross.
For heavy Infestations mix 1 tablespoon sugar, 1 tablespoon borax, and 2 tablespoons water into a thick syrup. Soak cotton balls in the mixture and place the cotton balls on low lids or something flat that ants can reach. Place these lids in the middle of ant infestations. The ants will eat it and take it back to the nest and the numbers will diminish slowly.
For carpenter ants, try to locate and remove the nests. Drill holes in thew wood they are attacking and fill the holes with boric acid.