Hi Yumi, by the stance of the ants it looks like you were observing workers from two different colonies who were arguing with each other about where the boundary between the two nest territories is exactly. The ants confront each other in a display of strength which can go on for hours or even days, but only rarely start actual fighting. The display is known as ritualized fighting and it is well documented in this species of ant. This link (https://www.antwiki.org/wiki/Ritualised_fighting_in_Iridomyrmex_purpureus) will tell you all about it. It's pretty amazing! Cheers, Jon
Wow, that's cool! While I was observing them, I thought it almost looked like they were dancing - seems like they do have their own fighting routine after all :D Thanks for the info!