My view of this question is a lot more optimistic than what I have been reading here. If you look at the big picture, we are no different from other animals in that we require certain resources and certain protections in order to survive, both as individuals and as a species.
Food and water are the primary resources needed by all animals, and territory is required in order to obtain food and water. Thus, most animals, including humans are territorial. They will fight to protect their territory. Even at that, food has typically been in short supply for almost all animals almost all of the time. So, given an opportunity, most animals will enlarge the territory they hold.
Since the beginning of agriculture and herding, humans have fought to defend and increase their territory so they could feed themselves, and during that time, famines have still been ever present. The population has always increased enough to keep the people on the brink of starvation. . . . Until about 1948 or so.
Looking at global food production, humans since about 1948 have been producing more food than they can consume, and the amount of excess food has steadily increased. At present, most of the food produced by humans is fed to other animals. Through technology, in the past half-century, humans have finally solved the problem of food supply for themselves.
There is still an enormous problem of the distribution of that food, however, so there still are famines in the world. But there is more than enough food to go around. The fact is that territorial wars are no longer necessary for the same purpose that they have been for millions of years and for all animal species. And, if you notice, the big territorial wars stopped happening in 1945.
It takes a long time for traditions to die out even after they no longer have a purpose, so it will probably take a while for the idea of war to die out completely. But, if you notice, the public's attitude toward war has been changing dramatically since 1945. Some people, the "pacifists", can see that war serves no good purpose and they do what they can to stop them altogether. Others, see that armed force is necessary for other purposes than waging territorial wars, and they claim that we still need "wars". So, we have "Police Actions" such as the "Korean War", the "Viet Nam War", and the "wars" in Bosnia, Kosovo, Afghanistan, and Iraq. I put all the "wars" in scare quotes because none of them was officially declared a war by the US Congress. All of these were to prevent "bad guys" from causing too much destruction. In cases like Cambodia, Rwanda, Angola, Congo, and Sierra Leonne where such a "war" or "Police Action" was not mounted, the carnage was much worse than if some armed force had intervened to stop the bad guys.
We are in a transitional period, I believe, where armed forces will be used in the same sort of way as police forces, i.e. to minimize the damage done by sociopaths, and the old fashioned territorial wars between countries will be old history.
But we had better be careful to not throw the baby out with the bathwater. If we ever let our guard down, as civilized nations, and let the truly bad guys of the world victimize innocent people, we won't be much better off than people were when wars were normal.
My bet is that the world will see a complete abandonment of war within 50 years, and we will see international cooperation in the stopping of the sociopaths. Time will tell.
Paul