The theory of games and the formation of defensive alliances