Ants have a strong sense of smell—it’s how they find your brownie crumbs. Use it against them. Place bay leaves, dried mint, or coffee grounds near entry points. They detest these scents. I once left a pile of used coffee grounds by the back door, and the ants sent a formal complaint letter (probably they just left, which is fine).
Essential oils work wonders too. Mix ten drops of peppermint oil with water in a spray bottle and spritz along baseboards. It smells like Christmas, but to ants, it smells like a nuclear alarm. Just don’t spray it on your cat—apparently, mint makes them dizzy, and no one wants a spin-dry cat.