In this paper, we propose an adaptive team formation strategy for humanoid robot soccer. The proposed strategy involves distributed cooperative decisions through both communication and observations. Two agent groups, namely defenders and attackers, arc formed by a case-based group formation method. Attackers are formed for constructing an attacking formation around the ball and scoring a goal whenever possible while defenders are for blocking and constructing a defensive obstacle against the opponent team. Cooperative decisions are made using communication among team members. Distribution of agents on the field is ensured by Voronoi cell construction of each agent through observations in a distributed manner. Experiments are set in the RoboCup 3D Soccer Simulation League environment where our method is compared to earlier team formation methods. The results illustrate that a distributed Voronoi cell construction method combined with a case-based grouping algorithm outperforms the others. Furthermore, it has been shown that our method is also robust to communication failures.