North Korea independently developed funcitoning ICBMs and nuclear weapons, you can't do that with uneducated starving peasants who are eating rats.
Boy, you should read Russian history before writing comments like this.
Generally it is the other way around. The better you live, the more opportunities for escaping you have.
> North Korea independently developed funcitoning ICBMs and nuclear weapons
Maybe because it is not that hard, and it is pretty strong motivator when your only way not to consider rats to be celebratory delicacy is to be exceptionally good at building what The Party wants you to build.
North Korea has, like all (formerly and currently) communist countries, a decent education system.
An educated population of 20 million people will easily provide you with a several thousand people needed to develop functioning nuclear weapons. Those you need to feed. The rest may, and do, starve.