One of the things that has slowed down testing is that I've run into a logical issue with system value. In my original code, NPRs value a system based on existing population and installations, whether it is a logistics node, mining potential, terraforming potential, presence of low colony cost planets, proximity to other important systems and access to other systems that would be cut off by the loss of the system in question.
However, that can cause them to value systems a long way from their capital, based purely on mining or terraforming potential. That estimate of value will then cause them to order players and other NPRs to leave and because this might apply to many systems, especially when the races all have the same home system, it will rapidly increase threat and cause a war.
On the other hand, if they don't place value on these systems then they will not object when players claim them, which would disadvantage the AI.
Therefore, I think I am going to change system value so that systems where the only value is from potential, be that mining, terraforming or low colony cost planets, will be set as Claimed. Furthermore, NPRs will only Claim systems that are adjacent to an existing system that has at least Secondary value. Finally, NPRs will not ask players to leave Claimed systems, only those of Secondary value or higher. However, they will resist players demanding they leave Claimed systems. I hope that will resolve the issues above without disadvantaging NPRs too much.
EDIT: I am also going to add a proviso that NPRs will only accept claims on a system if the opposing race has a population in that system with an EM signature of at least 250. That is 5m pop without installations and would be valued as Secondary by the NPR.