Our result show that weaver ants have learning behavior. In case transport way is too small, the ants will cut foods into small pieces enough to go through. When food is out of reach, the ants learn to confederate by form the pyramid to reach to foods. Building the bridge is the one method to reach the food. The results showed that the shape of edge does not affect this behavior. The ants still build bridges in same place, no matter what margin shape. The greater the distance to be covered, the more ants are recruited to create the bridge. This result highlights building bridge can be dynamically modified in response to increasing distance.